Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build-wheel NDK installation fails silently #1084

Open
mhsmith opened this issue Jan 26, 2024 · 7 comments
Open

build-wheel NDK installation fails silently #1084

mhsmith opened this issue Jan 26, 2024 · 7 comments
Labels

Comments

@mhsmith
Copy link
Member

mhsmith commented Jan 26, 2024

Originally posted by @VWE22 in #1071 (comment)

Hello,
Thanks for your answer. I'm trying to follow the instruction [to build pyinform] but I have this error:

Installing NDK: this may take several minutes
/home/ab/Desktop/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/*/bin/llvm-ar does not exist

BR

@mhsmith
Copy link
Member Author

mhsmith commented Jan 26, 2024

Originally posted by @mhsmith in #1071 (comment)

Please let me know:

  • What country are you in? Some countries may be blocked from Google's servers either by the US or their own government.
  • Does the directory /home/ab/Desktop/android-sdk/ndk/22.1.7171670 actually exist?
  • If it does exist, please make a recursive listing of its contents (ls -R /home/ab/Desktop/android-sdk/ndk/22.1.7171670 > ndk.txt), and attach the ndk.txt file to this issue.

@mhsmith
Copy link
Member Author

mhsmith commented Jan 26, 2024

Originally posted by @VWE22 in #1071 (comment)

I'm in Switzerland.
And no, the directory don't exist.

~/Desktop/chaquopy/server/pypi$ ./build-wheel.py --python 3.8 --abi arm64-v8a pyinform
build-wheel: cd /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0
build-wheel: rm -rf /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a
build-wheel: mkdir -p /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a
build-wheel: Using cached sdist
build-wheel: tar -C /tmp/build-wheel-lbzgd1yi -xf pyinform-0.2.0.tar.gz
build-wheel: mv /tmp/build-wheel-lbzgd1yi/pyinform-0.2.0 /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/src
build-wheel: rm -rf /tmp/build-wheel-lbzgd1yi
build-wheel: mkdir -p /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements
build-wheel: mkdir -p /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/include
build-wheel: mkdir -p /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/lib
build-wheel: unzip -q -d /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy /home/abba/Desktop/chaquopy/maven/com/chaquo/python/target/3.8.18-0/target-3.8.18-0-arm64-v8a.zip include/* jniLibs/*
build-wheel: mv /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/jniLibs/arm64-v8a/* /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/lib
build-wheel: rm -r /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/jniLibs
build-wheel: ln -s libpython3.8.so /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/lib/libpython3..so
build-wheel: ln -s libcrypto_chaquopy.so /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/lib/libcrypto.so
build-wheel: ln -s libssl_chaquopy.so /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/lib/libssl.so
build-wheel: ln -s libsqlite3_chaquopy.so /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy/lib/libsqlite3.so
build-wheel: /home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8/bin/pip --version
build-wheel: [Errno 2] No such file or directory: '/home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8/bin/pip'
build-wheel: Invalid bootstrap environment: recreating it
build-wheel: rm -rf /home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8
build-wheel: mkdir -p /home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8
build-wheel: python3.8 -m venv /home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8
build-wheel: /home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8/bin/pip install pip==23.2.1
Collecting pip==23.2.1
  Downloading pip-23.2.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 8.7 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.0.1
    Uninstalling pip-23.0.1:
      Successfully uninstalled pip-23.0.1
Successfully installed pip-23.2.1
build-wheel: /home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8/bin/pip --version
build-wheel: mkdir -p /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/env
build-wheel: python3.8 -m venv --without-pip /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/env
build-wheel: /home/abba/Desktop/chaquopy/server/pypi/build/_bootstrap/3.8/bin/pip --python /home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/env/bin/python install 'setuptools >= 40.8.0' wheel
Collecting setuptools>=40.8.0
  Obtaining dependency information for setuptools>=40.8.0 from https://files.pythonhosted.org/packages/55/3a/5121b58b578a598b269537e09a316ad2a94fdd561a2c6eb75cd68578cc6b/setuptools-69.0.3-py3-none-any.whl.metadata
  Downloading setuptools-69.0.3-py3-none-any.whl.metadata (6.3 kB)
Collecting wheel
  Obtaining dependency information for wheel from https://files.pythonhosted.org/packages/c7/c3/55076fc728723ef927521abaa1955213d094933dc36d4a2008d5101e1af5/wheel-0.42.0-py3-none-any.whl.metadata
  Downloading wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
Downloading setuptools-69.0.3-py3-none-any.whl (819 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 819.5/819.5 kB 9.1 MB/s eta 0:00:00
Downloading wheel-0.42.0-py3-none-any.whl (65 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 5.6 MB/s eta 0:00:00
Installing collected packages: wheel, setuptools
Successfully installed setuptools-69.0.3 wheel-0.42.0
build-wheel: abi=arm64-v8a; api_level=21; prefix=/home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy; . /home/abba/Desktop/chaquopy/server/pypi/../../target/build-common.sh; export
Installing NDK: this may take several minutes
/home/abba/Desktop/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/*/bin/llvm-ar does not exist
build-wheel: Error: Command 'abi=arm64-v8a; api_level=21; prefix=/home/abba/Desktop/chaquopy/server/pypi/packages/pyinform/build/0.2.0/cp38-cp38-android_21_arm64_v8a/requirements/chaquopy; . /home/abba/Desktop/chaquopy/server/pypi/../../target/build-common.sh; export' returned non-zero exit status 1.

Thanks

@mhsmith
Copy link
Member Author

mhsmith commented Jan 26, 2024

Please run the following command and post the output here:

$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;22.1.7171670"

And let me know whether the android-sdk/ndk/22.1.7171670 directory exists afterwards.

This was referenced Jan 26, 2024
@mhsmith mhsmith added the bug label Jan 26, 2024
This was referenced Jan 26, 2024
@VWE22
Copy link

VWE22 commented Jan 29, 2024

The NDK exist now with the command that you give me.
Now I'm facing another error:

[Moved to #1071]

@carloscbl
Copy link
Contributor

So for me the problem was i was pointing in ENV to openjdk-17, but i hadn't installed

@mhsmith
Copy link
Member Author

mhsmith commented Jun 30, 2024

That doesn't sound like it's related to this issue. What error message did you receive?

@oddbookworm
Copy link

I also had this issue because I had forgotten to install openjdk17 on a new machine (so I had no JAVA_HOME set)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants