LONG_BIT error static compiling Python3.4.2 for Android

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

LONG_BIT error static compiling Python3.4.2 for Android

lloyd konneker
Using the same scripts and procedures that I used with pyqtdeploy 0.8, now with 0.9 I get:

Configuring
Configuring /Users/bootch/pensoolpyqtdeploy/Downloads/Python-3.4.2 as Python v3.4.2 for android-32
Patching /Users/bootch/pensoolpyqtdeploy/Downloads/Python-3.4.2/Include/unicodeobject.h
pyqtdeploycli: /Users/bootch/pensoolpyqtdeploy/Downloads/Python-3.4.2/Include/unicodeobject.h:2269: line does not match diff context

qmake ing

make ing
/Users/bootch/android-ndk-r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -fwrapv -O3 -fPIC -Wno-psabi -DNDEBUG -DPy_BUILD_CORE -DPLATFORM=\"linux\" -I../../../Qt/5.4/android_armv7/mkspecs/android-g++ -I. -I. -IInclude -I../../../android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.8/include -I../../../android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I../../../android-ndk-r10d/platforms/android-9/arch-arm/usr/include -o .obj/getbuildinfo.o Modules/getbuildinfo.c
In file included from Include/Python.h:50:0,
                 from Modules/getbuildinfo.c:1:
Include/pyport.h:814:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
 #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."
  ^
make: *** [.obj/getbuildinfo.o] Error 1


I will upgrade to pyqtdeploy v0.10 and try again.

host is OSX
Qt5.4
Python3.4.2

_______________________________________________
PyQt mailing list    [hidden email]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: LONG_BIT error static compiling Python3.4.2 for Android

Phil Thompson-5
On 04/02/2015 10:01 pm, lloyd konneker wrote:

> Using the same scripts and procedures that I used with pyqtdeploy 0.8,
> now with 0.9 I get:
>
> Configuring
> Configuring /Users/bootch/pensoolpyqtdeploy/Downloads/Python-3.4.2 as
> Python v3.4.2 for android-32
> Patching
> /Users/bootch/pensoolpyqtdeploy/Downloads/Python-3.4.2/Include/unicodeobject.h
> pyqtdeploycli:
> /Users/bootch/pensoolpyqtdeploy/Downloads/Python-3.4.2/Include/unicodeobject.h:2269:
> line does not match diff context
>
> qmake ing
>
> make ing
> /Users/bootch/android-ndk-r10d/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc
> -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp
> -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums
> -DANDROID -Wa,--noexecstack -fwrapv -O3 -fPIC -Wno-psabi -DNDEBUG
> -DPy_BUILD_CORE -DPLATFORM=\"linux\"
> -I../../../Qt/5.4/android_armv7/mkspecs/android-g++ -I. -I. -IInclude
> -I../../../android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.8/include
> -I../../../android-ndk-r10d/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include
> -I../../../android-ndk-r10d/platforms/android-9/arch-arm/usr/include
> -o .obj/getbuildinfo.o Modules/getbuildinfo.c
> In file included from Include/Python.h:50:0,
>                  from Modules/getbuildinfo.c:1:
> Include/pyport.h:814:2: error: #error "LONG_BIT definition appears
> wrong for platform (bad gcc/glibc config?)."
>  #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc
> config?)."
>   ^
> make: *** [.obj/getbuildinfo.o] Error 1
>
>
> I will upgrade to pyqtdeploy v0.10 and try again.
>
> host is OSX
> Qt5.4
> Python3.4.2

I can't reproduce this.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: LONG_BIT error static compiling Python3.4.2 for Android

lloyd konneker
In reply to this post by lloyd konneker
Please disregard.  It was an error in my procedures: attempting to build (which includes patching) static python twice.  When you build static python for Android for the second time, you should have fresh, unpatched source for python.

Then if you need to hack at the python interpreter (to debug some crash say on Android), you can modify the source and make; make install.  But again, you should not build it using pyqtdeploy a second time, since the second time around, the patching will fail.

Also, you might want a separate copy of the python source for each target platform.  As far as I know, it is only patched for target Android, but after it is patched, it is not clear to me that the patched python source is still valid for other target platforms (in case for any reason you want to rebuild static python for another platform.)  In other words, if you are building static python for many target platforms from one python source directory, the order is important: first build the platforms that don’t patch the source.
_______________________________________________
PyQt mailing list    [hidden email]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: LONG_BIT error static compiling Python3.4.2 for Android

Phil Thompson-5
On 05/02/2015 1:36 pm, lloyd konneker wrote:

> Please disregard.  It was an error in my procedures: attempting to
> build (which includes patching) static python twice.  When you build
> static python for Android for the second time, you should have fresh,
> unpatched source for python.
>
> Then if you need to hack at the python interpreter (to debug some
> crash say on Android), you can modify the source and make; make
> install.  But again, you should not build it using pyqtdeploy a second
> time, since the second time around, the patching will fail.
>
> Also, you might want a separate copy of the python source for each
> target platform.  As far as I know, it is only patched for target
> Android, but after it is patched, it is not clear to me that the
> patched python source is still valid for other target platforms (in
> case for any reason you want to rebuild static python for another
> platform.)  In other words, if you are building static python for many
> target platforms from one python source directory, the order is
> important: first build the platforms that don’t patch the source.

The patched Python source should still be Ok for non-Android platforms.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt