Closed fengboZ closed 10 months ago
Thanks for the report. It could be helpful to share more context of the log. Anyway yes it's weird it's looking into "/usr/local/include/python3.7m/pyconfig.h" for host python, I would have assumed it should pick up the one downloaded for local build (.buildozer/android/platform/build-*/build/other_builds/hostpython3/desktop/hostpython3/)
@AndreMiras
Logs:
[INFO]: # Building recipes
[INFO]: Building hostpython3 for armeabi-v7a
[INFO]: -> directory context /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3
[INFO]: -> directory context /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build
[INFO]: <- directory context /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3
[INFO]: -> running cp Modules/Setup.dist /Users/fengbo/Documents/seni...(and 137 more)
[INFO]: -> running make -j 16 -C /Users/fengbo/Documents/seniorProjec...(and 115 more)
Exception in thread background thread for pid 966:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, *self._kwargs)
File "/Users/fengbo/Documents/seniorProject/kivy/lib/python3.7/site-packages/sh.py", line 1540, in wrap
fn(args, **kwargs)
File "/Users/fengbo/Documents/seniorProject/kivy/lib/python3.7/site-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/Users/fengbo/Documents/seniorProject/kivy/lib/python3.7/site-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/Users/fengbo/Documents/seniorProject/kivy/lib/python3.7/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_2:
RAN: /usr/bin/make -j 16 -C /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build
STDOUT:
/bin/sh /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/makesetup -c /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/config.c.in \
-s Modules \
Modules/Setup.local \
Modules/Setup
The Makefile was updated, you may need to re-run make.
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE \
-DABIFLAGS='"m"' \
-DMULTIARCH=\"darwin\" \
-o Python/sysmodule.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Python/sysmodule.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE \
-DSOABI='"cpython-37m-darwin"' \
-o Python/dynload_shlib.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Python/dynload_shlib.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE -o Modules/config.o Modules/config.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE -DPYTHONPATH='""' \
-DPREFIX='"/usr/local"' \
-DEXEC_PREFIX='"/usr/local"' \
-DVERSION='"3.7"' \
-DVPATH='"/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3"' \
-o Modules/getpath.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/getpath.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE \
-DGITVERSION="\"LC_ALL=C
\"" \
-DGITTAG="\"LC_ALL=C
\"" \
-DGITBRANCH="\"LC_ALL=C
\"" \
-o Modules/getbuildinfo.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/getbuildinfo.c
rm -f libpython3.7m.a
ar rcs libpython3.7m.a Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/dynamic_annotations.o Python/errors.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/context.o Python/hamt.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/_operator.o Modules/_collectionsmodule.o Modules/_abc.o Modules/itertoolsmodule.o Modules/atexitmodule.o Modules/signalmodule.o Modules/_stat.o Modules/timemodule.o Modules/_threadmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/zipimport.o Modules/faulthandler.o Modules/_tracemalloc.o Modules/hashtable.o Modules/symtablemodule.o Modules/xxsubtype.o Python/frozen.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpython3.7m.a(dynamic_annotations.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpython3.7m.a(pymath.o) has no symbols
gcc -Wl,-stack_size,1000000 -framework CoreFoundation -o python.exe Programs/python.o libpython3.7m.a -ldl -framework CoreFoundation
gcc -Wl,-stack_size,1000000 -framework CoreFoundation -o Programs/_testembed Programs/_testembed.o libpython3.7m.a -ldl -framework CoreFoundation
./python.exe -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
CC='gcc' LDSHARED='gcc -bundle -undefined dynamic_lookup ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python.exe -E /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/setup.py build
running build
running build_ext
error: [Errno 2] No such file or directory: '/usr/local/include/python3.7m/pyconfig.h'
make: *** [sharedmods] Error 1
STDERR:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1196, in
RAN: /usr/bin/make -j 16 -C /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/native-build
STDOUT:
/bin/sh /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/makesetup -c /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/config.c.in \
-s Modules \
Modules/Setup.local \
Modules/Setup
The Makefile was updated, you may need to re-run make.
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE \
-DABIFLAGS='"m"' \
-DMULTIARCH=\"darwin\" \
-o Python/sysmodule.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Python/sysmodule.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE \
-DSOABI='"cpython-37m-darwin"' \
-o Python/dynload_shlib.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Python/dynload_shlib.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE -o Modules/config.o Modules/config.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE -DPYTHONPATH='""' \
-DPREFIX='"/usr/local"' \
-DEXEC_PREFIX='"/usr/local"' \
-DVERSION='"3.7"' \
-DVPATH='"/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3"' \
-o Modules/getpath.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/getpath.c
gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -IObjects -IInclude -IPython -I. -I/Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Include -DPy_BUILD_CORE \
-DGITVERSION="\"LC_ALL=C
\"" \
-DGITTAG="\"LC_ALL=C
\"" \
-DGITBRANCH="\"LC_ALL=C
\"" \
-o Modules/getbuildinfo.o /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/Modules/getbuildinfo.c
rm -f libpython3.7m.a
ar rcs libpython3.7m.a Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Parser/myreadline.o Parser/parsetok.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/capsule.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/compile.o Python/codecs.o Python/dynamic_annotations.o Python/errors.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/peephole.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/context.o Python/hamt.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/posixmodule.o Modules/errnomodule.o Modules/pwdmodule.o Modules/_sre.o Modules/_codecsmodule.o Modules/_weakref.o Modules/_functoolsmodule.o Modules/_operator.o Modules/_collectionsmodule.o Modules/_abc.o Modules/itertoolsmodule.o Modules/atexitmodule.o Modules/signalmodule.o Modules/_stat.o Modules/timemodule.o Modules/_threadmodule.o Modules/_localemodule.o Modules/_iomodule.o Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o Modules/textio.o Modules/stringio.o Modules/zipimport.o Modules/faulthandler.o Modules/_tracemalloc.o Modules/hashtable.o Modules/symtablemodule.o Modules/xxsubtype.o Python/frozen.o
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpython3.7m.a(dynamic_annotations.o) has no symbols
/Library/Developer/CommandLineTools/usr/bin/ranlib: file: libpython3.7m.a(pymath.o) has no symbols
gcc -Wl,-stack_size,1000000 -framework CoreFoundation -o python.exe Programs/python.o libpython3.7m.a -ldl -framework CoreFoundation
gcc -Wl,-stack_size,1000000 -framework CoreFoundation -o Programs/_testembed Programs/_testembed.o libpython3.7m.a -ldl -framework CoreFoundation
./python.exe -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
CC='gcc' LDSHARED='gcc -bundle -undefined dynamic_lookup ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python.exe -E /Users/fengbo/Documents/seniorProject/app/.buildozer/android/platform/build-armeabi-v7a/build/other_builds/hostpython3/desktop/hostpython3/setup.py build
running build
running build_ext
error: [Errno 2] No such file or directory: '/usr/local/include/python3.7m/pyconfig.h'
make: *** [sharedmods] Error 1
STDERR:
Would it because I'm using virtual environment created using python?
and after I checked the file path you specified exists, but I have no idea why isn't it picked for local build
Yes, your buildozer run on python2.7, you need to install it in a python3 venv.
are you sure? I think I installed buildozer using the python3 venv, and I can not use buildozer command outside the venv. btw I created this venv using python3 not python2..
hm, it seems i wasn't completly awake earlier, sorry, i must have misread, it's indeed 3.7 all the way in your report, sorry!
It's okay, any clues about how can I fix it and compile it into android on macOS?
So this actually seems to be a recent issue on osx with p4a as it started poping up on our Travis CI recently. https://travis-ci.org/kivy/python-for-android/jobs/651134716 https://travis-ci.org/kivy/python-for-android/jobs/651143394 So yes confirmed bug. Something may have changed in osx env/deps that break things up
Pinning virtualenv seems to help at least on Travis https://github.com/kivy/python-for-android/pull/2063
The fix just got merged on p4a develop branch, give it a try.
You need to update your spec file with p4a.branch = develop
Haven't heard back after 3+ years. Assuming fixed.
Versions
Description
trying to package it to android, ran buildozer android debug command, and following error occurs. I expect to find a way to fix this error and hopefully make an android apk. tried to google it, but mostly there are ways for linux to fix, for max OS they said python already include the dev etc
buildozer.spec
Command:
Spec file:
Logs