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

Numpy recipe broken (atlas, blas, lapack, -lcrystax) #1074

Closed
KeyWeeUsr opened this issue Jul 9, 2017 · 17 comments
Closed

Numpy recipe broken (atlas, blas, lapack, -lcrystax) #1074

KeyWeeUsr opened this issue Jul 9, 2017 · 17 comments
Milestone

Comments

@KeyWeeUsr
Copy link
Contributor

KeyWeeUsr commented Jul 9, 2017

I found a similar result (atlas, blas) from #1040, yet the error was different. Maybe this is what @inclement's error was. I wonder how to fix it, because I can compile Kivy, pyjnius and some other packages, yet when trying to make a pandas recipe it breaks (pandas package requires numpy).

The error is rather strange though, because iirc, the libcrystax.so exists on android, so we create it somewhere here (or fetch from crystax, +/- shouldn't matter in this case), so it should be able to see it, right? It doesn't make sense to me as Kivy itself surely sees the libcrystax.so and even the numpy's get_libs() is patched so that its code shouldn't even be called(return []). I checked and the patching went correctly, so... for now I have no clue about how to fix it. I'll look at the same case with using Android NDK as a replacement, though I don't think it's only about -lcrystax flag (found libcrystax.so in all crystax apps).

[INFO]:    Building numpy for armeabi-v7a
[INFO]:    numpy apparently isn't already in site-packages
[INFO]:    Building compiled components in numpy
[INFO]:    -> directory context /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy
[INFO]:    -> running python.host setup.py build_ext -v
           working:     raise Exception in thread background thread for pid 13651:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/x/.local/lib/python2.7/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/home/x/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/x/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
ErrorReturnCode_1: 

  RAN: /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/bin/python.host setup.py build_ext -v

  STDOUT:
Running from numpy source directory.
/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
/bin/sh: 1: svnversion: not found
F2PY Version 2
blas_opt_info:
blas_mkl_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

openblas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_blas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1604: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1613: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1616: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
  NOT AVAILABLE

/bin/sh: 1: svnversion: not found
non-existing path in 'numpy/lib': 'benchmarks'
lapack_opt_info:
openblas_lapack_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

lapack_mkl_info:
mkl_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_3_10_threads_info
  NOT AVAILABLE

atlas_3_10_info:
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_3_10_info
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1506: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1517: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1520: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
running build_ext
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-i686-2.7
creating build/src.linux-i686-2.7/numpy
creating build/src.linux-i686-2.7/numpy/distutils
building library "npymath" sources
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize LaheyFCompiler
Could not locate executable lf95
customize PGroupFCompiler
Could not locate executable pgfortran
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize NAGFCompiler
customize VastFCompiler
customize CompaqFCompiler
Could not locate executable fort
customize IntelItaniumFCompiler
Could not locate executable efort
Could not locate executable efc
customize IntelEM64TFCompiler
customize GnuFCompiler
Could not locate executable g77
customize G95FCompiler
Could not locate executable g95
customize PathScaleFCompiler
Could not locate executable pathf95
don't know how to compile Fortran code on platform 'posix'
C compiler: /usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/x/.buildozer/android/platform/crystax-ndk-10.3.2/platforms/android-17/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/x/.buildozer/android/platform/crystax-ndk-10.3.2/platforms/android-17/arch-arm -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC

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/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/include/python2.7 -c'
ccache: _configtest.c
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/x/.buildozer/android/platform/crystax-ndk-10.3.2/platforms/android-17/arch-arm _configtest.o -o _configtest
/home/x/.buildozer/android/platform/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/5.3/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrystax
collect2: error: ld returned 1 exit status
/home/x/.buildozer/android/platform/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/5.3/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrystax
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/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.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:


Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 905, in <module>
    main()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 902, in main
    ToolchainCL()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 508, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 190, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 565, in build_recipes
  File "pythonforandroid/recipe.py", line 890, in build_arch
  File "pythonforandroid/recipe.py", line 902, in build_compiled_components
  File "pythonforandroid/logger.py", line 175, in shprint
  File "/home/x/.local/lib/python2.7/site-packages/sh.py", line 720, in next
    self.wait()
  File "/home/x/.local/lib/python2.7/site-packages/sh.py", line 651, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/x/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/bin/python.host setup.py build_ext -v

  STDOUT:
Running from numpy source directory.
/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
/bin/sh: 1: svnversion: not found
F2PY Version 2
blas_opt_info:
blas_mkl_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

openblas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_3_10_blas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_blas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

atlas_blas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib/sse2', '/usr/lib', '/usr/lib/i386-linux-gnu/sse2', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1604: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
blas_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1613: UserWarning: 
    Blas (http://www.netlib.org/blas/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [blas]) or by setting
    the BLAS environment variable.
  warnings.warn(BlasNotFoundError.__doc__)
blas_src_info:
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1616: UserWarning: 
    Blas (http://www.netlib.org/blas/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [blas_src]) or by setting
    the BLAS_SRC environment variable.
  warnings.warn(BlasSrcNotFoundError.__doc__)
  NOT AVAILABLE

/bin/sh: 1: svnversion: not found
non-existing path in 'numpy/lib': 'benchmarks'
lapack_opt_info:
openblas_lapack_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

lapack_mkl_info:
mkl_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

  NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_3_10_threads_info
  NOT AVAILABLE

atlas_3_10_info:
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_3_10_info
  NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_threads_info
  NOT AVAILABLE

atlas_info:
  libraries  not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries lapack_atlas not found in /home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib
  libraries  not found in /usr/local/lib
  libraries lapack_atlas not found in /usr/local/lib
  libraries  not found in /usr/lib/sse2
  libraries lapack_atlas not found in /usr/lib/sse2
  libraries  not found in /usr/lib
  libraries lapack_atlas not found in /usr/lib
  libraries  not found in /usr/lib/i386-linux-gnu/sse2
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu/sse2
  libraries  not found in /usr/lib/i386-linux-gnu
  libraries lapack_atlas not found in /usr/lib/i386-linux-gnu
numpy.distutils.system_info.atlas_info
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1506: UserWarning: 
    Atlas (http://math-atlas.sourceforge.net/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [atlas]) or by setting
    the ATLAS environment variable.
  warnings.warn(AtlasNotFoundError.__doc__)
lapack_info:
  libraries  not found in ['/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib', '/usr/local/lib', '/usr/lib', '/usr/lib/i386-linux-gnu']
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1517: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) libraries not found.
    Directories to search for the libraries can be specified in the
    numpy/distutils/site.cfg file (section [lapack]) or by setting
    the LAPACK environment variable.
  warnings.warn(LapackNotFoundError.__doc__)
lapack_src_info:
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/other_builds/numpy/armeabi-v7a/numpy/numpy/distutils/system_info.py:1520: UserWarning: 
    Lapack (http://www.netlib.org/lapack/) sources not found.
    Directories to search for the sources can be specified in the
    numpy/distutils/site.cfg file (section [lapack_src]) or by setting
    the LAPACK_SRC environment variable.
  warnings.warn(LapackSrcNotFoundError.__doc__)
  NOT AVAILABLE

/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
running build_ext
running build_src
build_src
building py_modules sources
creating build
creating build/src.linux-i686-2.7
creating build/src.linux-i686-2.7/numpy
creating build/src.linux-i686-2.7/numpy/distutils
building library "npymath" sources
customize Gnu95FCompiler
Could not locate executable gfortran
Could not locate executable f95
customize IntelFCompiler
Could not locate executable ifort
Could not locate executable ifc
customize LaheyFCompiler
Could not locate executable lf95
customize PGroupFCompiler
Could not locate executable pgfortran
customize AbsoftFCompiler
Could not locate executable f90
Could not locate executable f77
customize NAGFCompiler
customize VastFCompiler
customize CompaqFCompiler
Could not locate executable fort
customize IntelItaniumFCompiler
Could not locate executable efort
Could not locate executable efc
customize IntelEM64TFCompiler
customize GnuFCompiler
Could not locate executable g77
customize G95FCompiler
Could not locate executable g95
customize PathScaleFCompiler
Could not locate executable pathf95
don't know how to compile Fortran code on platform 'posix'
C compiler: /usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/x/.buildozer/android/platform/crystax-ndk-10.3.2/platforms/android-17/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/x/.buildozer/android/platform/crystax-ndk-10.3.2/platforms/android-17/arch-arm -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -fPIC

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/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/include/python2.7 -c'
ccache: _configtest.c
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/x/.buildozer/android/platform/crystax-ndk-10.3.2/platforms/android-17/arch-arm _configtest.o -o _configtest
/home/x/.buildozer/android/platform/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/5.3/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrystax
collect2: error: ld returned 1 exit status
/home/x/.buildozer/android/platform/crystax-ndk-10.3.2/toolchains/arm-linux-androideabi-5/prebuilt/linux-x86/bin/../lib/gcc/arm-linux-androideabi/5.3/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrystax
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/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build/build/python-installs/pandaspy2/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.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/x/clones/p4a_pandas/testapps/testapp_pandas/.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=pandaspy2 --bootstrap=sdl2 --requirements=python2,kivy,pandas --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/x/clones/p4a_pandas/testapps/testapp_pandas/.buildozer/android/platform/build
@inclement inclement added this to the 0.5 milestone Jul 9, 2017
@inclement
Copy link
Member

@KeyWeeUsr I remember discussing this a while ago, but I've lost the logs - did you say that the numpy recipe still does work if not using the crystax ndk?

@KeyWeeUsr
Copy link
Contributor Author

KeyWeeUsr commented Aug 12, 2017

Afaik, yes, with the default Android SDK+NDK downloaded by buildozer (r9c, v21 I guess?). Here's the linked discussion on #kivy-dev.

@inclement inclement modified the milestones: 0.6, 0.5 Aug 26, 2017
@inclement
Copy link
Member

I've confirmed that the numpy recipe does work with the normal Android NDK, but not with the crystax one. However, I can't work out what's actually wrong, as numpy fails when trying to -lcrystax even when this parameter is removed from the LDFLAGS.

Since the recipe does work as well as it used to, I'm moving this issue to the 0.6 milestone instead, and doing a release as it stands.

@inclement inclement modified the milestones: 0.6, 0.7 Oct 14, 2017
@edouardmulliez
Copy link

Hello,
@KeyWeeUsr : I also have a problem with Numpy recipe. However, I'm using the standard android sdk/ndk: sdk-20/ndk-r9c.
I'm using the buildozer VM. I upgraded python-for-android and buildozer.

$ sudo pip install --upgrade python-for-android
$ sudo pip install --upgrade buildozer

I attach my error log.
log-error.txt

Normally, I should be able to use the numpy recipe with these NDK-SDK, no?
Thanks for your help!

@KeyWeeUsr
Copy link
Contributor Author

@edouardmulliez The last time I tried with the latest buildozer & p4a numpy worked just fine. However I used the default SDK+NDK downloaded by buildozer (not Crystax, nor downloaded it myself), so perhaps that's the reason why?

@edouardmulliez
Copy link

I think I'm using the default SDK+NDK downloaded by buildozer (I did not download any SDK/NDK myself). I just used the one present in the Virtual machine directly.

@edouardmulliez
Copy link

@KeyWeeUsr I'm using the default SDK+NDK downloaded by buildozer, that's why I don't understand the errors I'm encountering.

@sachgali
Copy link

sachgali commented Jan 3, 2018

@edouardmulliez I'm getting the exact same error with the same settings you described- did anything end up fixing it for you?

@edouardmulliez
Copy link

@sachgali
No, I did not find any solution. If you find any, I'm of course interested :)

@sachgali
Copy link

sachgali commented Jan 3, 2018

@edouardmulliez
Copy link

@sachgali The solution you proposed is working for me, thanks a lot!
By the way, I also included opencv in the requirements. To make it work, I had to install cmake.

@cpkc
Copy link

cpkc commented Jan 9, 2018

Greetings!
I am very interested in work with Numpy+Opencv+Android, so I started to study about...
So, I will try to explain what works and what doesn't for me to this moment.
First I use XUBUNTU 17.10 as a Virtual Machine.
I uninstalled p4a, sudo pip uninstall pyhon-for-android, and reinstalled for my user pip install -U --user python-for-android.

I installed gfortran and cmake for Numpy and Opencv and some missing stuffs...
sudo apt-get install autoconf automake libtool gfortran cmake

I replaced (as sudo!) android.py (this is my folder /usr/local/lib/python2.7/dist-packages/buildozer/targets/) (Create apk error) as this brilliant tip https://github.com/ibobalo/buildozer/blob/4b52cf354cc9913bc00a99ba652224f22266daab/buildozer/targets/android.py tanks to @ibobalo!

I replaced init.py in the recipes Numpy folder (in my case /home/kivy/.local/lib/python2.7/site-packages/pythonforandroid/recipes/numpy/) as great tip #1209 thanks @mahomahomaho!

So I modified the buildozer.spec file adding:
p4a.source_dir = /home/kivy/.local/lib/python2.7/site-packages/pythonforandroid/
p4a.local_recipes = /home/kivy/.local/lib/python2.7/site-packages/pythonforandroid/recipes/

All those things made my project compile, but when I transfer the apk to the android, if main.py has import numpy or cv2 it doesn't work but if the requirements in the spec is kivy,numpy and opencv but i only import kivy (in main.py) it works (without any call to Numpy or Opencv)!!!

thanks!

@maho
Copy link
Contributor

maho commented Jan 10, 2018

@cpkc I would discourage using sudo in anything related with p4a and buildozer. I run everyting as separate user, called 'bdozer', and all I have buildozer pip-installed to it's local pip packages.

Anyway - not importing numpy or cv2 sounds like broken install. Did you try to rm -rf ~/.buildozer ./.buildozer and build it again?

BTW - did you try to do buildozer android debug deploy run logcat and see what is the error on android?

@cpkc
Copy link

cpkc commented Jan 10, 2018

Greetings All!

@mahomahomaho, it's too slow deploying in my machine!!!

This Hello World with numpy bellow works fine!

import kivy

from kivy.app import App
from kivy.uix.label import Label

import numpy

class MyApp(App):

def build(self):
    return Label(text='Hello world Numpy'+numpy.__version__)

if name == 'main':
MyApp().run()

but if I introduce cv or cv2 doesn't work!

import kivy

from kivy.app import App
from kivy.uix.label import Label

import numpy
import cv (or import cv2)

class MyApp(App):

def build(self):
    return Label(text='Hello world Numpy'+numpy.__version__+'cv'+cv(2).__version___)

if name == 'main':
MyApp().run()

Thanks!

@cpkc
Copy link

cpkc commented Jan 10, 2018

Greetings!

Suddenly works Hello World:

import kivy
kivy.require('1.0.6') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label

import numpy

import cv2

class MyApp(App):

def build(self):
    return Label(text='Hello world Numpy '+numpy.__version__+' Opencv '+cv2.__version__)

if name == 'main':
MyApp().run()

Here is the spec (I modified for numpy and opencv == master)
buildozer.txt

Thanks @mahomahomaho and All!

@AndreMiras
Copy link
Member

Can you guys give #882 (comment) a try and give some update?

@inclement
Copy link
Member

The numpy recipe currently seems to be working well.

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

7 participants