Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#5103 closed defect (fixed)

--enable-static-tor barfs on openbsd 'cause it tries to link in -lrt which doesn't exist

Reported by: therealditzydoo Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Keywords: tor-bridge
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


CFLAGS=" -g -O0" ./configure --with-libevent-dir=/home/SCRUBBED/lib --prefix=/ --enable-static-tor fails with

checking for libevent directory... configure: WARNING: Could not find a linkable libevent.  If you have it installed somewhere unusual, you can specify an explicit path using --with-libevent-dir

Looking at the config.log we see:

configure:6383: gcc -o conftest  -g -O0 -static -I/home/irene/lib  -I${top_srcdir}/src/common -L/home/SCRUBBED/lib  conftest.c -lpthread  -levent  -lrt   >&5
/usr/bin/ld: cannot find -lrt

which causes the error, because there isn't a librt on openbsd. Indeed, removing the " -lrt" in configure makes all work.

if test "$enable_static_libevent" = "yes"; then
    if test "$have_rt" = yes; then

Child Tickets

Change History (9)

comment:1 Changed 9 years ago by Sebastian

Looks like the problem exists because we do AC_SEARCH_LIBS([clock_gettime], [rt], [have_rt=yes]). librt isn't available on openbsd, but clock_gettime is, so have_rt is set to yes and later we add -lrt

comment:2 Changed 9 years ago by nickm

Status: newneeds_review

Branch bug5103 in my public tor repository may fix this. Please test/review?

comment:3 Changed 9 years ago by arma

It builds and runs on my normal tor build. Meaning it doesn't break things for normal people.

Somebody should try it with --enable-static-tor (Sebastian?), and of course somebody should try it on openbsd too.

comment:4 Changed 9 years ago by nickm

Milestone: Tor: 0.2.2.x-final

Whoops; this should go onto 0.2.2.

comment:5 Changed 9 years ago by Sebastian

Currently failing to get --enable-static-tor to work on debian without the patch, so testing isn't exactly trivial. I think we should postpone this here, because there's a workaround and building completely static tor isn't exactly standard

comment:6 Changed 9 years ago by nickm

Milestone: Tor: 0.2.2.x-finalTor: 0.2.3.x-final

Postponing on advice. Sebastian; has this become testable?

comment:7 Changed 9 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Looking at this again, it still looks correct to me. I'm going to merge it.

comment:8 Changed 8 years ago by nickm

Keywords: tor-bridge added

comment:9 Changed 8 years ago by nickm

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