Hi all PyPy-devs, I'm not sure if my error is simply a 64bit issue, and it would work from 32bit linux. Can i simply -DMAX_LONG not to be 64bit and then using the Android NDK gcc (which i think is 32bits) is ok? Or should i recompile Android's NDK gcc so that its 64bits? Almost working example:http://pastebin.com/bjwEh8E7 Error:/home/brett/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /tmp/usession-default-6/obj/local/armeabi/objs/testing_1/testing_1.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/tmp/usession-default-6/jni -DANDROID -I/home/brett/RPythonic/pypy/pypy/translator/c -DPYPY_STANDALONE -Wa,--noexecstack -O2 -DNDEBUG -g -I/home/brett/android-ndk-r5/platforms/android-3/arch-arm/usr/include -c /tmp/usession-default-6/jni/testing_1.c -o /tmp/usession-default-6/obj/local/armeabi/objs/testing_1/testing_1.oIn file included from /home/brett/RPythonic/pypy/pypy/translator/c/src/g_prerequisite.h:7, from /tmp/usession-default-6/jni/common_header.h:44, from /tmp/usession-default-6/jni/testing_1.c:1:/home/brett/RPythonic/pypy/pypy/translator/c/src/commondefs.h:58:6: error: #error "error in LONG_MAX (64-bit sources but a 32-bit compiler?)"/home/brett/RPythonic/pypy/pypy/translator/c/src/commondefs.h:61:6: error: #error "unsupported value for LONG_MIN"/tmp/usession-default-6/jni/testing_1.c:85: error: expected specifier-qualifier-list before 'PyObject'/tmp/usession-default-6/jni/testing_1.c:404: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token/tmp/usession-default-6/jni/testing_1.c:409: error: expected ')' before '*' tokenIn file included from /home/brett/RPythonic/pypy/pypy/translator/c/src/g_include.h:58, from /tmp/usession-default-6/jni/testing_1.c:564: -brett
On Sat, Jan 15, 2011 at 03:09, Hart's Antler <bhartsho@yahoo.com> wrote:
Hi all PyPy-devs, I'm not sure if my error is simply a 64bit issue, and it would work from 32bit linux. Can i simply -DMAX_LONG not to be 64bit and then using the Android NDK gcc (which i think is 32bits) is ok?
Or should i recompile Android's NDK gcc so that its 64bits? Maybe I missed something, but is that even possible? Your toolchain seems to target ARM, and according to common sense and Wikipedia [1]
I guess MAX_LONG is calculated internally. You probably need to use a different Python interpreter, a 32bit one, to build PyPy (instructions on the website). If none is available, you need to build one from scratch. Given that you're cross-compiling PyPy, I wonder whether Python on ARM (the one you'd use in a non-cross-platform build) is any different from Python on x86, and if this difference is important; surely it is different from Python on x86_64, as you noticed. there are no 64bit ARM processors. It seems that Android supports other target architectures, even x86 it seems, still I doubt the existence of 64bit phones :-D. [1] http://en.wikipedia.org/wiki/ARM_architecture
Almost working example: http://pastebin.com/bjwEh8E7 Error: /home/brett/android-ndk-r5/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc -MMD -MP -MF /tmp/usession-default-6/obj/local/armeabi/objs/testing_1/testing_1.o.d -fpic -ffunction-sections -funwind-tables -fstack-protector -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -I/tmp/usession-default-6/jni -DANDROID -I/home/brett/RPythonic/pypy/pypy/translator/c -DPYPY_STANDALONE -Wa,--noexecstack -O2 -DNDEBUG -g -I/home/brett/android-ndk-r5/platforms/android-3/arch-arm/usr/include -c /tmp/usession-default-6/jni/testing_1.c -o /tmp/usession-default-6/obj/local/armeabi/objs/testing_1/testing_1.o In file included from /home/brett/RPythonic/pypy/pypy/translator/c/src/g_prerequisite.h:7, from /tmp/usession-default-6/jni/common_header.h:44, from /tmp/usession-default-6/jni/testing_1.c:1: /home/brett/RPythonic/pypy/pypy/translator/c/src/commondefs.h:58:6: error: #error "error in LONG_MAX (64-bit sources but a 32-bit compiler?)" /home/brett/RPythonic/pypy/pypy/translator/c/src/commondefs.h:61:6: error: #error "unsupported value for LONG_MIN" /tmp/usession-default-6/jni/testing_1.c:85: error: expected specifier-qualifier-list before 'PyObject' /tmp/usession-default-6/jni/testing_1.c:404: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /tmp/usession-default-6/jni/testing_1.c:409: error: expected ')' before '*' token In file included from /home/brett/RPythonic/pypy/pypy/translator/c/src/g_include.h:58, from /tmp/usession-default-6/jni/testing_1.c:564:
-brett
_______________________________________________ pypy-dev@codespeak.net http://codespeak.net/mailman/listinfo/pypy-dev
-- Paolo Giarrusso - Ph.D. Student http://www.informatik.uni-marburg.de/~pgiarrusso/
participants (2)
-
Hart's Antler
-
Paolo Giarrusso