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

Failed to build matplotlib because kiwisolver #2629

Closed
Neizvestnyj opened this issue Jun 28, 2022 · 4 comments
Closed

Failed to build matplotlib because kiwisolver #2629

Neizvestnyj opened this issue Jun 28, 2022 · 4 comments

Comments

@Neizvestnyj
Copy link
Contributor

Versions

  • p4a: develop
  • OS: Linux
  • Kivy: 2.1.0

buildozer.spec

requirements = kivy==2.1.0, matplotlib
android.ndk = 23b
Exception in thread background thread for pid 390272:
Traceback (most recent call last):
  File "/home/neizvestnyj/anaconda3/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/home/neizvestnyj/anaconda3/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/home/neizvestnyj/.local/lib/python3.9/site-packages/sh.py", line 1683, in wrap
    fn(*rgs, **kwargs)
  File "/home/neizvestnyj/.local/lib/python3.9/site-packages/sh.py", line 2662, in background_thread
    handle_exit_code(exit_code)
  File "/home/neizvestnyj/.local/lib/python3.9/site-packages/sh.py", line 2349, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/neizvestnyj/.local/lib/python3.9/site-packages/sh.py", line 905, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v

  STDOUT:
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/dist.py:461: UserWarning: Normalizing '1.2.0.dev' to '1.2.0.dev0'
  warnings.warn(tmpl.format(**locals()))
running build_ext
building 'kiwisolver' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/py
/usr/bin/ccache /home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -I/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include -frtti -fexceptions -DANDROID -I/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.8 -I/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include -fPIC -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include -I. -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c py/kiwisolver.cpp -o build/temp.linux-x86_64-3.8/py/kiwisolver.o -std=c++11
In file included from py/kiwisolver.cpp:8:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/cppy.h:14:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/defines.h:10:
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:14:2: error: "Something's broken.  UCHAR_MAX should be defined in limits.h."
#error "Something's broken.  UCHAR_MAX should be defined in limits.h."
 ^
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:18:2: error: "Python's source code assumes C's unsigned char is an 8-bit type."
#error "Python's source code assumes C's unsigned char is an 8-bit type."
 ^
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
#   error "Python.h requires that stdio.h define NULL."
    ^
In file included from py/kiwisolver.cpp:8:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/cppy.h:14:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/defines.h:10:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:30:
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:73:64: error: use of undeclared identifier 'strchr'
char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
                                                               ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:80:75: error: use of undeclared identifier 'strpbrk'
char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
                                                                          ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:87:65: error: use of undeclared identifier 'strrchr'; did you mean 'strchr'?
char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
                                                                ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:75:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:94:49: error: unknown type name 'size_t'
void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
                                                ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:96:46: error: unknown type name 'size_t'
const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
                                             ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:98:46: error: unknown type name 'size_t'
      void* memchr(      void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
                                             ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:101:74: error: use of undeclared identifier 'strstr'; did you mean 'strchr'?
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                         ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:77:13: note: 'strchr' declared here
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:101:74: error: no matching function for call to 'strchr'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                         ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:77:13: note: candidate disabled: <no message provided>
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:101:81: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                                ^~~~
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:77:32: note: passing argument to parameter '__s' here
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
                               ^
In file included from py/kiwisolver.cpp:8:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/cppy.h:14:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/defines.h:10:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:34:
In file included from /home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/stdlib.h:100:
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:773:12: error: no member named 'labs' in the global namespace; did you mean 'abs'?
  return ::labs(__x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:772:39: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
                                      ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:777:12: error: no member named 'llabs' in the global namespace
  return ::llabs(__x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:785:12: error: no member named 'fabsf' in the global namespace
  return ::fabsf(__lcpp_x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:789:12: error: no member named 'fabs' in the global namespace; did you mean 'abs'?
  return ::fabs(__lcpp_x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:772:39: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
                                      ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:794:12: error: no member named 'fabsl' in the global namespace
  return ::fabsl(__lcpp_x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:808:34: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                 ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:809:12: error: no member named 'ldiv' in the global namespace
  return ::ldiv(__x, __y);
         ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:

Traceback (most recent call last):
  File "/home/neizvestnyj/anaconda3/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/neizvestnyj/anaconda3/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1297, in <module>
    main()
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 731, in __init__
    getattr(self, command)(args)
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 213, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 528, in build_recipes
    recipe.build_arch(arch)
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1011, in build_arch
    self.build_compiled_components(arch)
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 1022, in build_compiled_components
    shprint(hostpython, 'setup.py', self.build_cmd, '-v',
  File "/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/home/neizvestnyj/.local/lib/python3.9/site-packages/sh.py", line 953, in next
    self.wait()
  File "/home/neizvestnyj/.local/lib/python3.9/site-packages/sh.py", line 879, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/neizvestnyj/.local/lib/python3.9/site-packages/sh.py", line 905, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/python3 setup.py build_ext -v

  STDOUT:
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/dist.py:461: UserWarning: Normalizing '1.2.0.dev' to '1.2.0.dev0'
  warnings.warn(tmpl.format(**locals()))
running build_ext
building 'kiwisolver' extension
creating build
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/py
/usr/bin/ccache /home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include -I/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/inc
[log.txt](https://github.com/kivy/python-for-android/files/9004191/log.txt)
lude -frtti -fexceptions -DANDROID -I/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/myapp/arm64-v8a/include/python3.8 -I/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include -fPIC -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include -I. -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build -c py/kiwisolver.cpp -o build/temp.linux-x86_64-3.8/py/kiwisolver.o -std=c++11
In file included from py/kiwisolver.cpp:8:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/cppy.h:14:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/defines.h:10:
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:14:2: error: "Something's broken.  UCHAR_MAX should be defined in limits.h."
#error "Something's broken.  UCHAR_MAX should be defined in limits.h."
 ^
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:18:2: error: "Python's source code assumes C's unsigned char is an 8-bit type."
#error "Python's source code assumes C's unsigned char is an 8-bit type."
 ^
/home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
#   error "Python.h requires that stdio.h define NULL."
    ^
In file included from py/kiwisolver.cpp:8:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/cppy.h:14:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/defines.h:10:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:30:
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:73:64: error: use of undeclared identifier 'strchr'
char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
                                                               ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:80:75: error: use of undeclared identifier 'strpbrk'
char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
                                                                          ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:87:65: error: use of undeclared identifier 'strrchr'; did you mean 'strchr'?
char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
                                                                ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:75:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:94:49: error: unknown type name 'size_t'
void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
                                                ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:96:46: error: unknown type name 'size_t'
const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
                                             ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:98:46: error: unknown type name 'size_t'
      void* memchr(      void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
                                             ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:101:74: error: use of undeclared identifier 'strstr'; did you mean 'strchr'?
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                         ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:77:13: note: 'strchr' declared here
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:101:74: error: no matching function for call to 'strchr'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                         ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:77:13: note: candidate disabled: <no message provided>
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
            ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:101:81: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
                                                                                ^~~~
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/string.h:77:32: note: passing argument to parameter '__s' here
      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
                               ^
In file included from py/kiwisolver.cpp:8:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/cppy.h:14:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/cppy/include/cppy/defines.h:10:
In file included from /home/neizvestnyj/AndroidApps/Test/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/python3/arm64-v8a__ndk_target_21/python3/Include/Python.h:34:
In file included from /home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/stdlib.h:100:
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:773:12: error: no member named 'labs' in the global namespace; did you mean 'abs'?
  return ::labs(__x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:772:39: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
                                      ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:777:12: error: no member named 'llabs' in the global namespace
  return ::llabs(__x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:785:12: error: no member named 'fabsf' in the global namespace
  return ::fabsf(__lcpp_x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:789:12: error: no member named 'fabs' in the global namespace; did you mean 'abs'?
  return ::fabs(__lcpp_x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:772:39: note: 'abs' declared here
inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
                                      ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:794:12: error: no member named 'fabsl' in the global namespace
  return ::fabsl(__lcpp_x);
         ~~^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:808:34: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
                                 ^
/home/neizvestnyj/.buildozer/android/platform/android-ndk-r23b/sources/cxx-stl/llvm-libc++/include/math.h:809:12: error: no member named 'ldiv' in the global namespace
  return ::ldiv(__x, __y);
         ~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/ccache' failed with exit status 1

log.txt

@misl6
Copy link
Member

misl6 commented Jun 28, 2022

Hi @Neizvestnyj ,

Did you had a chance to test #2586 ? It includes a lot of fixes, including one for matplotlib, that may target the issue you're encountering.

@Neizvestnyj
Copy link
Contributor Author

Neizvestnyj commented Jun 28, 2022

matplotlib works fine, but I get this error

[INFO]:    Building lapack for armeabi-v7a
[INFO]:    -> directory context /home/neizvestnyj/AndroidApps/<APP>/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/lapack/armeabi-v7a__ndk_target_21/lapack/build
Traceback (most recent call last):
  File "/home/neizvestnyj/anaconda3/envs/<APP>/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/neizvestnyj/anaconda3/envs/<APP>/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/toolchain.py", line 1297, in <module>
    main()
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/toolchain.py", line 731, in __init__
    getattr(self, command)(args)
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/toolchain.py", line 154, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/toolchain.py", line 213, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/build.py", line 528, in build_recipes
    recipe.build_arch(arch)
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/recipes/lapack/__init__.py", line 39, in build_arch
    env = self.get_recipe_env(arch)
  File "/home/neizvestnyj/AndroidApps/p4a/misl6-p4a/pythonforandroid/recipes/lapack/__init__.py", line 25, in get_recipe_env
    sysroot = f"{self.ctx.ndk_dir}/platforms/{env['NDK_API']}/{arch.platform_dir}"
AttributeError: 'ArchARMv7_a' object has no attribute 'platform_dir'

@misl6
Copy link
Member

misl6 commented Jun 28, 2022

I guess that #2615 needs to be ported to the WIP PR I previously mentioned.

Hopefully, after a pyjnius release (that was postponed due to an issue with PyPy) I will be able to resume the WIP PR, in order to get it merged and well-integrated with all the latest changes.

ETA is this weekend 🤞

@misl6
Copy link
Member

misl6 commented Jul 14, 2022

Fixed via #2586, feel free to re-open the issue if you're still encountering it on the develop branch.

@misl6 misl6 closed this as completed Jul 14, 2022
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

2 participants