Closed linsui closed 1 year ago
Sure, give me some time :)
Got the same problem too on my Debian builder. I wonder what's the root cause here as it builds fine under Windows.
Maybe related: https://github.com/android/ndk/issues/1755
This workaround didn't help: https://github.com/android/ndk/issues/1755#issuecomment-1258064065
Can we downgradle the ndk?
I did this a minute ago , see the new tag, please: https://github.com/Catfriend1/syncthing-android-fdroid/commits/v1.21.0.3 I'll now wait and see if it builds...
It works. Thanks! Could you please invoke python with python3
? Debian doesn't have the python link anymore but python3 is always available.
Okay, will see what scripts are affected during my next session :)
https://monitor.f-droid.org/builds/log/com.github.catfriend1.syncthingandroid/1210003#site-footer
Successful build :-). Thank you.
@linsui My Windows system has "C:\Program Files\Python39\python.exe" to invoke python. There is no "python3". I still could change it, but then the README.md on the front page would not be accurate to build on Windows - the user would have to manually create a symlink first.
Do you know a way to list alternatives for the same command in the "build.gradle", so we could some how conditionally decide there if it's "python" or "python3" to call?
If it's difficult, the current patch is good to me. To check if python exists you can run python --version
and check if the it succeeds. https://stackoverflow.com/questions/46461898/using-gradle-how-can-i-ensure-that-a-command-exists
https://github.com/android/ndk/issues/1755#issuecomment-1258064065 work for me Please don't cp file just one command please replace [/home/binsys/work/] with your path
workaround:
patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 [/home/binsys/work/]android-ndk-r25b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang-14
@Catfriend1
Thanks!
I still seem to have this issue on builds on Ubuntu 22.10:
clang-14: error: unable to execute command: posix_spawn failed: Exec format error
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
Reverting to NDK 24 works around the problem for me, but running patchelf
does not (not that it is a good idea to use it anyway, as it isn't installed by default).
Just noting that this is still an issue on the latest main
branch, at least for me on Fedora 41. Reverting to NDK 24 does work around it.
Description of the issue
https://monitor.f-droid.org/builds/log/com.github.catfriend1.syncthingandroid/1210003#site-footer
Could you please take a look? Thanks!