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

C compiler cannot create executables #1735

Closed
ghost opened this issue Mar 1, 2019 · 1 comment
Closed

C compiler cannot create executables #1735

ghost opened this issue Mar 1, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 1, 2019

I'm trying to generate an APK via buildozer, but this error ocurred:

[INFO]:    Building python3 for armeabi-v7a
[INFO]:    -> directory context /home/tiago/Documentos/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/android-build
[WARNING]: Doing some hacky stuff to link properly
[INFO]:    -> running cp /home/tiago/.buildozer/andr...(and 84 more)
[INFO]:    -> running cp /home/tiago/.buildozer/andr...(and 82 more)
[INFO]:    Activating flags for sqlite3
[INFO]:    Activating flags for libffi
[INFO]:    Activating flags for openssl
[INFO]:    -> running configure --host=arm-linux-and...(and 348 more)
Exception in thread background thread for pid 7197:                            
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tiago/.local/lib/python3.6/site-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/home/tiago/.local/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/home/tiago/.local/lib/python3.6/site-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/tiago/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_77: 

  RAN: /home/tiago/Documentos/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/configure --host=arm-linux-androideabi --build=x86_64-pc-linux-gnu --enable-shared --disable-ipv6 ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no --without-ensurepip ac_cv_little_endian_double=yes --prefix=/usr/local --exec-prefix=/usr/local --with-openssl=/home/tiago/Documentos/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a__ndk_target_21/openssl1.1

  STDOUT:
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-unknown-linux-androideabi
checking for python3.7... no
checking for python3... python3
checking for python interpreter for cross build... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for arm-linux-androideabi-gcc... /home/tiago/.buildozer/android/platform/android-ndk-r17c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-none-linux-androideabi -gcc-toolchain /home/tiago/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
checking whether the C compiler works... no
configure: error: in `/home/tiago/Documentos/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/android-build':
configure: error: C compiler cannot create executables
See `config.log' for more details


  STDERR:


Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1073, in <module>
    main()
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1067, in main
    ToolchainCL()
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 576, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 151, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 200, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 562, in build_recipes
    recipe.build_arch(arch)
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/python.py", line 248, in build_arch
    _env=env)
  File "/home/tiago/Documentos/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 178, in shprint
    for line in output:
  File "/home/tiago/.local/lib/python3.6/site-packages/sh.py", line 863, in next
    self.wait()
  File "/home/tiago/.local/lib/python3.6/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/tiago/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_77: 

  RAN: /home/tiago/Documentos/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/configure --host=arm-linux-androideabi --build=x86_64-pc-linux-gnu --enable-shared --disable-ipv6 ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no --without-ensurepip ac_cv_little_endian_double=yes --prefix=/usr/local --exec-prefix=/usr/local --with-openssl=/home/tiago/Documentos/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a__ndk_target_21/openssl1.1

  STDOUT:
checking build system type... x86_64-pc-linux-gnu
checking host system type... arm-unknown-linux-androideabi
checking for python3.7... no
checking for python3... python3
checking for python interpreter for cross build... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for arm-linux-androideabi-gcc... /home/tiago/.buildozer/android/platform/android-ndk-r17c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -target armv7a-none-linux-androideabi -gcc-toolchain /home/tiago/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64
checking whether the C compiler works... no
configure: error: in `/home/tiago/Documentos/.buildozer/android/platform/build/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/android-build':
configure: error: C compiler cannot create executables
See `config.log' for more details


  STDERR:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=rainhaapp --bootstrap=sdl2 --requirements=kivy,sqlite3,psycopg2,datetime,python3 --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/tiago/Documentos/.buildozer/android/platform/build" --ndk-api=21
# 
# 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

My requirements are kivy, psycopg2, python3, sqlite3 and datetime. I'm trying to compile to Android API 27 and NDK 17c. How can I fix it?

@AndreMiras
Copy link
Member

Can't say much without the config.log or buildozer.spec file.
Keep in mind this is a bug tracker, if what you're looking for is actually support give this a try instead https://github.com/kivy/python-for-android#support

@ghost ghost closed this as completed Mar 5, 2019
This issue was closed.
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

1 participant