chaquo / chaquopy

Chaquopy: the Python SDK for Android
https://chaquo.com/chaquopy/
MIT License
856 stars 132 forks source link

Building lz4 library #915

Closed Mino260806 closed 1 year ago

Mino260806 commented 1 year ago

I'm trying to build lz4 libray, followed all the steps here. But when I run build-wheel.py I get these errors

  ld: error: /home/amin/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/lib/i686-linux-android/21/crtbegin_so.o is incompatible with elf64-x86-64
  ld: error: /home/amin/Personal/Code/Android/Workspace/tools/chaquopy/server/pypi/packages/lz4/build/4.3.2/cp310-cp310-android_21_x86/requirements/chaquopy/lib/libpython3.10.so is incompatible with elf64-x86-64
  ld: error: build/temp.linux_i686-cpython-310/lz4/_version.o is incompatible with elf64-x86-64
  ld: error: build/temp.linux_i686-cpython-310/lz4libs/lz4.o is incompatible with elf64-x86-64
  ld: error: /home/amin/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/lib/i686-linux-android/21/crtend_so.o is incompatible with elf64-x86-64
  clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
  error: command '/home/amin/Android/Sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android21-clang' failed with exit code 1
error

Tried with both python3.8 and python3.10 but got same error

Full build log

mhsmith commented 1 year ago

Thanks, this is a duplicate of #909, which I'm looking at right now.

mhsmith commented 1 year ago

I've just pushed some changes which should fix this error. Please give the current version a try and let me know how you get on.

Mino260806 commented 1 year ago

Issue solved. Great work!