[tor-bugs] #32191 [Core Tor/Tor]: when cross-compiling, lzma and zstd will be detected on build system

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Oct 22 14:06:49 UTC 2019


#32191: when cross-compiling, lzma and zstd will be detected on build system
-----------------------+------------------------------
 Reporter:  eighthave  |          Owner:  (none)
     Type:  defect     |         Status:  new
 Priority:  Medium     |      Component:  Core Tor/Tor
  Version:             |       Severity:  Normal
 Keywords:  Android    |  Actual Points:
Parent ID:             |         Points:
 Reviewer:             |        Sponsor:
-----------------------+------------------------------
 When cross-compiling, for example for Android, ./configure will detect
 lzma and zstd setups from the build system, when it should be ignoring
 them.  It should only look in the NDK and --prefix values.

 {{{
 $ sudo apt install liblzma-dev
 $ export host_triplet=armv7a-linux-androideabi
 $ export EXTERNAL_ROOT=`pwd`/external
 $ export platform=21
 $ export CC=${host_triplet}${platform}-clang
 $ export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-
 x86_64/bin:$PATH
 $ ./configure --host="$host_triplet" --enable-android --enable-static-
 libevent --with-libevent-dir=$EXTERNAL_ROOT --enable-static-openssl
 --with-openssl-dir=$EXTERNAL_ROOT --prefix=$EXTERNAL_ROOT

 [snip]

   CC       src/lib/evloop/compat_libevent.o
 src/lib/compress/compress_lzma.c:24:18: fatal error: lzma.h: No such file
 or directory
  #include <lzma.h>
                   ^
 compilation terminated.

 }}}

 The workaround is to add `--disable-lzma --disable-zstd`.

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


More information about the tor-bugs mailing list