Bug 5666 - Fails to build python 2.7.2 for 2440 arm
Summary: Fails to build python 2.7.2 for 2440 arm
Status: RESOLVED WORKSFORME
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2012.08
Hardware: PC Linux
: P5 blocker
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-12 12:28 UTC by hardcorefs
Modified: 2012-11-12 22:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
example of broken python build (27.12 KB, application/octet-stream)
2012-11-12 13:04 UTC, hardcorefs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hardcorefs 2012-11-12 12:28:48 UTC
The build process for  Python under the samsung cpu 2440 fails to build with the following error


bob@bob-virtual-machine:~/buildroot-2012.08$ make
>>> python 2.7.2 Building
PATH="/home/bob/buildroot-2012.08/output/host/bin:/home/bob/buildroot-2012.08/output/host/usr/bin:/home/bob/buildroot-2012.08/output/host/usr/sbin/:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" PERLLIB="/home/bob/buildroot-2012.08/output/host/usr/lib/perl" PYTHON_MODULES_INCLUDE=/home/bob/buildroot-2012.08/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/include PYTHON_MODULES_LIB="/home/bob/buildroot-2012.08/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/lib /home/bob/buildroot-2012.08/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/usr/lib" /usr/bin/make -j2  -C /home/bob/buildroot-2012.08/output/build/python-2.7.2/
make[1]: Entering directory `/home/bob/buildroot-2012.08/output/build/python-2.7.2'
/home/bob/buildroot-2012.08/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc -c -fno-strict-aliasing  -pipe -Os  -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include  -fPIC -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c
/home/bob/buildroot-2012.08/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-gcc -c -fno-strict-aliasing  -pipe -Os  -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include  -fPIC -DPy_BUILD_CORE -o Parser/acceler.o Parser/acceler.c
In file included from Include/Python.h:85:0,
                 from ./Modules/python.c:3:
Include/unicodeobject.h:575:20: warning: type defaults to 'int' in declaration of 'wchar_t'
Include/unicodeobject.h:575:28: error: expected ';', ',' or ')' before '*' token
Include/unicodeobject.h:593:14: warning: type defaults to 'int' in declaration of 'wchar_t'
Include/unicodeobject.h:593:22: error: expected ';', ',' or ')' before '*' token
In file included from Include/Python.h:85:0,
                 from Include/pgenheaders.h:10,
                 from Parser/acceler.c:13:
Include/unicodeobject.h:575:20: warning: type defaults to 'int' in declaration of 'wchar_t'
Include/unicodeobject.h:575:28: error: expected ';', ',' or ')' before '*' token
Include/unicodeobject.h:593:14: warning: type defaults to 'int' in declaration of 'wchar_t'
Include/unicodeobject.h:593:22: error: expected ';', ',' or ')' before '*' token
make[1]: *** [Modules/python.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Parser/acceler.o] Error 1
make[1]: Leaving directory `/home/bob/buildroot-2012.08/output/build/python-2.7.2'
make: *** [/home/bob/buildroot-2012.08/output/build/python-2.7.2/.stamp_built] Error 2
bob@bob-virtual-machine:~/buildroot-2012.08$
Comment 1 Thomas Petazzoni 2012-11-12 12:38:00 UTC
Could you please share your Buildroot .config ?
Comment 2 hardcorefs 2012-11-12 13:04:07 UTC
Created attachment 4622 [details]
example of broken python build
Comment 3 Thomas Petazzoni 2012-11-12 14:34:59 UTC
Ok. My guess is that:

*) You built once without WCHAR support in the toolchain (BR2_USE_WCHAR not enabled)

*) You went back in menuconfig, enabled Python. But to do this, you enabled WCHAR support in the toolchain. And then, instead of doing a complete "make clean all" cycle that ensures the toolchain gets rebuilt, you just did "make". So it tried to build Python without rebuilding the toolchain, leading to your error.

I'm pretty sure that the problem will go away if you do a "make clean all" cycle. I tested your configuration here and it built just fine.
Comment 4 hardcorefs 2012-11-12 22:32:37 UTC
HI,
Yep you are indeed a fortune teller........
Did "make clean all" and it did solve the problem, just it extends the build time every time.