Skip to content

Commit dda9ac7

Browse files
committed
Strip before patching, otherwise the libraries may be corrupted
1 parent 38464a6 commit dda9ac7

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

android-env.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ fi
7878

7979
if [ -n "${PREFIX:-}" ]; then
8080
abs_prefix=$(realpath $PREFIX)
81-
82-
# Use -idirafter so that package-specified -I directories take priority. For
83-
# example, grpcio provides its own BoringSSL headers which must be used rather than
84-
# our OpenSSL.
85-
CFLAGS="$CFLAGS -idirafter $abs_prefix/include"
81+
CFLAGS="$CFLAGS -I$abs_prefix/include"
8682
LDFLAGS="$LDFLAGS -L$abs_prefix/lib"
8783

8884
export PKG_CONFIG="pkg-config --define-prefix"

openssl/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ rm -r $prefix/usr
5454
cd $prefix/lib
5555
for name in crypto ssl; do
5656
old_name=$(basename $(realpath lib$name.so)) # Follow symlinks.
57+
58+
# Strip before patching, otherwise the libraries may be corrupted:
59+
# https://github.com/NixOS/patchelf/issues?q=is%3Aissue+strip+in%3Atitle
60+
"$STRIP" "$old_name"
61+
5762
new_name="lib${name}_python.so"
5863
if [ "$name" = "crypto" ]; then
5964
crypto_old_name=$old_name

sqlite/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ make install prefix=$prefix
4343
cd $prefix/lib
4444
for name in sqlite3; do
4545
old_name=$(basename $(realpath lib$name.so)) # Follow symlinks.
46+
47+
# Strip before patching, otherwise the libraries may be corrupted:
48+
# https://github.com/NixOS/patchelf/issues?q=is%3Aissue+strip+in%3Atitle
49+
"$STRIP" "$old_name"
50+
4651
new_name="lib${name}_python.so"
4752
mv "$old_name" "$new_name"
4853
ln -s "$new_name" "$old_name"

0 commit comments

Comments
 (0)