-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi all,

Please find attached a small patch for Orbot's external/Makefile,
allowing Tor to run on Android versions older than API 9. This fixes
the problem I previously reported about Tor dying with exit code 255
on API 7.

With this patch we can build Briar's Tor binary straight from the
Orbot source tree. Thanks so much for all the work you've done to
bring Tor to Android! Now let's all switch to Orchid. ;-)

I ran into a small hitch while testing this patch: building iptables
requires pkg-config, otherwise I get the following error (which Nathan
previously ran into, I disovered while searching for the cause):

"
configure: WARNING: linux/proc_fs.h: present but cannot be compiled
configure: WARNING: linux/proc_fs.h:     check for missing
prerequisite headers?
configure: WARNING: linux/proc_fs.h: see the Autoconf documentation
configure: WARNING: linux/proc_fs.h:     section "Present But Cannot
Be Compiled"
configure: WARNING: linux/proc_fs.h: proceeding with the compiler's result
checking for linux/proc_fs.h... no
./configure: line 12015: syntax error near unexpected token
`libnetfilter_conntrack,'
./configure: line 12015: `PKG_CHECK_MODULES(libnetfilter_conntrack,
libnetfilter_conntrack >= 1.0.4,'
make: *** [iptables/Makefile] Error 2
"

The BUILD file should probably mention pkg-config as a prerequisite.

Incidentally, the submodules for libevent and OpenSSL are still
pointing at 2.0.9-rc and 1.0.1g, respectively - should they be updated?

Cheers,
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBCAAGBQJTkcvnAAoJEBEET9GfxSfM7n0H/1T2fy5Gr1PiOlYPT00t0fsd
MADPbQ3ETM7z/uZWUZgxf74EiCe6BLHPBzrxSshhpFQ53gS2Dx6p+UaLg6JZfu76
3p+pUCH9KvXqaeWK3AbGV6rQWZv/8gQM7bZHUt39pozA82EIWUaLN4KaGDem9tV7
QPY4sOi4jFl75vJf3cJ5Opc6VsfvdZig9Hh4OxQbZg2WK23m+yMJxWDQFWI78Bcp
8mWuKMmJz4Ucsj7Ksih45nrF/fNSLwqW75Q0h8qow1HiwcV1TDeRshEf6BD/dmbZ
LWUUQ4kevLCc5in0A+MvszBvXP4RHef0R9jQMTOOLoBS6xtesCLW+C5qa3nPikM=
=0/H2
-----END PGP SIGNATURE-----
diff --git a/external/Makefile b/external/Makefile
index 1817783..7712ef8 100644
--- a/external/Makefile
+++ b/external/Makefile
@@ -23,15 +23,11 @@ endif
 
 # Android NDK setup
 NDK_BASE ?= /opt/android-ndk
-NDK_PLATFORM_LEVEL ?= 9 
-NDK_ABI=arm
+NDK_PLATFORM_LEVEL ?= 9
+NDK_ABI ?= arm
 NDK_TOOLCHAIN_VERSION=4.8
 NDK_SYSROOT=$(NDK_BASE)/platforms/android-$(NDK_PLATFORM_LEVEL)/arch-$(NDK_ABI)
-APP_ABI=armeabi
-# NDK platform level, aka APP_PLATFORM, is equivalent to minSdkVersion
-APP_PLATFORM := android-$(shell sed -n 's,.*android:minSdkVersion="\([0-9][0-9]*\)".*,\1,p' \
-	$(EXTERNAL_ROOT)/../AndroidManifest.xml)
-NDK_SYSROOT=$(NDK_BASE)/platforms/$(APP_PLATFORM)/arch-$(NDK_ABI)
+APP_ABI ?= armeabi
 NDK_UNAME := $(shell uname -s | tr '[A-Z]' '[a-z]')
 ifeq ($(NDK_ABI),x86)
  HOST = i686-linux-android
@@ -85,14 +81,14 @@ all: assets
 lib/libcrypto.a:
 	cd openssl && \
 		./Configure android -DL_ENDIAN && \
-		make CC="$(CC)" ANDROID_DEV=$(NDK_BASE)/platforms/android-8/arch-arm /usr build_libs
+		make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr build_libs
 
 lib/libssl.a:
 	cp config.sub openssl
 	cp config.guess openssl
 	cd openssl && \
 		./Configure android -DL_ENDIAN && \
-		make CC="$(CC)" ANDROID_DEV=$(NDK_BASE)/platforms/android-8/arch-arm /usr build_libs
+		make CC="$(CC)" ANDROID_DEV=$(NDK_SYSROOT)/usr build_libs
 
 openssl-build-stamp: lib/libcrypto.a lib/libssl.a
 	touch openssl-build-stamp
@@ -351,8 +347,8 @@ clean: openssl-clean libevent-clean tor-clean polipo-clean jtorctl-clean liballi
 showsetup:
 	@echo "NDK_TOOLCHAIN_VERSION: $(NDK_TOOLCHAIN_VERSION)"
 	@echo "NDK_TOOLCHAIN: $(NDK_TOOLCHAIN)"
+	@echo "NDK_PLATFORM_LEVEL: $(NDK_PLATFORM_LEVEL)"
 	@echo "NDK_SYSROOT: $(NDK_SYSROOT)"
-	@echo "APP_PLATFORM: $(APP_PLATFORM)"
 	@echo "APP_ABI: $(APP_ABI)"
 	@echo "HOST: $(HOST)"
 	@echo "CC: $(CC)"

Attachment: orbot.patch.sig
Description: PGP signature

_______________________________________________
Guardian-dev mailing list

Post: [email protected]
List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev

To Unsubscribe
        Send email to:  [email protected]
        Or visit: 
https://lists.mayfirst.org/mailman/options/guardian-dev/archive%40mail-archive.com

You are subscribed as: [email protected]

Reply via email to