[tor-bugs] #16651 [Tor]: Tor fails to build on OpenBSD due to libevent config options

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jul 28 17:58:17 UTC 2015


#16651: Tor fails to build on OpenBSD due to libevent config options
------------------------+---------------------------------------
     Reporter:  teor    |      Owner:
         Type:  defect  |     Status:  needs_review
     Priority:  normal  |  Milestone:  Tor: 0.2.7.x-final
    Component:  Tor     |    Version:
   Resolution:          |   Keywords:  bsd 026-backport libevent
Actual Points:          |  Parent ID:
       Points:          |
------------------------+---------------------------------------

Comment (by attila):

 Replying to [comment:8 sysfu]:
 > Using freshly extracted tor 0.2.7.2-alpha archive and the commands below
 it got bit further this time, before failing as per below. System is
 updated with LibreSSL 2.2.1 and platform is amd64.
 >
 > Commands used:
 >
 > $ patch < tor-libevent2-4.patch
 > $ env CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure
 --with-ssl-dir=/usr --disable-gcc-hardening --enable-bufferevents
 --disable-asciidoc
 > $ AUTOCONF_VERSION=2.69 AUTOMAKE_VERSION=1.15 make check
 >
 > <snipped make command output>
 > src/common/libor-event.a(procmon.o)(.text+0x256): In function
 `tor_process_monitor_new':
 > : undefined reference to `event_new'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_get_write_max'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `bufferevent_init_common'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_generic_adj_timeouts'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_add_event'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_run_eventcb'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_get_read_max'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `bufferevent_unsuspend_read'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_incref_and_lock'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `bufferevent_incref'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `event_mm_calloc_'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_run_readcb'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `evutil_closesocket'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_decref_and_unlock'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `bufferevent_suspend_read'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_evthread_lock_fns'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_decrement_write_buckets'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `bufferevent_enable_locking'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `event_assign'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `event_get_fd'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_run_writecb'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_decrement_read_buckets'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_del_generic_timeout_cbs'
 > /usr/local/lib/libevent_openssl.so.0.0: undefined reference to
 `_bufferevent_init_generic_timeout_cbs'
 > collect2: ld returned 1 exit status
 > * Error 1 in /usr/local/src/tor-0.2.7.2-alpha (Makefile:2656
 'src/or/tor': @echo " CCLD " src/or/tor;gcc -std=gnu99
 -I/usr/local/incl...)

 The patch has two parts, one to configure.ac and one to compat_libevent.c.
 It looks like
 perhaps you didn't regenerate configure after patching configure.ac.

 The full sequence (after applying the patch):
 {{{
 $ env AUTOMAKE_VERSION=1.11 AUTOCONF_VERSION=2.69 ./autogen.sh
 $ env CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib \
   ./configure --with-ssl-dir=/usr --disable-gcc-hardening \
               --disable-asciidoc --enable-bufferevents
 $ gmake
 }}}

 Also, to be sure: you're running -current, right?  What does the first
 line of your
 dmesg output look like?  Here's the one from the machine where this
 worked:
 {{{
 $ dmesg | head -1
 OpenBSD 5.8-beta (GENERIC) #987: Sat Jul 11 00:10:38 MDT 2015
 }}}

 That's actually not that recent a snap... I'll try it with the latest
 today once my
 new machine is up to snuff.  This might all work on -stable as well but I
 don't have
 anything but -current to test with at the moment.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16651#comment:9>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list