Opened 7 months ago

Last modified 7 months ago

#33624 needs_revision defect

Static building tor with openssl does not work

Reported by: dgoulet Owned by:
Priority: Medium Milestone: Tor: 0.4.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: build static openssl network-team-roadmap-2020Q2
Cc: ahf Actual Points:
Parent ID: Points:
Reviewer: nickm Sponsor:


We have couple opened ticket about building OpenSSL statically: #31565 and #32871 are the one I could find.

I've been working on this to measure the size of tor as a shared library for mobile environment for which we need to build tor with openssl and libevent statically.

At current master, this is not working for build system and code reasons.

This ticket is to address it all so we can close all other related tickets.

Here is a raw tor.git diff that makes this work. There is still some think to consider especially with the OPENSSL_VERSION:

Child Tickets

Change History (6)

comment:1 Changed 7 months ago by nickm

+   if test "x$tor_cv_library_openssl_dir" = "(system)"; then

This line (and its libevent equivalent) either needs one more x on the right, or one less x on the left.

+     TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/.libs/libevent.a $STATIC_LIBEVENT_FLAGS"

I think this change only makes sense if libevent hasn't been installed? Once a libtool library is installed, the .a file is put into place.

I wouldn't object to a change where we look for a .libs additionally, but I don't think it should be instead.

comment:2 Changed 7 months ago by dgoulet

Status: newneeds_review

Branch: ticket33624_044_01

comment:3 Changed 7 months ago by nickm

Appveyor CI appears to be failing with cannot find -ldl.

comment:4 Changed 7 months ago by nickm

Reviewer: nickm

comment:5 Changed 7 months ago by nickm

Status: needs_reviewneeds_revision

Left a couple of comments on the branch.

Also, for testing, could you give me detailed instructions for a command line that works with this patch, and does not work without it?

comment:6 Changed 7 months ago by gaba

Keywords: network-team-roadmap-2020Q2 added
Note: See TracTickets for help on using tickets.