Opened 10 years ago

Last modified 7 years ago

#1000 closed defect (Not a bug)

Latest maint-0.2.1 git update fails compile

Reported by: yancm Owned by:
Priority: Very High Milestone:
Component: Core Tor/Tor Version: 0.2.1.15-rc
Severity: Keywords:
Cc: yancm, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Here was the latest update message:
From git://git.torproject.org/git/tor

bd0eaa0..3a5259e maint-0.2.0 -> origin/maint-0.2.0
c50098f..8453263 maint-0.2.1 -> origin/maint-0.2.1
358efe1..74bf885 master -> origin/master

Updating 358efe1..74bf885

make failed, make clean + make failed and make clean + ./autogen.sh + make failed with the following:

gcc -g -O2 -Wall -g -O2 -fno-strict-aliasing -L/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -o tor buffers.o circuitbuild.o circuitlist.o circuituse.o command.o config.o connection.o connection_edge.o connection_or.o control.o cpuworker.o directory.o dirserv.o dirvote.o dns.o dnsserv.o geoip.o hibernate.o main.o networkstatus.o onion.o policies.o reasons.o relay.o rendcommon.o rendclient.o rendmid.o rendservice.o rephist.o router.o routerlist.o routerparse.o eventdns.o config_codedigest.o tor_main.o ../common/libor.a ../common/libor-crypto.a -lz -levent -lssl -lcrypto -lpthread
config.o: In function `init_libevent':
/usr/local/src/tor/src/or/config.c:4810: undefined reference to `configure_libevent_logging'
/usr/local/src/tor/src/or/config.c:4814: undefined reference to `suppress_libevent_log_msg'
/usr/local/src/tor/src/or/config.c:4816: undefined reference to `tor_check_libevent_header_compatibility'
/usr/local/src/tor/src/or/config.c:4818: undefined reference to `tor_libevent_initialize'
/usr/local/src/tor/src/or/config.c:4820: undefined reference to `suppress_libevent_log_msg'
/usr/local/src/tor/src/or/config.c:4822: undefined reference to `tor_libevent_get_method'
/usr/local/src/tor/src/or/config.c:4822: undefined reference to `tor_check_libevent_version'
/usr/local/src/tor/src/or/config.c:4826: undefined reference to `tor_libevent_get_version_str'
/usr/local/src/tor/src/or/config.c:4827: undefined reference to `tor_libevent_get_method'
dns.o: In function `dns_launch_correctness_checks':
/usr/local/src/tor/src/or/dns.c:1571: undefined reference to `tor_evtimer_new'
main.o: In function `handle_signals':
/usr/local/src/tor/src/or/main.c:1741: undefined reference to `tor_libevent_get_base'
/usr/local/src/tor/src/or/main.c:1741: undefined reference to `tor_evsignal_new'
main.o: In function `connection_start_reading_from_linked_conn':
/usr/local/src/tor/src/or/main.c:423: undefined reference to `tor_libevent_get_base'
main.o: In function `connection_add':
/usr/local/src/tor/src/or/main.c:136: undefined reference to `tor_libevent_get_base'
/usr/local/src/tor/src/or/main.c:136: undefined reference to `tor_event_new'
/usr/local/src/tor/src/or/main.c:138: undefined reference to `tor_libevent_get_base'
/usr/local/src/tor/src/or/main.c:138: undefined reference to `tor_event_new'
main.o: In function `second_elapsed_callback':
/usr/local/src/tor/src/or/main.c:1166: undefined reference to `tor_libevent_get_base'
/usr/local/src/tor/src/or/main.c:1166: undefined reference to `tor_evtimer_new'
main.o: In function `do_main_loop':
/usr/local/src/tor/src/or/main.c:1450: undefined reference to `tor_libevent_get_base'
/usr/local/src/tor/src/or/main.c:1458: undefined reference to `tor_libevent_get_method'
* Error code 1

Stop.
make: stopped in /usr/local/src/tor/src/or
* Error code 1

Stop.
make: stopped in /usr/local/src/tor/src
* Error code 1

Stop.
make: stopped in /usr/local/src/tor
* Error code 1

Stop.
make: stopped in /usr/local/src/tor

[Automatically added by flyspray2trac: Operating System: BSD]

Child Tickets

Change History (9)

comment:1 Changed 10 years ago by nickm

Hm. Some of those functions only exist in the master branch. I don't know why you'd be seeing them in maint-0.2.1

comment:2 Changed 10 years ago by nickm

Yeah, it looks like you're building master, but for some reason you aren't linking the new libor-event.a library.

comment:3 Changed 10 years ago by yancm

OK?!?!? I'm new to the git thing. My take on the git messages was that I was getting maint.0.2.1. Are you saying I am getting master instead? I've always just tracked whatever was at cvs/svn/git root...

I looked at my source tree and do not see anything related to a libor-event.a . I assume this in in tor and not libevent itself?

Is there a way to tell git to grab the new source? After I got it set up, I just had been using "git pull" to track the changes.

comment:4 Changed 10 years ago by yancm

Hmmm. I just remembered that I had a customized autogen. When I used this it compiled OK.

OK to close this one I think, sorry to be alarmist...

Here's my special autogen:

#!/bin/sh

# Mods to getbetter handle on local NetBSD 5_Stable environment
ACLOCAL_FLAGS="-I /usr/pkg/share/aclocal"; export ACLOCAL_PATH
PKG_CONFIG_PATH=/usr/pkg/lib/pkgconfig; export PKG_CONFIG_PATH

CPPFLAGS='-I/usr/local/include -I/usr/pkg/include -I/usr/X11R6/include'; export CPPFLAGS
LDFLAGS='-L/usr/pkg/lib -Wl,-R/usr/pkg/lib'; export LDFLAGS
set -e

# Run this to generate all the initial makefiles, etc.
aclocal && \

autoheader && \
autoconf && \
automake --add-missing --copy && \
if test x$NOCONF = x ; then ./configure --with-libevent-dir=/usr/pkg; fi

comment:5 Changed 10 years ago by nickm

Hm. Do all NetBSD 5 boxes need this? If so, we should do something about that.

comment:6 Changed 10 years ago by yancm

Short answer = no. Everything works out-of-the box if the operator doesn't have brain fade...

After a bit of digging, the reason my autogen script worked is two fold.

1) The last statement runs ./configure (with a flag to use the updated libevent 1.4.9 - see two below)
which I was forgetting about entirely...

2) Stock NetBSD 5 uses libevent 1.4.0 but apparently has 1.4.0_alpha include files - I'm sure it must have
just slipped through their release cycle or something, but it actually seems to compile and run with the
older version of libevent and mismatched header files.

./configure --with-libevent-dir=/usr/pkg is the key command that links and grabs header files from the
pkg (packages) collection of NetBSD wherein I have libevent 1.4.9.

Probably more than you wanted to know, but this whole bug report is really an example of user error (mine).

Too bad to waste bug report 1000 on that.

comment:7 Changed 10 years ago by nickm

No problem. For what it's worth, Libevent 1.4.0 _is_ Libevent 1.4.0 alpha, but both are really old and buggy. I wonder
why they shipped an alpha version at all.

Anyways, closing the bug. Thanks for tracking this down!

comment:8 Changed 10 years ago by nickm

flyspray2trac: bug closed.

comment:9 Changed 7 years ago by nickm

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