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

Can't build numpy with current master, python 2, NDK 15 #1141

Closed
germn opened this issue Oct 18, 2017 · 9 comments
Closed

Can't build numpy with current master, python 2, NDK 15 #1141

germn opened this issue Oct 18, 2017 · 9 comments
Milestone

Comments

@germn
Copy link
Contributor

germn commented Oct 18, 2017

Output:
https://pastebin.com/2sH9aKgx

Related part:

compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/include -I/home/p4a/test_kivy/.buildozer/android/platform/build/build/python-installs/test_kivy/include/python2.7 -c'
ccache: _configtest.c
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer -D__ANDROID_API__=19 -isystem /home/p4a/android-ndk-r15c/sysroot/usr/include/arm-linux-androideabi -isysroot /home/p4a/android-ndk-r15c/sysroot -I/home/p4a/test_kivy/.buildozer/android/platform/build/build/python-installs/test_kivy/include/python2.7 _configtest.o -o _configtest
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/home/p4a/android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
  File "setup.py", line 251, in <module>
    setup_package()
  File "setup.py", line 243, in setup_package
    setup(**metadata)
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/core.py", line 169, in setup
    return old_setup(**new_attr)
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/python-installs/test_kivy/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/python-installs/test_kivy/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/python-installs/test_kivy/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_ext.py", line 59, in run
    self.run_command('build_src')
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/python-installs/test_kivy/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/python-installs/test_kivy/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 153, in run
    self.build_sources()
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 164, in build_sources
    self.build_library_sources(*libname_info)
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 299, in build_library_sources
    sources = self.generate_sources(sources, (lib_name, build_info))
  File "/home/p4a/test_kivy/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/command/build_src.py", line 386, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 686, in get_mathlib_info
    raise RuntimeError("Broken toolchain: cannot link a simple C program")
RuntimeError: Broken toolchain: cannot link a simple C program


  STDERR:

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=test_kivy --bootstrap=sdl2 --requirements=python2,android,kivy,opencv --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/p4a/test_kivy/.buildozer/android/platform/build
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

@inclement
Copy link
Member

inclement commented Oct 19, 2017

Thanks for the report, I'll look into it. I know it's broken with crystax, but I thought it was working for the normal NDKs.

@inclement inclement added this to the 0.7 milestone Nov 18, 2017
@bobatsar
Copy link
Contributor

I have the same issue here. Is there any workaround to get it working again?

@maho
Copy link
Contributor

maho commented Dec 4, 2017

the same here

@GeorgeKesaev
Copy link

GeorgeKesaev commented Dec 20, 2017

Same here on 3 different pcs
Edit:
I really need numpy for my project, do you have any ideas on where to look, I could try to fix it myself.
Thank you.

@omarsgalal
Copy link

same problem here

@hutauf
Copy link

hutauf commented Dec 26, 2017

same here. is there any kind of workaround?

@hutauf
Copy link

hutauf commented Dec 26, 2017

your fix works for me, thanks @mahomahomaho

inclement added a commit that referenced this issue Jan 20, 2018
fix for #1141 - added ldflags to numpy
@art049
Copy link

art049 commented Apr 23, 2018

I still have the same problem even with @mahomahomaho fix. Which version of numpy is working for you ?
Edit: I got it working, I think the problem was that I didn't have libatlas

@AndreMiras
Copy link
Member

numpy + python2 is working as demonstrated in continuous integration #1304
Feel free to reopen if you have an updated broken case.

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

No branches or pull requests

9 participants