Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#3134 closed defect (fixed)

tor cannot statically link openssl on windows

Reported by: erinn Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If I try to compile tor like so:

./configure --enable-static-libevent --enable-static-openssl --enable-static-zlib --with-libevent-dir=/path/to/lib --with-zlib-dir=/path/to/lib --with-openssl-dir=/path/to/lib --prefix=/path/to/prefix

I get a bunch of angry errors and tor refuses to build.

I've tried this a few ways -- statically linking libz into openssl, dynamically linking it, etc. And I can statically link everything on OS X and Linux with basically the same command line, so it seems to be a Windows-specific thing that I am just not able to see. I've attached the config.log too, even though it configures fine, just to make sure someone can reproduce it.

/c/MinGW/bin/gcc.exe -O -g -I/c/Users/erinn/build-scripts.git/bundles/built
-alpha/include -Wall -fno-strict-aliasing -L/c/Users/erinn/build-scripts.git/osx
-bundles/built-alpha/lib -L/c/Users/erinn/build-scripts.git/bundles/built-al
pha/lib -L/c/Users/erinn/build-scripts.git/bundles/built-alpha/lib -Wl,--nxc
ompat -Wl,--dynamicbase -o tor-gencert.exe tor-gencert.o ../common/libor.a ../co
mmon/libor-crypto.a -lm /c/Users/erinn/build-scripts.git/bundles/built-alpha
/lib/libz.a /c/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libssl.
a /c/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a -lws2
_32 -lgdi32 -lpthread
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x6d): undefined reference to `inflateEnd'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x89): undefined reference to `deflateEnd'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x39a): undefined reference to `deflate'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x488): undefined reference to `zError'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x56b): undefined reference to `inflate'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x5c8): undefined reference to `zError'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x66b): undefined reference to `inflateInit_'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x756): undefined reference to `deflate'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x7d8): undefined reference to `zError'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x84a): undefined reference to `deflateInit_'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x933): undefined reference to `inflate'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0x9cf): undefined reference to `deflate'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0xa04): undefined reference to `inflateEnd'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0xa0f): undefined reference to `deflateEnd'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0xab4): undefined reference to `inflateInit_'
c:/Users/erinn/build-scripts.git/bundles/built-alpha/lib/libcrypto.a(c_zlib.
o):c_zlib.c:(.text+0xb20): undefined reference to `deflateInit_'
collect2: ld returned 1 exit status
make[5]: * [tor-gencert.exe] Error 1
make[5]: Leaving directory `/c/Users/erinn/build-scripts.git/bundles/tor-0.2
.3.1-alpha/src/tools'
make[4]:
* [all-recursive] Error 1
make[4]: Leaving directory `/c/Users/erinn/build-scripts.git/bundles/tor-0.2
.3.1-alpha/src/tools'
make[3]: * [all-recursive] Error 1
make[3]: Leaving directory `/c/Users/erinn/build-scripts.git/bundles/tor-0.2
.3.1-alpha/src'
make[2]:
* [all-recursive] Error 1
make[2]: Leaving directory `/c/Users/erinn/build-scripts.git/bundles/tor-0.2
.3.1-alpha'
make[1]: * [all] Error 2
make[1]: Leaving directory `/c/Users/erinn/build-scripts.git/bundles/tor-0.2
.3.1-alpha'
make:
* [build-tor] Error 2

Child Tickets

Attachments (1)

config.log (313.1 KB) - added by erinn 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by erinn

Attachment: config.log added

comment:1 Changed 9 years ago by Sebastian

that looks like an issue in making openssl, not Tor. did you use "static" when building openssl? Also, there is a no-zlib option for openssl too, I think. Maybe that would help here (my openssl doesn't use zlib at all on windows)

comment:2 Changed 9 years ago by erinn

Resolution: fixed
Status: newclosed

Sebastian is smart (and correct). I'm able to build this now, closing.

comment:3 Changed 7 years ago by nickm

Keywords: tor-client added

comment:4 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.