nyancrimew / KittenBoard

the perfect keyboard for all you little meow meows
78 stars 6 forks source link

Linker can't find libunwind #13

Open mraof opened 1 year ago

mraof commented 1 year ago
~/KittenBoard gradle build
Using ./gradlew
Exception while marshalling /opt/android-sdk/build-tools/30.0.3/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/ndk-bundle/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/platform-tools/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/tools/package.xml. Probably the SDK is read-only

> Task :cargoBuildArm
    Finished release [optimized] target(s) in 0.04s

> Task :cargoBuildArm64
   Compiling latinimers v0.1.0 (/home/mraof/KittenBoard/native/rust)
error: linking with `/home/mraof/KittenBoard/build/linker-wrapper/linker-wrapper.sh` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/mraof/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/android-sdk/platform-tools:/opt/android-sdk/tools:/opt/android-sdk/tools/bin:/home/mraof/.dotnet/tools:/home/mraof/.local/share/flatpak/exports/bin:/usr/lib/jvm/default/bin:/opt/marytts/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/mraof/Misc/bin:/home/mraof/.cargo/bin/:/home/mraof/.gem/ruby/2.7.0/bin:/home/mraof/.luarocks/bin/:/home/mraof/.local/bin/:/home/mraof/Misc/bin:/home/mraof/.cargo/bin/:/home/mraof/.gem/ruby/3.0.0/bin:/home/mraof/.luarocks/bin/:/home/mraof/.local/bin/" VSLANG="1033" "/home/mraof/KittenBoard/build/linker-wrapper/linker-wrapper.sh" "-Wl,--version-script=/tmp/rustcS42AF6/list" "/tmp/rustcS42AF6/symbols.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.0.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.1.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.10.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.11.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.12.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.13.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.14.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.15.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.2.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.3.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.4.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.5.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.6.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.7.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.8.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.9.rcgu.o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.4vjashdy2kue1bpv.rcgu.rmeta" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.2exbd8w302ut2u0d.rcgu.o" "-Wl,--as-needed" "-L" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps" "-L" "/home/mraof/KittenBoard/native/rust/target/release/deps" "-L" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib" "-Wl,-Bstatic" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblazy_static-de0ebc0ea27857e8.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblevenshtein-208a2ebea890a6fa.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libjni-9c6e7a5463487639.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libcesu8-1dbc62daad972cd4.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblog-4d8e54d24a1e1aa1.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libcfg_if-192c12a3eb9890ee.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libcombine-3834d03b3280ab61.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libmemchr-ed9a3ca512370047.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libbytes-d73c179b196dfa67.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libthiserror-6cc021b39237a479.rlib" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libjni_sys-69d3925f5a12c16d.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libstd-ff232a592cd8b90f.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libpanic_unwind-deb996301f6c12b9.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libobject-3360b94834681d6f.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libmemchr-2e11ef90411dc80d.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libaddr2line-42b0e157061239f6.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libgimli-36ce462eaccfa740.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_demangle-8348ab1e97d339d6.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libstd_detect-6d970650afc1daae.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libhashbrown-d17db5c03e28eda2.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libminiz_oxide-144e84a105fc07df.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libadler-53df784e1cbf8277.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_alloc-e465738adfb500c3.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libunwind-9bd9b1ea0ddb7756.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcfg_if-f78c5d736711988c.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/liblibc-f50a5e8c71bc6e17.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/liballoc-750e6f669f3106f2.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_core-001d5bd9a65e4337.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcore-088bc0b43b3ec677.rlib" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcompiler_builtins-c14fa3fed4e16abb.rlib" "-Wl,-Bdynamic" "-ldl" "-llog" "-lunwind" "-ldl" "-lm" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib" "-o" "/home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblatinimers.so" "-shared" "-Wl,-zrelro,-znow" "-Wl,-O1" "-nodefaultlibs"
  = note: /opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin/ld: cannot find -lunwind
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          /opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang -Wl,-soname,liblatinimers.so -Wl,--version-script=/tmp/rustcS42AF6/list /tmp/rustcS42AF6/symbols.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.0.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.1.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.10.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.11.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.12.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.13.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.14.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.15.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.2.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.3.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.4.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.5.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.6.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.7.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.8.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.latinimers.2175e530-cgu.9.rcgu.o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.4vjashdy2kue1bpv.rcgu.rmeta /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/latinimers.2exbd8w302ut2u0d.rcgu.o -Wl,--as-needed -L /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps -L /home/mraof/KittenBoard/native/rust/target/release/deps -L /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib -Wl,-Bstatic /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblazy_static-de0ebc0ea27857e8.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblevenshtein-208a2ebea890a6fa.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libjni-9c6e7a5463487639.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libcesu8-1dbc62daad972cd4.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblog-4d8e54d24a1e1aa1.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libcfg_if-192c12a3eb9890ee.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libcombine-3834d03b3280ab61.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libmemchr-ed9a3ca512370047.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libbytes-d73c179b196dfa67.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libthiserror-6cc021b39237a479.rlib /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/libjni_sys-69d3925f5a12c16d.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libstd-ff232a592cd8b90f.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libpanic_unwind-deb996301f6c12b9.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libobject-3360b94834681d6f.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libmemchr-2e11ef90411dc80d.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libaddr2line-42b0e157061239f6.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libgimli-36ce462eaccfa740.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_demangle-8348ab1e97d339d6.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libstd_detect-6d970650afc1daae.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libhashbrown-d17db5c03e28eda2.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libminiz_oxide-144e84a105fc07df.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libadler-53df784e1cbf8277.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_alloc-e465738adfb500c3.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libunwind-9bd9b1ea0ddb7756.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcfg_if-f78c5d736711988c.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/liblibc-f50a5e8c71bc6e17.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/liballoc-750e6f669f3106f2.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/librustc_std_workspace_core-001d5bd9a65e4337.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcore-088bc0b43b3ec677.rlib /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/libcompiler_builtins-c14fa3fed4e16abb.rlib -Wl,-Bdynamic -ldl -llog -lunwind -ldl -lm -lc -Wl,--eh-frame-hdr -Wl,-znoexecstack -L /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib -o /home/mraof/KittenBoard/native/rust/target/aarch64-linux-android/release/deps/liblatinimers.so -shared -Wl,-zrelro,-znow -Wl,-O1 -nodefaultlibs

error: could not compile `latinimers` due to previous error

> Task :cargoBuildArm64 FAILED

FAILURE: Build failed with an exception.

(I tried building it from within Android Studio too and it's the exact same error)

It does look like libunwind should exist, according to

~ ls /home/mraof/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-linux-android/lib/|rg unwind
libpanic_unwind-deb996301f6c12b9.rlib
libunwind-9bd9b1ea0ddb7756.rlib
mraof commented 1 year ago

Managed to fix this by installing the ndk via android studio before installing it via pacman, though it took enough finagling I can't be certain exactly what was the straw that fixed the camel's back

TheAwesome98-Real commented 1 year ago

installing the ndk in android studio didn't help for me, and i can't figure out what else is causing it since those files also exist for me