Skip to content

Android link error when linking PIC compiled static zig library into shared library #21837

Description

@Beyley

Zig Version

0.14.0-dev.2050+4adf63aef

Steps to Reproduce and Observed Behavior

Clone libsce on commit b7e30492a934cb390743fd5e3b286a903caae352

Run zig build publish_libsce -Doptimize=Debug with android NDK 21 installed (if you can't install that specific version, you can override the version using -Dndk_version=XX)
All builds will succeed except for the Android builds, which fail in Debug or ReleaseSafe configurations.

This failure is linked to my libc polyfill library, which is a Zig static library I link into the final executable. These polyfills aren't distinctly required on android, only on platforms like Linux where I do not link libc. However, this should still work nonetheless.

This issue seems to have been talked about in the past here, however no dedicated issue for -fPIC not taking effect was ever opened tmk.

publish_libsce
└─ install generated to android-x64/native/libscetool.so
   └─ zig build-lib sce Debug x86_64-linux-android 5 errors
error: ld.lld: relocation R_X86_64_TPOFF32 against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o)
    note: referenced by debug.zig:532 (/home/beyley/zig-versions/master/lib/std/debug.zig:532)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a
error: ld.lld: relocation R_X86_64_TPOFF32 against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o)
    note: referenced by debug.zig:534 (/home/beyley/zig-versions/master/lib/std/debug.zig:534)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a
error: ld.lld: relocation R_X86_64_TPOFF32 against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o)
    note: referenced by debug.zig:558 (/home/beyley/zig-versions/master/lib/std/debug.zig:558)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a
error: ld.lld: relocation R_X86_64_TPOFF32 against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o)
    note: referenced by Thread.zig:1135 (/home/beyley/zig-versions/master/lib/std/Thread.zig:1135)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o:(Thread.LinuxThreadImpl.getCurrentId) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a
error: ld.lld: relocation R_X86_64_TPOFF32 against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o)
    note: referenced by Thread.zig:1137 (/home/beyley/zig-versions/master/lib/std/Thread.zig:1137)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a.o:(Thread.LinuxThreadImpl.getCurrentId) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a
error: the following command failed with 5 compilation errors:
/home/beyley/zig-versions/master/zig build-lib -fPIC -ODebug -target x86_64-linux-android -mcpu baseline --dep sce --dep npdrm_keys_file --dep system_keys_file -Mroot=/home/beyley/Projects/PROGRAMMING/Zig/libsce/c_abi/lib.zig /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/cb6e4cc1678a992886e6f9c7565c3328/libaes.a -fPIC -ODebug -target x86_64-linux-android -mcpu baseline -I /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/94f55e81fcfbfe5946032a32f12d76e4 --dep aes -Msce=/home/beyley/Projects/PROGRAMMING/Zig/libsce/src/sce.zig -Mnpdrm_keys_file=/home/beyley/Projects/PROGRAMMING/Zig/libsce/keys/npdrm_keys.json -Msystem_keys_file=/home/beyley/Projects/PROGRAMMING/Zig/libsce/keys/system_keys.json /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a /home/beyley/Projects/PROGRAMMING/Zig/libsce/aes/aes.c -fPIC -ODebug -target x86_64-linux-android -mcpu baseline -I /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/384a172e4ae6665afce540aa0d8cf34d -Maes=/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f7183e3693d518e0b0e7c9e703c5fc88/aes.zig /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/358dd0636f9845f5cbf7110f04ca9d42/libc_polyfill.a -lc --libc /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/16441d91b3d28c2160bd514dce793df7/android-21-x86_64.conf --cache-dir /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache --global-cache-dir /home/beyley/.cache/zig --name sce -dynamic --zig-lib-dir /home/beyley/zig-versions/master/lib/ --listen=- 
publish_libsce
└─ install generated to android-arm/native/libscetool.so
   └─ zig build-lib sce Debug arm-linux-androideabi 2 errors
error: ld.lld: relocation R_ARM_TLS_LE32 against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a.o)
    note: referenced by debug.zig:0 (/home/beyley/zig-versions/master/lib/std/debug.zig:0)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a
error: ld.lld: relocation R_ARM_TLS_LE32 against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a.o)
    note: referenced by Thread.zig:0 (/home/beyley/zig-versions/master/lib/std/Thread.zig:0)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a.o:(Thread.LinuxThreadImpl.getCurrentId) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a
error: the following command failed with 2 compilation errors:
/home/beyley/zig-versions/master/zig build-lib -fPIC -ODebug -target arm-linux-androideabi -mcpu baseline --dep sce --dep npdrm_keys_file --dep system_keys_file -Mroot=/home/beyley/Projects/PROGRAMMING/Zig/libsce/c_abi/lib.zig /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/ad2fb30fb5cba6ab596e185c8580768b/libaes.a -fPIC -ODebug -target arm-linux-androideabi -mcpu baseline -I /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/94f55e81fcfbfe5946032a32f12d76e4 --dep aes -Msce=/home/beyley/Projects/PROGRAMMING/Zig/libsce/src/sce.zig -Mnpdrm_keys_file=/home/beyley/Projects/PROGRAMMING/Zig/libsce/keys/npdrm_keys.json -Msystem_keys_file=/home/beyley/Projects/PROGRAMMING/Zig/libsce/keys/system_keys.json /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a /home/beyley/Projects/PROGRAMMING/Zig/libsce/aes/aes.c -fPIC -ODebug -target arm-linux-androideabi -mcpu baseline -I /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/384a172e4ae6665afce540aa0d8cf34d -Maes=/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/ddeb5ae2c81f903d26c6e9c5f3fc6415/aes.zig /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/1990078d0aa0fa5fbaa8b05618b46398/libc_polyfill.a -lc --libc /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/95d6941bab47abb04caf133e7822c65d/android-21-arm.conf --cache-dir /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache --global-cache-dir /home/beyley/.cache/zig --name sce -dynamic --zig-lib-dir /home/beyley/zig-versions/master/lib/ --listen=- 
publish_libsce
└─ install generated to android-arm64/native/libscetool.so
   └─ zig build-lib sce Debug aarch64-linux-android 10 errors
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by debug.zig:532 (/home/beyley/zig-versions/master/lib/std/debug.zig:532)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by debug.zig:532 (/home/beyley/zig-versions/master/lib/std/debug.zig:532)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by debug.zig:534 (/home/beyley/zig-versions/master/lib/std/debug.zig:534)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by debug.zig:534 (/home/beyley/zig-versions/master/lib/std/debug.zig:534)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by debug.zig:558 (/home/beyley/zig-versions/master/lib/std/debug.zig:558)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC against debug.panic_stage cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by debug.zig:558 (/home/beyley/zig-versions/master/lib/std/debug.zig:558)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(debug.defaultPanic) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by Thread.zig:1135 (/home/beyley/zig-versions/master/lib/std/Thread.zig:1135)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(Thread.LinuxThreadImpl.getCurrentId) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by Thread.zig:1135 (/home/beyley/zig-versions/master/lib/std/Thread.zig:1135)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(Thread.LinuxThreadImpl.getCurrentId) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_HI12 against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by Thread.zig:1137 (/home/beyley/zig-versions/master/lib/std/Thread.zig:1137)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(Thread.LinuxThreadImpl.getCurrentId) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: ld.lld: relocation R_AARCH64_TLSLE_ADD_TPREL_LO12_NC against Thread.LinuxThreadImpl.tls_thread_id cannot be used with -shared
    note: defined in /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a(/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o)
    note: referenced by Thread.zig:1137 (/home/beyley/zig-versions/master/lib/std/Thread.zig:1137)
    note:               /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a.o:(Thread.LinuxThreadImpl.getCurrentId) in archive /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a
error: the following command failed with 10 compilation errors:
/home/beyley/zig-versions/master/zig build-lib -fPIC -ODebug -target aarch64-linux-android -mcpu baseline --dep sce --dep npdrm_keys_file --dep system_keys_file -Mroot=/home/beyley/Projects/PROGRAMMING/Zig/libsce/c_abi/lib.zig /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/d849cb64abaf4925f858a7198762fe6f/libaes.a -fPIC -ODebug -target aarch64-linux-android -mcpu baseline -I /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/94f55e81fcfbfe5946032a32f12d76e4 --dep aes -Msce=/home/beyley/Projects/PROGRAMMING/Zig/libsce/src/sce.zig -Mnpdrm_keys_file=/home/beyley/Projects/PROGRAMMING/Zig/libsce/keys/npdrm_keys.json -Msystem_keys_file=/home/beyley/Projects/PROGRAMMING/Zig/libsce/keys/system_keys.json /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a /home/beyley/Projects/PROGRAMMING/Zig/libsce/aes/aes.c -fPIC -ODebug -target aarch64-linux-android -mcpu baseline -I /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/384a172e4ae6665afce540aa0d8cf34d -Maes=/home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/56e66ac72db8c0ec8eaa3b8190117097/aes.zig /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/f03a4fb9caab59f76553b3d433003cba/libc_polyfill.a -lc --libc /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache/o/cce261f64f78bf9dd95f0de620a32bb7/android-21-aarch64.conf --cache-dir /home/beyley/Projects/PROGRAMMING/Zig/libsce/.zig-cache --global-cache-dir /home/beyley/.cache/zig --name sce -dynamic --zig-lib-dir /home/beyley/zig-versions/master/lib/ --listen=- 
Build Summary: 67/74 steps succeeded; 3 failed
publish_libsce transitive failure
├─ install generated to android-x64/native/libscetool.so transitive failure
│  ├─ zig build-lib sce Debug x86_64-linux-android 5 errors
│  └─ zig build-lib sce Debug x86_64-linux-android (+6 more reused dependencies)
├─ install generated to android-arm64/native/libscetool.so transitive failure
│  ├─ zig build-lib sce Debug aarch64-linux-android 10 errors
│  └─ zig build-lib sce Debug aarch64-linux-android (+6 more reused dependencies)
└─ install generated to android-arm/native/libscetool.so transitive failure
   ├─ zig build-lib sce Debug arm-linux-androideabi 2 errors
   └─ zig build-lib sce Debug arm-linux-androideabi (+6 more reused dependencies)

Expected Behavior

Compilation succeeds, as the static zig library is compiled with -fPIC (if you run zig build publish_libsce -Doptimize=Debug --verbose, you'll see that they are compiled with -fPIC, but that doesn't seem to work correctly in this case for some reason.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavioros-androidAndroid (Linux variant)

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions