Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444954 - net-misc/tor-0.2.3.25 USE=bufferevents should [R]DEPEND on dev-libs/libevent[ssl]
Summary: net-misc/tor-0.2.3.25 USE=bufferevents should [R]DEPEND on dev-libs/libevent[...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-27 15:57 UTC by Maxim Kammerer
Modified: 2012-11-27 21:41 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Kammerer 2012-11-27 15:57:37 UTC
With libevent[-ssl]:

i686-pc-linux-gnu-gcc  -Os -march=pentium3 -mtune=core2 -mfpmath=sse -fomit-frame-pointer -pipe -Wall -fno-strict-aliasing  -Wl,-O1 -Wl,--as-needed -Wl,-O,1,-z,combreloc -o tor tor_main.o ./libtor.a ../common/libor.a ../common/libor-crypto.a ../common/libor-event.a -lz -lm -levent_openssl -levent -lssl -lcrypto  -lpthread -lrt -ldl 
/usr/lib/gcc/i686-pc-linux-gnu/4.5.4/../../../../i686-pc-linux-gnu/bin/ld: cannot find -levent_openssl
collect2: ld returned 1 exit status

event_openssl is actually used -- when removed, the result is:

# i686-pc-linux-gnu-gcc  -Os -march=pentium3 -mtune=core2 -mfpmath=sse -fomit-frame-pointer -pipe -Wall -fno-strict-aliasing  -Wl,-O1 -Wl,--as-needed -Wl,-O,1,-z,combreloc -o tor tor_main.o ./libtor.a ../common/libor.a ../common/libor-crypto.a ../common/libor-event.a -lz -lm -levent -lssl -lcrypto  -lpthread -lrt -ldl
./libtor.a(connection_or.o): In function `connection_or_handle_event_cb':
connection_or.c:(.text+0x3932): undefined reference to `bufferevent_ssl_renegotiate'
connection_or.c:(.text+0x3a98): undefined reference to `bufferevent_get_openssl_error'
../common/libor-crypto.a(tortls.o): In function `tor_tls_init_bufferevent':
tortls.c:(.text+0x480c): undefined reference to `bufferevent_openssl_filter_new'
tortls.c:(.text+0x4a3a): undefined reference to `bufferevent_openssl_socket_new'
collect2: ld returned 1 exit status

That code (and linking to event_openssl) is only enabled with bufferevents.
Comment 1 Anthony Basile gentoo-dev 2012-11-27 19:10:16 UTC
(In reply to comment #0)
> With libevent[-ssl]:
> 
> i686-pc-linux-gnu-gcc  -Os -march=pentium3 -mtune=core2 -mfpmath=sse
> -fomit-frame-pointer -pipe -Wall -fno-strict-aliasing  -Wl,-O1
> -Wl,--as-needed -Wl,-O,1,-z,combreloc -o tor tor_main.o ./libtor.a
> ../common/libor.a ../common/libor-crypto.a ../common/libor-event.a -lz -lm
> -levent_openssl -levent -lssl -lcrypto  -lpthread -lrt -ldl 
> /usr/lib/gcc/i686-pc-linux-gnu/4.5.4/../../../../i686-pc-linux-gnu/bin/ld:
> cannot find -levent_openssl
> collect2: ld returned 1 exit status
> 
> event_openssl is actually used -- when removed, the result is:
> 
> # i686-pc-linux-gnu-gcc  -Os -march=pentium3 -mtune=core2 -mfpmath=sse
> -fomit-frame-pointer -pipe -Wall -fno-strict-aliasing  -Wl,-O1
> -Wl,--as-needed -Wl,-O,1,-z,combreloc -o tor tor_main.o ./libtor.a
> ../common/libor.a ../common/libor-crypto.a ../common/libor-event.a -lz -lm
> -levent -lssl -lcrypto  -lpthread -lrt -ldl
> ./libtor.a(connection_or.o): In function `connection_or_handle_event_cb':
> connection_or.c:(.text+0x3932): undefined reference to
> `bufferevent_ssl_renegotiate'
> connection_or.c:(.text+0x3a98): undefined reference to
> `bufferevent_get_openssl_error'
> ../common/libor-crypto.a(tortls.o): In function `tor_tls_init_bufferevent':
> tortls.c:(.text+0x480c): undefined reference to
> `bufferevent_openssl_filter_new'
> tortls.c:(.text+0x4a3a): undefined reference to
> `bufferevent_openssl_socket_new'
> collect2: ld returned 1 exit status
> 
> That code (and linking to event_openssl) is only enabled with bufferevents.



Thanks for catching that!  Before I make the change, if we set USE="-bufferevents" then is the dependency on >=dev-libs/libevent-2.0.14[-ssl] sufficient?
Comment 2 Anthony Basile gentoo-dev 2012-11-27 20:25:34 UTC
> Thanks for catching that!  Before I make the change, if we set
> USE="-bufferevents" then is the dependency on
> >=dev-libs/libevent-2.0.14[-ssl] sufficient?

@Maxim.  I just tested, confirmed and fixed the issue.  Please test and repoen if there is still an issue.
Comment 3 Maxim Kammerer 2012-11-27 20:50:40 UTC
Hi, I also checked that libevents[ssl] is only necessary with USE=bufferevents, before filing the bug. The relevant code is in #ifdefs.
Comment 4 Anthony Basile gentoo-dev 2012-11-27 21:41:08 UTC
(In reply to comment #3)
> Hi, I also checked that libevents[ssl] is only necessary with
> USE=bufferevents, before filing the bug. The relevant code is in #ifdefs.

Thansk Maxim, I convinced myself you were right :)