[tor-commits] [tor/release-0.4.5] configure: Revert back the static libevent path

ahf at torproject.org ahf at torproject.org
Wed Dec 16 20:32:11 UTC 2020


commit 15b0d30a553e2e3e7eba2539d6531025a0272d2c
Author: David Goulet <dgoulet at torproject.org>
Date:   Fri Dec 11 09:52:23 2020 -0500

    configure: Revert back the static libevent path
    
    From c618c4f27986825df2026fb22b8ee222edd1afa1, we changed the static
    libevent.a path to be able to use the git repository or tarball directly but
    that broke the "make install" setup that Tor Browser is using with Android.
    
    In other words, the git repository and tarball put the "libevent.a" in
    ".libs/" where "make install" puts it in "lib/".
    
    Using the --with-libevent-dir=..., which is mandatory for static libevent,
    autoconf will take the path and use it for the includes (-I) and library (-L)
    for which if it finds a "include/" and a "lib/" in the root, it will use
    those.
    
    However, with the git repo or tarball, the "lib/" doesn't exists thus autoconf
    sets the library search path to be at the root and thus fails to find the
    libevent.a in ".libs/".
    
    This is a whole lot more work to make both cases work in our configure.ac thus
    I'm reverting the change here to the Tor Browser case works again and the work
    around for others is to either symlink the libevent.a at the root or use a
    temporary make install directory.
    
    One long term fix here would likely be to ask libevent to symblink the .a into
    the root along the .la files and likely do the same for .so. Or, use the
    "lib/" structure to contain the .a + .so files. Would be better than doing
    ninji-tsu in our configure.ac
    
    Fixes #40225
    
    Signed-off-by: David Goulet <dgoulet at torproject.org>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 83f6ad1821..1c3fa7d15c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -954,7 +954,7 @@ if test "$enable_static_libevent" = "yes"; then
    if test "$tor_cv_library_libevent_dir" = "(system)"; then
      AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent")
    else
-     TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/.libs/libevent.a $STATIC_LIBEVENT_FLAGS"
+     TOR_LIBEVENT_LIBS="$TOR_LIBDIR_libevent/libevent.a $STATIC_LIBEVENT_FLAGS"
    fi
 else
      if test "x$ac_cv_header_event2_event_h" = "xyes"; then





More information about the tor-commits mailing list