Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #20530

Closed (moved)
Open
Opened Nov 02, 2016 by Trac@tracbot

undefined reference to 'munmap' and 'mmap' building tor on Windows

Using MinGW64 version 4.7.3-- thread model win32-- running naively (no cross-compile) inside msys2, I tried to build the tor-0.2.8.9 source downloaded from torproject.org.

While configuring the build, I noticed I had to build and install libevent, openssl, and zlib, which I did. After that Configure didn't fail anymore, and I proceeded to build tor by issuing "make". It seemed to go pretty well until the linker wanted to build tor.exe. It failed and complained about undefined references. Here is the output after issuing the make command again.

$ make make all-am make[1]: Entering directory /e/users/v/Desktop/nfolder/tor-0.2.8.9' CC src/common/compat.o src/common/compat.c: In function 'tor_mmap_file': src/common/compat.c:273:3: warning: implicit declaration of function 'getpagesize' [-Wimplicit-function-declaration] AR src/common/libor.a CC src/common/src_common_libor_testing_a-compat.o src/common/compat.c: In function 'tor_mmap_file': src/common/compat.c:273:3: warning: implicit declaration of function 'getpagesize' [-Wimplicit-function-declaration] AR src/common/libor-testing.a CCLD src/or/tor.exe src/common/libor.a(compat.o): In function tor_munmap_file': e:\users\v\Desktop\nfolder\tor-0.2.8.9/src/common/compat.c:312: undefined reference to munmap' src/common/libor.a(compat.o): In function tor_mmap_file': e:\users\v\Desktop\nfolder\tor-0.2.8.9/src/common/compat.c:285: undefined reference to mmap' collect2.exe: error: ld returned 1 exit status make[1]: *** [src/or/tor.exe] Error 1 make[1]: Leaving directory /e/users/v/Desktop/nfolder/tor-0.2.8.9' make: *** [all] Error 2

I have googled around and have not found an answer to solve this problem.

Trac:
Username: ice

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.3.0.x-final
Milestone
Tor: 0.3.0.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#20530