Opened 7 weeks ago

Closed 3 weeks ago

#27963 closed defect (fixed)

Undefined symbol: "timeradd", first referenced in src/lib/libtor-thread.a

Reported by: Knut Owned by: nickm
Priority: High Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version: Tor: 0.3.5.2-alpha
Severity: Major Keywords: undefined symbole timeradd regression
Cc: Actual Points:
Parent ID: Points:
Reviewer: ahf Sponsor:

Description

When compiling tor-0.3.5.2-alpha on Solaris10, x64, with gcc 5.2.0 I'm getting an undefined symbole "timeradd", see below (or attached log file):
...
...

CC src/feature/dirauth/src_core_libtor_app_testing_a-shared_random_state.o
AR src/core/libtor-app-testing.a
CC src/tools/tor_runner.o
AR src/tools/libtorrunner.a
CC src/app/main/tor_main.o
CCLD src/app/tor

Undefined first referenced

symbol in file

timeradd src/lib/libtor-thread.a(compat_pthreads.o)
ld: fatal: symbol referencing errors. No output written to src/app/tor
gmake[1]: * [src/app/tor] Error 1
gmake[1]: Leaving directory `/usr/local/lib/tor-0.3.5.2-alpha'
gmake:
* [all] Error 2
#

Child Tickets

Attachments (7)

tor_bug_20181006.log (95.6 KB) - added by Knut 7 weeks ago.
output from configure and compile tor
tor_bug_20181006-2.log (95.5 KB) - added by Knut 6 weeks ago.
config.log.gz (46.4 KB) - added by Knut 6 weeks ago.
gmake_V1.log.gz (26.2 KB) - added by Knut 6 weeks ago.
time.h.gz (6.3 KB) - added by Knut 6 weeks ago.
ssl_header_files.tgz (95.9 KB) - added by Knut 6 weeks ago.
ssl.h.gz (30.9 KB) - added by Knut 6 weeks ago.
latest ssl.h after upgrade of openssl

Download all attachments as: .zip

Change History (21)

Changed 7 weeks ago by Knut

Attachment: tor_bug_20181006.log added

output from configure and compile tor

comment:1 Changed 6 weeks ago by nickm

Component: Core TorCore Tor/Tor
Keywords: timeradd regression added; timerad removed
Milestone: Tor: 0.3.5.x-final
Priority: MediumHigh

Looks like there are other warnings here we should fix.

Does adding #include <sys/time.h> to compat_pthreads.c fix the linking problem for you?

I'm also concerned about ‘SSL_CIPHER_find’ warnings -- what version of openssl do you have? And does SSL_CIPHER_find appear in any of the files in /usr/include/openssl/ ?

Changed 6 weeks ago by Knut

Attachment: tor_bug_20181006-2.log added

comment:2 Changed 6 weeks ago by Knut

The include '#include <sys/time.h>' is already in compat_pthreads.c

openssl version
OpenSSL 1.0.2o 27 Mar 2018

I did rerun configure and make with:

--with-openssl-dir=/opt/csw

the issue is unchanged, see tor_bug_20181006-2.log

Any help is appreciated.

Thanks.
Knut

comment:3 Changed 6 weeks ago by nickm

Could you also attach the contents of "config.log", and a log from running with "make V=1"? I suspect there might be something tricky going on with the build system. (It might be necessary to compress them.)

Are you able to check whether timeradd is defined in any of your system headers? Oracle's documentation ( https://docs.oracle.com/cd/E26502_01/html/E29034/gettimeofday-3c.html ) implies that it's there, but I am not sure whether to believe it.

comment:4 Changed 6 weeks ago by Knut

I have uploaded the log files "config.log.gz" and "gmake_V1.log.gz".

I found 2 header files:
-rw-r--r-- 1 root bin 12988 Feb 20 2014 /usr/include/sys/time.h
-rw-r--r-- 1 root bin 10920 Jan 17 2008 /usr/include/time.h
and I have them also attached as "time.h.gz"

Thanks.

Knut

Changed 6 weeks ago by Knut

Attachment: config.log.gz added

Changed 6 weeks ago by Knut

Attachment: gmake_V1.log.gz added

Changed 6 weeks ago by Knut

Attachment: time.h.gz added

comment:5 Changed 6 weeks ago by nickm

Owner: set to nickm
Status: newaccepted

Okay, I have a fix for the timeradd issue as bug27963_wallclock, with PR at https://github.com/torproject/tor/pull/391 . I'll look into the openssl issue some more.

comment:6 Changed 6 weeks ago by nickm

Status: acceptedneeds_review

comment:7 Changed 6 weeks ago by nickm

For the SSL_CIPHER_find issue one, could you please attach a copy of /opt/csw/openssl/include/ssl.h, and of any other copies of ssl.h you have on your system?

Changed 6 weeks ago by Knut

Attachment: ssl_header_files.tgz added

comment:8 Changed 6 weeks ago by Knut

I have uploaded the requested header files.

Your fix works, I have tor-0.3.5.2-alpha up and running.

Thanks.

Knut

comment:9 Changed 6 weeks ago by nickm

Hm. Looking at the ssl.h files, they all seem to be from older versions of openssl than you are linking against. (Except for the ones that are from nss.) They don't list SSL_CIPHER_find() at all, and they have an old copyright date. I'm thinking those warnings may be a problem with your OpenSSL installation.

comment:10 Changed 6 weeks ago by Knut

I have just upgraded to the latest version of openssl I could get, please see attached ssl.h

Changed 6 weeks ago by Knut

Attachment: ssl.h.gz added

latest ssl.h after upgrade of openssl

comment:11 Changed 5 weeks ago by dgoulet

Reviewer: ahf

comment:12 Changed 3 weeks ago by ahf

Status: needs_reviewmerge_ready

Nick, your changes in https://github.com/torproject/tor/pull/391 looks good, but it looks like Travis is unhappy with them for one of the builders, but that seems related to the rebinding test script which is entirely unrelated to this.

I think this should be safe to get in.

comment:13 Changed 3 weeks ago by nickm

Merged to 0.3.5 and forward!

comment:14 Changed 3 weeks ago by nickm

Resolution: fixed
Status: merge_readyclosed
Note: See TracTickets for help on using tickets.