[tor-bugs] #20530 [- Select a component]: undefined reference to 'munmap' and 'mmap' building tor on Windows
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Nov 2 03:54:12 UTC 2016
#20530: undefined reference to 'munmap' and 'mmap' building tor on Windows
--------------------------------------+-----------------
Reporter: ice | Owner:
Type: defect | Status: new
Priority: Medium | Milestone:
Component: - Select a component | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
--------------------------------------+-----------------
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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20530>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list