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

Lapack depends on arm-linux-androideabi-gfortran #2508

Closed
killangell opened this issue Oct 17, 2021 · 15 comments
Closed

Lapack depends on arm-linux-androideabi-gfortran #2508

killangell opened this issue Oct 17, 2021 · 15 comments
Labels

Comments

@killangell
Copy link

I'm trying to using scipy but it depends on lapack, while building lapack, some error showed as below for lacking of arm-linux-androideabi-gfortran

[INFO]: Building lapack for armeabi-v7a
[INFO]: -> directory context /home/kivy/.local/share/python-for-android/build/other_builds/lapack/armeabi-v7a__ndk_target_21/lapack/build
[ERROR]: Build failed: arm-linux-androideabi-gfortran not found. See https://github.com/mzakharo/android-gfortran

I followed the guide via link below for building tool chain contains arm-linux-androideabi-gfortran, however I didn't get this tool at last.
https://github.com/mzakharo/android-gfortran

I know that it's probably not a right place to ask the question here, but I've tried to find solution over the network search engines but I still cannot resolve it. Appreciate if anyone here can help.

I got lots of tools started with arm-linux-androideabi- but there's no arm-linux-androideabi-gfortran, anything I missed?

/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcov
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc-ar
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-c++filt
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-strings
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ar
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-dwp
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-objdump
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc-4.9.x
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-addr2line
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-c++
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-g++
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld.bfd
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-cpp
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ld.gold
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-size
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-elfedit
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-nm
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcov-tool
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-objcopy
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-readelf
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc-nm
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-as
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-strip
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc-4.9
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-ranlib
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gcc-ranlib
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-gprof
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/arm-linux-androideabi
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/libexec/gcc/arm-linux-androideabi
/home/kivy/work/android_source/prebuilts/ndk/current/toolchains/linux-x86_64/arm-linux-androideabi-4.9/lib/gcc/arm-linux-androideabi

@killangell
Copy link
Author

Sorry, I made a mistake that I used command: ./build.py --toolchain aarch64-linux-android
What I should use is : ./build.py --toolchain arm-linux-androideabi

Now it's resolved with new compile command.

@misl6
Copy link
Member

misl6 commented Apr 7, 2022

Closing as not directly related to python-for-android, and looks like a support request.

@misl6 misl6 added the support label Apr 7, 2022
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.

If you're having trouble installing or using python-for-android, maybe you could be interested in our quickstart guide.

Let us know if this comment was made in error, and we'll be happy to reopen the issue.

@github-actions github-actions bot closed this as completed Apr 7, 2022
@hemomona
Copy link

hemomona commented Apr 13, 2022

hello! I met the same question as you. BUT even after I ./build.py --toolchain arm-linux-androideabi and ./build.py --toolchain aarch64-linux-android, it still can not work!!! how did you success? You do the deploying thing? My directories are not the same as https://github.com/mzakharo/android-gfortran says, so I did not do it.

@hemomona
Copy link

If I have to deploy, which directory should I pack?

@hemomona
Copy link

...I have solved it using tar jxvf out/dist/gcc-arm64-linux-x86_64.tar.bz2
mv aarch64-linux-android-4.9 .buildozer/android/platform/android-ndk-r19c/toolchains//aarch64-linux-android-4.9/prebuilt/linux-x86_64.

@ALAWIII
Copy link

ALAWIII commented Jun 1, 2022

from scipy import integrate, special, e

I am trying to use scipy with my kivy GUI app but it crashes after completely compiling it to android and run it
is there any other alternative libraries that offer calculus and integrals methods?

[ERROR]: Build failed: arm-linux-androideabi-gfortran not found. See https://github.com/mzakharo/android-gfortran

Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=statal --bootstrap=sdl2 --requirements=python3,kivy==2.0.0,scipy --arch arm64-v8a --arch armeabi-v7a --copy-libs --color=always --storage-dir="/content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug

@monojk
Copy link

monojk commented Sep 2, 2022

The release notes for v2022.07.20 suggest that this problem was resolved.
Yet, I get
[INFO]: -> directory context /home/joachim/PycharmProjects/CardReader/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/lapack/arm64-v8a__ndk_target_21/lapack/build
[ERROR]: Build failed: Please set the environment variable 'LEGACY_NDK' to point to a NDK location with gcc/gfortran support (supported NDK version: 'r21e')

I tried several settings for LEGACY_NDK w/o success and don't know how to use the prebuilds from https://github.com/mzakharo/android-gfortran (the LEGACY_NDK should point where?).

@mzakharo
Copy link
Contributor

mzakharo commented Sep 6, 2022

I tried several settings for LEGACY_NDK w/o success and don't know how to use the prebuilds

Take a look here: https://github.com/kivy/python-for-android/blob/develop/ci/makefiles/android.mk#L95

@Evil4eveR
Copy link

hello, I faced a problem with kivy to apk using colab, and i got that error
[ERROR]: Build failed: Please set the environment variable 'LEGACY_NDK' to point to a NDK location with gcc/gfortran support (supported NDK version: 'r21e')
here is the code i run
!buildozer -v android debug

@Evil4eveR
Copy link

I tried several settings for LEGACY_NDK w/o success and don't know how to use the prebuilds

Take a look here: https://github.com/kivy/python-for-android/blob/develop/ci/makefiles/android.mk#L95

I took a look and didn't understand what to do ?

@Evil4eveR
Copy link

how did you build that one because i couldn't they said the file not found that one build.py

@Evil4eveR
Copy link

Sorry, I made a mistake that I used command: ./build.py --toolchain aarch64-linux-android What I should use is : ./build.py --toolchain arm-linux-androideabi

Now it's resolved with new compile command.

from where you got that files and how did you setup the toolchain because i couldn't

@Evil4eveR
Copy link

tar jxvf out/dist/gcc-arm64-linux-x86_64.tar.bz2

I did same but look where i got that file first
$ tar jxvf out/dist/gcc-arm64-linux-x86_64.tar.bz2
the output
tar (child): out/dist/gcc-arm64-linux-x86_64.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

@mzakharo
Copy link
Contributor

you have to execute the following targets from the makefile:

  • download_android_ndk_legacy
  • download_android_ndk_gfortran
  • extract_android_ndk_legacy
  • extract_android_ndk_gfortran

Then, create an env variable LEGACY_NDK to point to where your ANDROID_NDK_HOME_LEGACY folder is.

Full example project app with scipy is testapps-with-scipy from the toplevel Makefile

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

7 participants