configure: error: C compiler cannot create executables

227 views
Skip to first unread message

akash tyagi

unread,
Aug 6, 2017, 5:34:30 AM8/6/17
to Kivy users support
when i run the command "buildozer android debug " to convert a file into apk. it always shows me the error given below:-

[INFO]:    Building python2 for armeabi-v7a
[INFO]:    -> running cp /root/.buildozer/android/pl...(and 161 more)
[INFO]:    -> running cp /root/.buildozer/android/pl...(and 159 more)
[INFO]:    -> directory context /root/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2
[INFO]:    -> running cp /root/.buildozer/android/pl...(and 83 more)
[INFO]:    -> running gcc -dumpmachine
[INFO]:    -> running configure --host=arm-eabi --bu...(and 190 more)         
Exception in thread background thread for pid 1542:                           
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/root/.local/lib/python3.5/site-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/root/.local/lib/python3.5/site-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/root/.local/lib/python3.5/site-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/root/.local/lib/python3.5/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_77:

  RAN: /root/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/configure --host=arm-eabi --build=x86_64-linux-gnu --prefix=/root/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/python-install --enable-shared --disable-toolbox-glue --disable-framework

  STDOUT:
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux4
checking EXTRAPLATDIR...
checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for arm-eabi-gcc... /usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /root/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm
checking whether the C compiler works... no
configure: error: in `/root/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2':
configure: error: C compiler cannot create executables
See `config.log' for more details


  STDERR:


Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 905, in <module>
    main()
  File "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 902, in main
    ToolchainCL()
  File "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 508, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/root/.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 "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/build.py", line 565, in build_recipes
    recipe.build_arch(arch)
  File "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py", line 44, in build_arch
    self.do_python_build(arch)
  File "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/python2/__init__.py", line 124, in do_python_build
    _env=env)
  File "/root/.buildozer/android/platform/python-for-android-master/pythonforandroid/logger.py", line 175, in shprint
    for line in output:
  File "/root/.local/lib/python3.5/site-packages/sh.py", line 863, in next
    self.wait()
  File "/root/.local/lib/python3.5/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/root/.local/lib/python3.5/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_77:

  RAN: /root/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/configure --host=arm-eabi --build=x86_64-linux-gnu --prefix=/root/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/python-install --enable-shared --disable-toolbox-glue --disable-framework

  STDOUT:
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux4
checking EXTRAPLATDIR...
checking machine type as reported by uname -m... x86_64
checking for --without-gcc... no
checking for arm-eabi-gcc... /usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /root/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm
checking whether the C compiler works... no
configure: error: in `/root/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2':
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=kivycrashcourse --bootstrap=sdl2 --requirements=hostpython2,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/root/.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

i Am not getting the solution, please help. I searched many times on google and according to the result i got i replaced hostpython2 with python2 in requirements but it didn't worked for me.
Reply all
Reply to author
Forward
0 new messages