Opened 2 years ago

Closed 2 years ago

#17984 closed defect (fixed)

Tor fails to build with latest OpenSSL master

Reported by: rl1987 Owned by: nickm
Priority: High Milestone: Tor: 0.2.8.x-final
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Normal Keywords: openssl build
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

I'm running Mac OS X 10.11.2 and installed the latest OpenSSL from their master branch (1de1d7689a81f2a3ed3348926e6a31ef79a2bc15). Current Tor master (cdbb04be102969bd2cece9daf42896e061cc8880) fails to build with the following warnings:

src/common/crypto.c:376:26: warning: implicit declaration of function
      'ENGINE_get_default_ECDH' is invalid in C99
      [-Wimplicit-function-declaration]
      log_engine("ECDH", ENGINE_get_default_ECDH());
                         ^
src/common/crypto.c:376:26: warning: incompatible integer to pointer conversion
      passing 'int' to parameter of type 'ENGINE *' (aka 'struct engine_st *')
      [-Wint-conversion]
      log_engine("ECDH", ENGINE_get_default_ECDH());
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
src/common/crypto.c:173:36: note: passing argument to parameter 'e' here
log_engine(const char *fn, ENGINE *e)
                                   ^
src/common/crypto.c:377:27: warning: implicit declaration of function
      'ENGINE_get_default_ECDSA' is invalid in C99
      [-Wimplicit-function-declaration]
      log_engine("ECDSA", ENGINE_get_default_ECDSA());
                          ^
src/common/crypto.c:377:27: warning: incompatible integer to pointer conversion
      passing 'int' to parameter of type 'ENGINE *' (aka 'struct engine_st *')
      [-Wint-conversion]
      log_engine("ECDSA", ENGINE_get_default_ECDSA());
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/common/crypto.c:173:36: note: passing argument to parameter 'e' here
log_engine(const char *fn, ENGINE *e)
                                   ^
4 warnings generated.

and following error messages:

Undefined symbols for architecture x86_64:
  "_ENGINE_get_default_ECDH", referenced from:
      _crypto_global_init in libor-crypto.a(crypto.o)
  "_ENGINE_get_default_ECDSA", referenced from:
      _crypto_global_init in libor-crypto.a(crypto.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [src/or/tor] Error 1
make: *** [all] Error 2

Child Tickets

Attachments (2)

configure.log (15.4 KB) - added by rl1987 2 years ago.
make.2.log (15.6 KB) - added by rl1987 2 years ago.

Download all attachments as: .zip

Change History (11)

Changed 2 years ago by rl1987

Attachment: configure.log added

Changed 2 years ago by rl1987

Attachment: make.2.log added

comment:1 Changed 2 years ago by rl1987

(I don't seem to have permission to delete attachment. Please delete make.log above.)

comment:2 Changed 2 years ago by rl1987

Status: newneeds_review

Gisle Vanem on @tor-dev seems to have a patch for this:
https://lists.torproject.org/pipermail/tor-dev/2016-January/010250.html

Last edited 2 years ago by rl1987 (previous) (diff)

comment:3 Changed 2 years ago by nickm

Status: needs_reviewneeds_revision

For openssl 1.1 it should do ENGINE_get_default_EC . EC didn't go away!

comment:4 Changed 2 years ago by nickm

Priority: MediumHigh

comment:5 Changed 2 years ago by nickm

Owner: set to nickm
Status: needs_revisionassigned

comment:6 Changed 2 years ago by nickm

My branch "openssl_compat" fixes this issue for me, and some others. (See also #17921.) Tested with libressl-portable 3.2.0, with openssl master, with openssl 1.0.2f, and with openssl 1.0.0t. Please review?

comment:7 Changed 2 years ago by nickm

Status: assignedneeds_review

comment:8 Changed 2 years ago by yawning

ACKing this. I don't have libressl handy to see what weirdnesss they did, but the changes look sensible to my "just woke up" brain.

comment:9 Changed 2 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Great; merged!

Note: See TracTickets for help on using tickets.