Hey,
Has anyone compiled python 2.7 using LTIB for imx35?
I have attached the spec file
These are the errors I get:
In file included from Include/Python.h:58,
from ./Modules/python.c:3:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
In file included from Include/Python.h:58,
from Parser/grammar1.c:4:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
In file included from Include/Python.h:58,
from Include/pgenheaders.h:10,
from Parser/acceler.c:13:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
In file included from Include/Python.h:58,
from Parser/node.c:3:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
In file included from Include/Python.h:58,
from Parser/parser.c:8:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
In file included from Include/Python.h:58,
from Include/pgenheaders.h:10,
from Parser/listnode.c:4:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
In file included from Include/Python.h:58,
from Include/pgenheaders.h:10,
from Parser/bitset.c:4:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
In file included from Include/Python.h:58,
from Include/pgenheaders.h:10,
from Parser/parsetok.c:4:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
make: *** [Modules/python.o] Error 1
I used the build commands spec file from this link
Re: [Ltib] Building Python 2.7
I don't understand if this error is related to the python source or the arm tools used by ltib. Can someone please help?
Has anyone compiled python successfully? if so, what am I doing wrong?
Original Attachment has been moved to: Python-2.7.3.spec.zip
It is not the same problem but try the proposed solution on this link
Re: "FSL gnome release package" build fails at python build stage
Thanks Leonardo,
Unfortunately that did not work.
I made an interesting observation tho. I looked at the output of the ./configure scripts that created the makefiles.
checking size of size_t... 4
checking size of pid_t... 4
checking for long long support... yes
checking size of long long... 8
checking for long double support... yes
So if it does have support for long long, y doesn't it compile??
Hi Neeraj,
http://www.cnx-software.com/2011/02/04/cross-compiling-python-for-mips-and-arm-platforms/
I think you are not the only one with this issue, but there is patch to solve it. Pyhon on LTIB is on rpm/BUILD/<python> so apply the patch from that folder.
Hi Leonardo,
Thanks for the link.
I got sidetracked on other projects and wasnt able to follow up.
After using the patch I dont get the PY_FORMAT_LONG_LONG error any more.
However,
I get a ton of warning messages and python builds but with some key modules missing.
cc1: warning: include location "/usr/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation
/home/neeraj/Development/Freescale/ltib/rpm/BUILD/Python-2.7.1/Modules/_ctypes/libffi/src/arm/ffi.c:205: warning: function declaration isn't a prototype
/opt/freescale/usr/local/gcc-4.3.3-glibc-2.8-cs2009q1-203/arm-none-linux-gnueabi/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: library search path "/usr/local/lib" is unsafe for cross-compilation
*** WARNING: renaming "_ctypes" since importing it failed: build/lib.linux-i686-2.7/_ctypes.so: cannot open shared object file: No such file or directory
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _hashlib _sqlite3
_tkinter bsddb185 dbm
gdbm sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_multiprocessing _socket linuxaudiodev
ossaudiodev readline select
+ exit 0
Build time for Python-2.7.1: 128 seconds
Line 356 and 357 have hardcoded /usr/local/include and /usr/local/lib
Also get errors like these higher up.
*** WARNING: renaming "dl" since importing it failed: build/lib.linux-i686-2.7/dl.so: cannot open shared object file: No such file or directory
cc1: warning: include location "/usr/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation
/home/neeraj/Development/Freescale/ltib/rpm/BUILD/Python-2.7.1/Modules/_multiprocessing/connection.h: In function 'connection_poll':
/home/neeraj/Development/Freescale/ltib/rpm/BUILD/Python-2.7.1/Modules/_multiprocessing/socket_connection.c:173: error: impossible constraint in 'asm'
cc1: warning: include location "/usr/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation
/home/neeraj/Development/Freescale/ltib/rpm/BUILD/Python-2.7.1/Modules/linuxaudiodev.c: In function 'lad_write':
/home/neeraj/Development/Freescale/ltib/rpm/BUILD/Python-2.7.1/Modules/linuxaudiodev.c:192: error: impossible constraint in 'asm'
cc1: warning: include location "/usr/include" is unsafe for cross-compilation
cc1: warning: include location "/usr/local/include" is unsafe for cross-compilation
/home/neeraj/Development/Freescale/ltib/rpm/BUILD/Python-2.7.1/Modules/ossaudiodev.c: In function 'oss_writeall':
/home/neeraj/Development/Freescale/ltib/rpm/BUILD/Python-2.7.1/Modules/ossaudiodev.c:429: error: impossible constraint in 'asm'
You are compiling python with ltib, right? something like './ltib -p python -scbuild' ? Seems that the header files are being taken from the host filesystem, instead of the ltib filesystem..
Hi neo1, could you please generate a patch instead of the whole .spec? try this
$ cd <original spec folder>
$ git init
$ git add *.spec
$ git commit -m 'first commit'
$ # do your changes here
$ git commit -a -m 'changes'
$ git format-patch -1
then send me the generated .patch file please.