[tor-bugs] #23846 [Core Tor/Tor]: Use libtool for building shared library

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jul 31 00:39:31 UTC 2018


#23846: Use libtool for building shared library
-------------------------------------------------+-------------------------
 Reporter:  hellais                              |          Owner:  nickm
     Type:  enhancement                          |         Status:
                                                 |  accepted
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.5.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-mobile, s8-api,                  |  Actual Points:
  034-triage-20180328, 034-included-20180402,    |
  034-roadmap-subtask, 035-roadmap-subtask, 035  |
  -triaged-in-20180711                           |
Parent ID:  #25510                               |         Points:
 Reviewer:  ahf                                  |        Sponsor:
                                                 |  Sponsor8
-------------------------------------------------+-------------------------

Comment (by Hello71):

 Replying to [comment:42 sbs]:
 > > Instead of a single static library, would a target that gives you a
 list of all the static libraries you need be acceptable?
 >
 > Yes, that would be acceptable!
 >
 > > [...] all the libraries you need to link for tor, in the correct
 order,
 >
 > This is especially useful because I was not super happy having to keep
 track of the correct order, especially in the future when switching to new
 releases; but having an authoritative source for the names and order is
 great.
 >
 > Is is correct to say that the reason why different `.a` libraries are
 built in tor, as opposed to a single library, is that you need to apply
 different compiler flags to different portions of the code base, or is
 there another reason?

 As I understand it, it's just an easy way to implement "module-like"
 functionality in autotools, since variable order is a problem (autotools
 doesn't support anything like the CMake "object library" function).

 > > [...] because Cargo builds its libraries as .lib rather than .a.
 >
 > Yeah, using non portable tricks was making me a little nervous because I
 feared something I was most likely not aware of could break.
 >
 > Curiosity: does this imply that rust produces binaries compatible with
 the format of MSVC as opposed to the one of GCC? Does this imply that
 MinGW is not used anymore for Windows, or is MinGW now able to cope with
 the format of MSVC?

 hey, I'm finally qualified to answer a question! Tor still uses mostly
 mingw to compile on Windows. MSVC is supported-ish but AFAIK no core Tor
 devs use it and Tor Browser still uses mingw. to use Rust on Windows, you
 must currently select to download the MSVC or the mingw version (which I
 assume are incompatible). Tor currently uses whatever you have installed,
 which now that I'm thinking about it, someone (hopefully not me) should
 write a configure test to ensure is linkable with the selected C
 toolchain, but it doesn't do that now.

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


More information about the tor-bugs mailing list