Skip to first unread message

David Nierman

unread,
May 1, 2019, 8:18:05 PM5/1/19
to Kivy users support
I receive the following error message when trying to create an APK using Buildozer:

/Users/FiveStars.User/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lpython3.7m

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:51: error: undefined reference to 'PyModule_Create2'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:158: error: undefined reference to 'Py_SetProgramName'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:164: error: undefined reference to 'PyImport_AppendInittab'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:197: error: undefined reference to 'Py_DecodeLocale'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:198: error: undefined reference to 'Py_SetPath'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:209: error: undefined reference to 'Py_Initialize'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:226: error: undefined reference to 'PyEval_InitThreads'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:232: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:238: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:244: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:260: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:370: error: undefined reference to 'PyRun_SimpleFileExFlags'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:373: error: undefined reference to 'PyErr_Occurred'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:375: error: undefined reference to 'PyErr_Print'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:376: error: undefined reference to 'PySys_GetObject'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:377: error: undefined reference to 'PyFile_WriteString'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:379: error: undefined reference to 'PyErr_Clear'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:406: error: undefined reference to 'Py_FinalizeEx'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:35: error: undefined reference to '_PyArg_ParseTuple_SizeT'

/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/jni/application/src/start.c:0: error: undefined reference to '_Py_NoneStruct'

clang++: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [/Users/FiveStars.User/Desktop/testapp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/obj/local/armeabi-v7a/libmain.so] Error 1



  STDERR:


# Command failed: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/FiveStars.User/Desktop/testapp/.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

Mabel Calim Costa

unread,
May 14, 2019, 1:39:21 PM5/14/19
to Kivy users support
Hi,

I'm also have the same problem! 
I'm using:

MACOSX : 10.14.4
Python:3.7


make: *** [/Users/Mabel/work/LEGEC/draft4/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3/obj/local/armeabi-v7a/libmain.so] Error 1



  STDERR:


# Command failed: /usr/local/opt/python/bin/python3.7 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/Mabel/work/LEGEC/draft4/.buildozer/android/platform/build" --ndk-api=21

# ENVIRONMENT:

#     TERM = 'xterm-256color'

#     SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.dY9FTF865P/Listeners'

#     PATH = '/var/root/.buildozer/android/platform/apache-ant-1.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands'

#     LANG = 'pt_BR.UTF-8'

#     HOME = '/var/root'

#     MAIL = '/var/mail/root'

#     LOGNAME = 'root'

#     USER = 'root'

#     USERNAME = 'root'

#     SHELL = '/bin/sh'

#     SUDO_COMMAND = '/usr/local/bin/python3.7 -m buildozer android debug'

#     SUDO_USER = 'Mabel'

#     SUDO_UID = '501'

#     SUDO_GID = '20'

#     __CF_USER_TEXT_ENCODING = '0x0:0:71'

#     __PYVENV_LAUNCHER__ = '/usr/local/bin/python3.7'

#     PACKAGES_PATH = '/var/root/.buildozer/android/packages'

#     ANDROIDSDK = '/var/root/.buildozer/android/platform/android-sdk'

#     ANDROIDNDK = '/var/root/.buildozer/android/platform/android-ndk-r17c'

#     ANDROIDAPI = '27'

#     ANDROIDMINAPI = '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


It's Okay

unread,
May 19, 2019, 7:39:26 PM5/19/19
to kivy-...@googlegroups.com
Hi Mabel,

Inside your buildozer.spec file have you set log level to 2? 

If you haven’t, do so and repeat the error and post it here with extra information. 

Normally a log level 2 will indicate a dependency issue or perhaps the device you are attempting to build to is not the correct API level.

So from what I can see it could be a python for android error. But I’d need to see more detailed logs to assist further. 

Michael. 

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/e037fb30-077b-46c3-9ebf-8d472aebbe1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mabel Calim Costa

unread,
May 21, 2019, 10:51:48 AM5/21/19
to kivy-...@googlegroups.com
Hi,

Thanks for your reply.
I'm testing different SDK versions and different arch, and I found different issues so far:

r17c - armeabi-v7a

[WARNING]: lld not found, linking without it. Consider installing lld if linker errors occur.

clang++: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/obj/local/armeabi-v7a/libmain.so] Error 1 

r19c  x86_64 --> here was missing the prebuilts of gcc that I did downloaded from github 

[WARNING]: lld not found, linking without it. Consider installing lld if linker errors occur.

 checking for x86_64-linux-android-gcc... /Volumes/HD_Mabel/APP/NDK/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang -target x86_64-none-linux-android -gcc-toolchain /Volumes/HD_Mabel/APP/NDK/android-ndk-r19c/toolchains/x86_64-4.9/prebuilt/darwin-x86_64

checking whether the C compiler works... no

configure: error: in `/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/other_builds/python2/x86_64__ndk_target_26/python2/android-build':

configure: error: C compiler cannot create executables

See `config.log' for more details


I don't know what to do anymore.

Please, help me!
Thanks a lot for you attention
Mabel

_____________________________________
Mabel Calim Costa


You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/MX4APj5d1vI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.
buildozer.spec
r17c_fail_log.rtf

It's Okay

unread,
May 21, 2019, 7:54:47 PM5/21/19
to kivy-...@googlegroups.com
Okay. I had a look. It’s a big log lol lots to read. 

 - - this is where it starts (the error)

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/obj/local/armeabi-v7a/libSDL2.so  -gcc-toolchain /private/var/root/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64 -no-canonical-prefixes -target armv7-none-linux-androideabi24 -Wl,--fix-cortex-a8 -L/


//Here too//


Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a__ndk_target_24/python2/android-build -Wl,--build-id -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings   -L/private/var/root/.buildozer/android/platform/android-ndk-r17c/platforms/android-24/arch-arm/usr/lib -lGLESv1_CM -lGLESv2 -llog -lpython2.7 -lstdc++ -lc -lm -o <——- here too. 


/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/obj/local/armeabi-v7a/libmain.so



/private/var/root/.buildozer/android/platform/android-ndk-r17c/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lpython2.7 <——— seems here I think. 



///// Below there are Py_Things errors. //////


#### I’m not completely sure as I’m not familiar with this SDK but it seems lpython2.7 and lpython2.7 -lstdc++ -lc -lm -o could be an issue. Find out more about anything you can install dependency wise for this lpython2.7. Don’t be shy about it. Install everything you can. Using brew or pip #######


#### Below are lots of undefined references. I’m not entirely sure how you acquire those but I would say it’s a dependency problem. It usually always is. #####


#### I’m not sure either oh your syntax being used. But to me it looks python 2.7 specific t missing modules. Google some more but that’s the best I can do right now. Google module names and the errors you get below. Just the error not all the other bits. Anyway, if I can help more let me know. I would just start with what I’ve mentioned and try again #####


/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:55: error: undefined reference to 'Py_InitModule4'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:156: error: undefined reference to 'Py_SetProgramName'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:209: error: undefined reference to 'Py_Initialize'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:216: error: undefined reference to 'PySys_SetPath'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:218: error: undefined reference to 'PySys_SetArgv'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:226: error: undefined reference to 'PyEval_InitThreads'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:55: error: undefined reference to 'Py_InitModule4'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:232: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:238: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:244: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:260: error: undefined reference to 'PyRun_SimpleStringFlags'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:370: error: undefined reference to 'PyRun_SimpleFileExFlags'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:373: error: undefined reference to 'PyErr_Occurred'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:375: error: undefined reference to 'PyErr_Print'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:376: error: undefined reference to 'PySys_GetObject'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:377: error: undefined reference to 'PyFile_WriteString'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:379: error: undefined reference to 'PyErr_Clear'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:403: error: undefined reference to 'Py_Finalize'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:0: error: undefined reference to 'Py_NoSiteFlag'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:35: error: undefined reference to '_PyArg_ParseTuple_SizeT'

/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni/application/src/start.c:0: error: undefined reference to '_Py_NoneStruct'

clang++: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/obj/local/armeabi-v7a/libmain.so] Error 1



  STDERR:


# Command failed: /usr/local/opt/python/bin/python3.7 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python2,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/Mabel/work/LEGEC/draft4_android/.buildozer/android/platform/build" --ndk-api=24


Hinglam Ng

unread,
Jun 7, 2019, 7:24:59 AM6/7/19
to Kivy users support
Hi! Did you fix this problem now ?Now I have the same trouble here.Some one tell me to install the LLVM, I do it, but it doesn't work.If you fix it, please tell me the way how to fix it.My email is nghing...@gmail.com

Mabel Calim Costa

unread,
Jun 7, 2019, 9:32:50 AM6/7/19
to kivy-...@googlegroups.com
Hi Hinglam,
No, I can't fixed this problem on OSX. I really struggle in this task for over 3 weeks, and nothing.
I decide to go back to linux and run my app for android from there. This is the best choice if you have a deadline to fulfill.
If you decide to do the same I can give you some tips to make it work. 
Best regards
Mabel

_____________________________________
Mabel Calim Costa

On Fri, 7 Jun 2019 at 08:25, Hinglam Ng <nghing...@gmail.com> wrote:
Hi! Did you fix this problem now ?Now I have the same trouble here.Some one tell me to install the LLVM, I do it, but it doesn't work.If you fix it, please tell me the way how to fix it.My email is nghing...@gmail.com

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/MX4APj5d1vI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.

Hinglam Ng

unread,
Jun 8, 2019, 1:58:12 PM6/8/19
to Kivy users support
how about use the same way on OSX?

在 2019年6月7日星期五 UTC+8下午9:32:50,Mabel Calim Costa写道:
Hi Hinglam,
No, I can't fixed this problem on OSX. I really struggle in this task for over 3 weeks, and nothing.
I decide to go back to linux and run my app for android from there. This is the best choice if you have a deadline to fulfill.
If you decide to do the same I can give you some tips to make it work. 
Best regards
Mabel

_____________________________________
Mabel Calim Costa


On Fri, 7 Jun 2019 at 08:25, Hinglam Ng <nghing...@gmail.com> wrote:
Hi! Did you fix this problem now ?Now I have the same trouble here.Some one tell me to install the LLVM, I do it, but it doesn't work.If you fix it, please tell me the way how to fix it.My email is nghing...@gmail.com

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/MX4APj5d1vI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-...@googlegroups.com.

Mabel Calim Costa

unread,
Jun 11, 2019, 7:28:14 AM6/11/19
to kivy-...@googlegroups.com
Hi Hinglam,

You can give a try! Unfortunately, I have no memory left in my macbook, so this is one  of my problems to deal with buildozer.
In the linux machine  it works using this set of data:
* java8 (jdk)
* buildozer downloaded from git
* cython =0.25 
* download SDK manually: build-tools
                                         platforms
                                         platforms-tools
                                         tools
In buildozer (SDK path = /home/SDK/) put the directory in which you save the SDK tools.
* python2.7 - it works just for a python2 requirements.

If you succeed in this attempt, let me know!
I hope to hear from you soon.
Best regards
Mabel

_____________________________________
Mabel Calim Costa

To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

To post to this group, send email to kivy-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kivy-users.

Robert Flatt

unread,
Jun 11, 2019, 1:28:49 PM6/11/19
to Kivy users support
Here are some more detailed instructions, for a related task.
These are not what you want as they are Linux/Android/Python3/p4a
But they do show how to download and build the Google SDK, jdk8, etc.

Reply all
Reply to author
Forward
0 new messages