Re: [yocto] Bitbaking python fails

2011-11-12 Thread João Henrique Freitas
Hi,

To fix it in Yocto 1.1.0 I tryed this:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=23d2eaf9d283cae47e52d1151f0d4ad53bbbe8a0

Works, my build host is Ubuntu 11.10 x86.

Thanks


PS: this paths works for me.

diff --git
a/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
new file mode 100644
index 000..aeef78f
--- /dev/null
+++
b/meta/recipes-devtools/python/python/setup_py_skip_cross_import_check.patch
@@ -0,0 +1,19 @@
+Index: Python-2.6.6/setup.py
+===
+--- Python-2.6.6.orig/setup.py2011-11-12 22:54:14.257053822 -0200
 Python-2.6.6/setup.py2011-11-12 22:54:19.701053981 -0200
+@@ -287,6 +287,14 @@
+   (ext.name, sys.exc_info()[1]))
+ self.failed.append(ext.name)
+ return
++# If we're cross-compiling, we want to skip the import check
++# i.e. we shouldn't be dynamically loading target shared libs
++if os.environ.get('CROSS_COMPILE') is not None:
++self.announce(
++ 'WARNING: skipping import check for cross-compiled %s'
%
++ ext.name)
++return
++
+ # Workaround for Mac OS X: The Carbon-based modules cannot be
+ # reliably imported into a command-line Python
+ if 'Carbon' in ext.extra_link_args:
diff --git 
a/meta/recipes-devtools/python/python_2.6.6.bbb/meta/recipes-devtools/python/
python_2.6.6.bb
index aa7ec3c..3f12576 100644
--- a/meta/recipes-devtools/python/python_2.6.6.bb
+++ b/meta/recipes-devtools/python/python_2.6.6.bb
@@ -21,6 +21,7 @@ SRC_URI = \
   file://multilib.patch \
   file://security_issue_2254_fix.patch \
   file://cgi_py.patch \
+  file://setup_py_skip_cross_import_check.patch \
 

 SRC_URI[md5sum] = cf4e6881bb84a7ce6089e4a307f71f14
@@ -61,6 +62,8 @@ do_compile() {
 # then call do_install twice we get Makefile.orig == Makefile.sysroot
 install -m 0644 Makefile Makefile.sysroot

+export CROSS_COMPILE=${TARGET_PREFIX}
+
 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \
 STAGING_LIBDIR=${STAGING_LIBDIR} \
@@ -82,6 +85,8 @@ do_install() {
 # make install needs the original Makefile, or otherwise the inclues
would
 # go to ${D}${STAGING...}/...
 install -m 0644 Makefile.orig Makefile
+
+export CROSS_COMPILE=${TARGET_PREFIX}

 oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/pgen \
 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python \


-- 
---
João Henrique Freitas - joaohf_at_gmail.com
Campinas-SP-Brasil
BSD051283
LPI 1
http://www.joaohfreitas.eti.br
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Bitbaking python fails

2011-07-22 Thread Andre Haupt
Hi all,

Building python for poky bernard fails for me with the following error:

...
...
Looking in tk80 for 
['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
Looking in tcl80 for 
['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
*** WARNING: renaming gdbm since importing it failed: libgdbm.so.3:
cannot open shared object file: No such file or directory
/bin/sh: line 1: 12830 Illegal instruction (core dumped)
LD_LIBRARY_PATH=/home/ahaupt/yocto-git/build/tmp/work/core2-poky-
linux/python-2.6.6-nk1.2/Python-2.6.6:/home/ahaupt/yocto-git/build
/tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib:/home/ahaupt
/yocto-git/build/tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib64
CC='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
-mtune=generic -mfpmath=sse
--sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc'
LDSHARED='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
-mtune=generic -mfpmath=sse
--sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc
-shared' LDFLAGS='-Wl,-O1  -Wl,--as-needed'
OPT='-fexpensive-optimizations -fomit-frame-pointer
-frename-registers -O2 -ggdb -feliminate-unused-debug-types'
/home/ahaupt/yocto-git/build/tmp/sysroots/i686-linux/usr/bin/python
-E ./setup.py -q build
make: *** [sharedmods] Error 132
FATAL: oe_runmake failed
ERROR: Function 'do_compile' failed (see
/home/ahaupt/yocto-git/build/tmp/work/core2-poky-linux/
python-2.6.6-nk1.2/temp/log.do_compile.12751
for further information)

Does this sound familiar to anyone? libgdbm.so.3 exists in
/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib and points to
libgdbm.so.3.0.0

My target machine is atom-pc and my build host is Fedora 13 in a
VirtualBox machine.

regards,

Andre

NOTE: make 
HOSTPGEN=/home/ahaupt/yocto-git/build/tmp/sysroots/i686-linux/usr/bin/pgen 
HOSTPYTHON=/home/ahaupt/yocto-git/build/tmp/sysroots/i686-linux/usr/bin/python 
STAGING_LIBDIR=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib 
STAGING_INCDIR=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/include 
BUILD_SYS=i686-linux HOST_SYS=i586-poky-linux OPT= -fexpensive-optimizations 
-fomit-frame-pointer -frename-registers -O2 -ggdb 
-feliminate-unused-debug-types libpython2.6.so
ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse 
--sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc -c  
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb 
-feliminate-unused-debug-types -fexpensive-optimizations -fomit-frame-pointer 
-frename-registers -O2 -ggdb -feliminate-unused-debug-types  -I. -IInclude 
-I./Include  -fPIC -DPy_BUILD_CORE -DPYTHONPATH=':plat-linux2:lib-tk:lib-old' 
\
-DPREFIX='/usr' \
-DEXEC_PREFIX='/usr' \
-DVERSION='2.6' \
-DVPATH='' \
-o Modules/getpath.o ./Modules/getpath.c
ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 -mtune=generic -mfpmath=sse 
--sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc -c  
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb 
-feliminate-unused-debug-types -fexpensive-optimizations -fomit-frame-pointer 
-frename-registers -O2 -ggdb -feliminate-unused-debug-types  -I. -IInclude 
-I./Include  -fPIC -DPy_BUILD_CORE -DSVNVERSION=\`LC_ALL=C svnversion .`\ 
-o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
if test libpython2.6.so.1.0 != libpython2.6.so; then \
ccache i586-poky-linux-gcc -m32 -march=core2 -msse3 
-mtune=generic -mfpmath=sse 
--sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc -shared -Wl,-O1  
-Wl,--as-needed -Wl,-hlibpython2.6.so.1.0 -o libpython2.6.so.1.0 
Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o 
Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o 
Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o 
Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/boolobject.o 
Objects/bufferobject.o Objects/bytes_methods.o Objects/bytearrayobject.o 
Objects/cellobject.o Objects/classobject.o Objects/cobject.o 
Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o 
Objects/enumobject.o Objects/exceptions.o Objects/genobject.o 
Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o 
Objects/funcobject.o Objects/intobject.o Objects/iterobject.o 
Objects/listobject.o Objects/longobject.o Objects/dictobject.o 
Objects/methodobject.o Objects/moduleobject.o Objects/object.o 
Objects/obmalloc.o Objects/rangeobject.o Objects/setobject.o 
Objects/sliceobject.o Objects/stringobject.o Objects/structseq.o 
Objects/tupleobject.o Objects/typeobject.o Objects/weakrefobject.o 
Objects/unicodeobject.o Objects/unicodectype.o Python/_warnings.o 
Python/Python-ast.o Python/asdl.o Python/ast.o Python/bltinmodule.o 
Python/ceval.o Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o 
Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o 

Re: [yocto] Bitbaking python fails

2011-07-22 Thread Richard Purdie
On Fri, 2011-07-22 at 10:37 +0200, Andre Haupt wrote:
 Hi all,
 
 Building python for poky bernard fails for me with the following error:
 
 ...
 ...
 Looking in tk80 for 
 ['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
 Looking in tcl80 for 
 ['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
 *** WARNING: renaming gdbm since importing it failed: libgdbm.so.3:
 cannot open shared object file: No such file or directory
 /bin/sh: line 1: 12830 Illegal instruction (core dumped)
 LD_LIBRARY_PATH=/home/ahaupt/yocto-git/build/tmp/work/core2-poky-
 linux/python-2.6.6-nk1.2/Python-2.6.6:/home/ahaupt/yocto-git/build
 /tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib:/home/ahaupt
 /yocto-git/build/tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib64
 CC='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
 -mtune=generic -mfpmath=sse
 --sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc'
 LDSHARED='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
 -mtune=generic -mfpmath=sse
 --sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc
 -shared' LDFLAGS='-Wl,-O1  -Wl,--as-needed'
 OPT='-fexpensive-optimizations -fomit-frame-pointer
 -frename-registers -O2 -ggdb -feliminate-unused-debug-types'
 /home/ahaupt/yocto-git/build/tmp/sysroots/i686-linux/usr/bin/python
 -E ./setup.py -q build
 make: *** [sharedmods] Error 132
 FATAL: oe_runmake failed
 ERROR: Function 'do_compile' failed (see
 /home/ahaupt/yocto-git/build/tmp/work/core2-poky-linux/
 python-2.6.6-nk1.2/temp/log.do_compile.12751
 for further information)
 
 Does this sound familiar to anyone? libgdbm.so.3 exists in
 /home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib and points to
 libgdbm.so.3.0.0
 
 My target machine is atom-pc and my build host is Fedora 13 in a
 VirtualBox machine.

I've not seen this before. You could run
file 
/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib/libgdbm.so.3.0.0 and 
check that its of the correct architecture since the invalid instruction is a 
weird error to see. I'm not 100% sure its that file its complaining about the 
instruction from though.

Does it do this every build, erroring in the same way? I know we did see
some emulation corruption type issues with virtualbox in the past
although they've not been reported for a while. It might be worth
starting a new build of bitbake python and see if the error is
reproducible too...

Cheers,

Richard

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitbaking python fails

2011-07-22 Thread Andre Haupt
Hi Richard,

thanks for your answer. See below ... 

On Fri, Jul 22, 2011 at 09:59:51AM +0100, Richard Purdie wrote:
 On Fri, 2011-07-22 at 10:37 +0200, Andre Haupt wrote:
  Hi all,
  
  Building python for poky bernard fails for me with the following error:
  
  ...
  ...
  Looking in tk80 for 
  ['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
  Looking in tcl80 for 
  ['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
  *** WARNING: renaming gdbm since importing it failed: libgdbm.so.3:
  cannot open shared object file: No such file or directory
  /bin/sh: line 1: 12830 Illegal instruction (core dumped)
  LD_LIBRARY_PATH=/home/ahaupt/yocto-git/build/tmp/work/core2-poky-
  linux/python-2.6.6-nk1.2/Python-2.6.6:/home/ahaupt/yocto-git/build
  /tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib:/home/ahaupt
  /yocto-git/build/tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib64
  CC='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
  -mtune=generic -mfpmath=sse
  --sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc'
  LDSHARED='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
  -mtune=generic -mfpmath=sse
  --sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc
  -shared' LDFLAGS='-Wl,-O1  -Wl,--as-needed'
  OPT='-fexpensive-optimizations -fomit-frame-pointer
  -frename-registers -O2 -ggdb -feliminate-unused-debug-types'
  /home/ahaupt/yocto-git/build/tmp/sysroots/i686-linux/usr/bin/python
  -E ./setup.py -q build
  make: *** [sharedmods] Error 132
  FATAL: oe_runmake failed
  ERROR: Function 'do_compile' failed (see
  /home/ahaupt/yocto-git/build/tmp/work/core2-poky-linux/
  python-2.6.6-nk1.2/temp/log.do_compile.12751
  for further information)
  
  Does this sound familiar to anyone? libgdbm.so.3 exists in
  /home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib and points to
  libgdbm.so.3.0.0
  
  My target machine is atom-pc and my build host is Fedora 13 in a
  VirtualBox machine.
 
 I've not seen this before. You could run
 file 
 /home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib/libgdbm.so.3.0.0 
 and check that its of the correct architecture since the invalid instruction 
 is a weird error to see. I'm not 100% sure its that file its complaining 
 about the instruction from though.

this is the output of the file command:
libgdbm.so.3.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1
(SYSV), dynamically linked, not stripped

 Does it do this every build, erroring in the same way? I know we did see
 some emulation corruption type issues with virtualbox in the past
 although they've not been reported for a while. It might be worth
 starting a new build of bitbake python and see if the error is
 reproducible too...

It happens reproducible when i do a bitbake python.

regards,

Andre
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitbaking python fails

2011-07-22 Thread Richard Purdie
On Fri, 2011-07-22 at 11:37 +0200, Andre Haupt wrote:
 Hi Richard,
 
 thanks for your answer. See below ... 
 
 On Fri, Jul 22, 2011 at 09:59:51AM +0100, Richard Purdie wrote:
  On Fri, 2011-07-22 at 10:37 +0200, Andre Haupt wrote:
   Hi all,
   
   Building python for poky bernard fails for me with the following error:
   
   ...
   ...
   Looking in tk80 for 
   ['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
   Looking in tcl80 for 
   ['/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib']
   *** WARNING: renaming gdbm since importing it failed: libgdbm.so.3:
   cannot open shared object file: No such file or directory
   /bin/sh: line 1: 12830 Illegal instruction (core dumped)
   LD_LIBRARY_PATH=/home/ahaupt/yocto-git/build/tmp/work/core2-poky-
   linux/python-2.6.6-nk1.2/Python-2.6.6:/home/ahaupt/yocto-git/build
   /tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib:/home/ahaupt
   /yocto-git/build/tmp/sysroots/i686-linux/usr/bin/../lib/pseudo/lib64
   CC='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
   -mtune=generic -mfpmath=sse
   --sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc'
   LDSHARED='ccache i586-poky-linux-gcc -m32 -march=core2 -msse3
   -mtune=generic -mfpmath=sse
   --sysroot=/home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc
   -shared' LDFLAGS='-Wl,-O1  -Wl,--as-needed'
   OPT='-fexpensive-optimizations -fomit-frame-pointer
   -frename-registers -O2 -ggdb -feliminate-unused-debug-types'
   /home/ahaupt/yocto-git/build/tmp/sysroots/i686-linux/usr/bin/python
   -E ./setup.py -q build
   make: *** [sharedmods] Error 132
   FATAL: oe_runmake failed
   ERROR: Function 'do_compile' failed (see
   /home/ahaupt/yocto-git/build/tmp/work/core2-poky-linux/
   python-2.6.6-nk1.2/temp/log.do_compile.12751
   for further information)
   
   Does this sound familiar to anyone? libgdbm.so.3 exists in
   /home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib and points to
   libgdbm.so.3.0.0
   
   My target machine is atom-pc and my build host is Fedora 13 in a
   VirtualBox machine.
  
  I've not seen this before. You could run
  file 
  /home/ahaupt/yocto-git/build/tmp/sysroots/atom-pc/usr/lib/libgdbm.so.3.0.0 
  and check that its of the correct architecture since the invalid 
  instruction is a weird error to see. I'm not 100% sure its that file its 
  complaining about the instruction from though.
 
 this is the output of the file command:
 libgdbm.so.3.0.0: ELF 32-bit LSB shared object, Intel 80386, version 1
 (SYSV), dynamically linked, not stripped

Sounds correct...

  Does it do this every build, erroring in the same way? I know we did see
  some emulation corruption type issues with virtualbox in the past
  although they've not been reported for a while. It might be worth
  starting a new build of bitbake python and see if the error is
  reproducible too...
 
 It happens reproducible when i do a bitbake python.

Is this on a fresh clean build directory?

You could also try bitbake -c cleansstate python gdbm on your existing
build directory and retry bitbake python to see if its reproducible
that way.

Cheers,

Richard

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto