Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #20530

Closed (moved)
(moved)
Open
Created 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 an admin enable hashed storage. More information
Assignee
Assign to
Time tracking