Python2.7 Compilation issue with NDK16

381 views
Skip to first unread message

Sunil Singh

unread,
Feb 5, 2018, 10:26:43 AM2/5/18
to android-ndk
Hi,

I am facing issue in compiling python2.7 with android NDK16. following is the issue:
arm-linux-androideabi-gcc --sysroot /home/sunil/sunil/android-ndk-r16b/my-toolchain/sysroot -Xlinker -export-dynamic -o python \
            Modules/python.o \
            libpython2.7.a -ldl    -lm 
Modules/main.c:181: error: undefined reference to 'stderr'
Modules/main.c:308: error: undefined reference to 'stpcpy'
Modules/main.c:634: error: undefined reference to 'stdin'
Modules/main.c:634: error: undefined reference to 'stderr'
Modules/main.c:634: error: undefined reference to 'stdout'
Parser/parsetok.c:239: error: undefined reference to 'stderr'
Parser/parsetok.c:239: error: undefined reference to 'stderr'
Parser/tokenizer.c:941: error: undefined reference to 'stdin'
Parser/tokenizer.c:941: error: undefined reference to 'stdout'
Objects/fileobject.c:741: error: undefined reference to 'ftello64'
Objects/fileobject.c:741: error: undefined reference to 'ftello64'
Objects/fileobject.c:698: error: undefined reference to 'fseeko64'
Objects/fileobject.c:698: error: undefined reference to 'fseeko64'
Objects/obmalloc.c:616: error: undefined reference to 'mmap64'
Objects/stringlib/localeutil.h:205: error: undefined reference to 'localeconv'
Objects/stringobject.c:385: error: undefined reference to 'stpcpy'
Python/import.c:1471: error: undefined reference to 'stpcpy'
Python/import.c:1471: error: undefined reference to 'stpcpy'
Python/pythonrun.c:1036: error: undefined reference to 'stdout'
Python/pythonrun.c:1205: error: undefined reference to 'stdout'
Python/pythonrun.c:307: error: undefined reference to 'nl_langinfo'
Python/pythonrun.c:1907: error: undefined reference to 'sigemptyset'
Python/pythonrun.c:1907: error: undefined reference to 'sigemptyset'
Python/pythonrun.c:307: error: undefined reference to 'nl_langinfo'
Python/pythonrun.c:1907: error: undefined reference to 'sigemptyset'
Python/sysmodule.c:1386: error: undefined reference to 'stdin'
Python/pystrtod.c:378: error: undefined reference to 'localeconv'
Python/pystrtod.c:141: error: undefined reference to 'localeconv'
Python/../Objects/stringlib/formatter.h:643: error: undefined reference to 'localeconv'
./Modules/signalmodule.c:808: error: undefined reference to '__libc_current_sigrtmin'
./Modules/signalmodule.c:813: error: undefined reference to '__libc_current_sigrtmax'
./Modules/_localemodule.c:546: error: undefined reference to 'nl_langinfo'
./Modules/mmapmodule.c:1231: error: undefined reference to 'mmap64'

Any suggestion/inputs.

Thanks,
Sunil

Dan Albert

unread,
Feb 5, 2018, 12:49:14 PM2/5/18
to android-ndk
Have you tried Clang? Standalone toolchains don't work with GCC out of the box.

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/43c366ab-7c05-4f73-a902-6ca7b9d9fa2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages