Opened 6 years ago

Last modified 22 months ago

#6936 new defect

link to librt and libdl only when needed

Reported by: weasel Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.4.2-alpha
Severity: Normal Keywords: tor-client build autotools link
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

According to dpkg-shlibdeps, the three binaries in tor, tor-resolve, tor-gencert, and tor, link to libdl.so.2 and librt.so.1. without using any of their symbols.

dpkg-shlibdeps: warning: dependency on libdl.so.2 could be avoided if "debian/tor/usr/bin/tor-resolve debian/tor/usr/sbin/tor debian/tor/usr/bin/tor-gencert" were not uselessly linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on librt.so.1 could be avoided if "debian/tor/usr/bin/tor-resolve debian/tor/usr/sbin/tor debian/tor/usr/bin/tor-gencert" were not uselessly linked against it (they use none of its symbols).

Why do we link against them? Should we?

Child Tickets

Change History (10)

comment:1 Changed 6 years ago by nickm

Milestone: Tor: 0.2.4.x-final

I think that -lrt is for libevent to get clock_gettime(), and -ldl is for openssl to do loadable engines.

I think we're including them so static builds work, when in fact we should only be including them conditionally on static builds.

comment:2 Changed 6 years ago by nickm

Keywords: tor-client added

comment:3 Changed 6 years ago by nickm

Component: Tor ClientTor

comment:4 Changed 6 years ago by nickm

Milestone: Tor: 0.2.4.x-finalTor: 0.2.5.x-final

comment:5 Changed 5 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.???
Summary: why link to librt and libdl?link to librt and libdl only when needed

comment:6 Changed 5 years ago by gmorehouse

Just confirming that this problem still exists in 0.2.4.x on Raspbian.

comment:7 Changed 2 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:8 Changed 2 years ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:9 Changed 22 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:10 Changed 22 months ago by nickm

Keywords: build autotools link added
Severity: Normal
Note: See TracTickets for help on using tickets.