OESF Portables Forum
Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Angstrom & OpenZaurus => Topic started by: claude on May 29, 2004, 10:18:52 am
-
I\'d like to cross-compile Python and some \"packages\" like :
- Numeric/Numarray
- f2py (python/fortran interface)
- Scipy : \"stats\" lib and \"special\" lib.
I know that I need a toolchain/SDK (gcc, g77 ...) :
- but I do not know where to pick up the one that would fit my needs
- and where to find a tutotial/howto on cross-compiling
Moreover cross-compiling Python is not an easy task because python itself takes part in building
extensions.
Well I need some helps and advices !!
Thanks
-
further informations Zaurus 5500 / 3.3.6-pre1 opie 1.1.4
-
Grab OZ toolchain (GCC3.3.2) from here:
http://www.openzaurus.org/official/toolchain/ (http://www.openzaurus.org/official/toolchain/)
Make sure you read the README.
Then look at my posts in the \'Linux Applications\' section about cross-compiling. For the command line/lib stuff look specifically at how to make the ./configure program work. For any graphical stuff, I have no idea, sorry.
If you have troubles then post a reply.
Regards,
Simon
-
Thank you for the help, i\'ll give a try asap (i\'m sure it will work)
le chemin parcouru :
After some googling and http://openembedded.org/oe_wiki/ (http://openembedded.org/oe_wiki/) and
http://treke.net/oe/docs/oe-opie.html (http://treke.net/oe/docs/oe-opie.html) I tried openEmbeded (last python-2.3.4 and Numeric packages can be built with it) to build the \'initial environment\'
(toolchains etc) after \"oemake meta-opie\" I\'ve got errors :
...
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_patch completed
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_configure started
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_configure completed
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_compile started
ERROR: function do_compile failed
ERROR: function do_compile failed
ERROR: see log in /data1/oetmp/base/glibc-2.3.2+cvs20040530-r2/temp/log.do_compile.8648
wich reads :
...
...
../sysdeps/generic/libc-start.c:241: internal compiler error: Aborted
....
I did not use Bitkeeper but :
$ wget http://www.treke.net/oe/snapshots/oe-exported.tar.bz2 (http://www.treke.net/oe/snapshots/oe-exported.tar.bz2)
$ wget http://www.treke.net/oe/snapshots/oe-packa...xported.tar.bz2 (http://www.treke.net/oe/snapshots/oe-packages-exported.tar.bz2)
as theses packages are snapshots they may be buggy.
does someone know if there is a stable release of openEmbeded ?
thank you
-
To build a cross-compiler from http://openzaurus.org/official/toolchain/c...s-3.3.2.tar.bz2 (http://openzaurus.org/official/toolchain/cross-3.3.2.tar.bz2) :
I did :
1) install cross-3.3.2.tar.bz2 (/opt/..)
2) mkdir /usr/local/arm/3.3.2
3) tar jxf gcc-3.3.2.tar.bz2 -C /tmp
4) mkdir /tmp/buildgcc ; cd /tmp/buildgcc ; export PATH=$PATH:/opt/cross/bin
5)
../gcc-3.3.2/configure --disable-shared --enable-languages=\'c,c++,f77\' --target=arm-linux --prefix=\'/usr/local/arm/3.3.2\' --with-headers=\'/opt/cross/arm-linux/sys-include\' --with-libs=\'/opt/cross/arm-linux/lib\'
BUT the following files are not found :
../../gcc-3.3.2/gcc/tsystem.h:72:19: stdio.h: No such file or directory
../../gcc-3.3.2/gcc/tsystem.h:75:23: sys/types.h: No such file or directory
../../gcc-3.3.2/gcc/tsystem.h:78:19: errno.h: No such file or directory
../../gcc-3.3.2/gcc/tsystem.h:85:20: string.h: No such file or directory
../../gcc-3.3.2/gcc/tsystem.h:89:20: stdlib.h: No such file or directory
../../gcc-3.3.2/gcc/tsystem.h:90:20: unistd.h: No such file or directory
../../gcc-3.3.2/gcc/tsystem.h:96:18: time.h: No such file or directory
AND
../../gcc-3.3.2/gcc/crtstuff.c: In function `__do_global_dtors_aux\':
../../gcc-3.3.2/gcc/crtstuff.c:280: warning: passing arg 1 of `__deregister_frame_info\' discards qualifiers from pointer target type
../../gcc-3.3.2/gcc/crtstuff.c: In function `frame_dummy\':
../../gcc-3.3.2/gcc/crtstuff.c:316: warning: passing arg 1 of `__register_frame_info\' discards qualifiers from pointer target type
make[1]: *** [crtbegin.o] Erreur 1
any idea ???
-
I tried openEmbeded
Even better, I;d not realised they were in there. In any case you need a toolchain from the location I specified (unless you need it to do other stuff, like FORTRAN).
Si
-
To build a cross-compiler from http://openzaurus.org/official/toolchain/c...s-3.3.2.tar.bz2 (http://openzaurus.org/official/toolchain/cross-3.3.2.tar.bz2) :
I did :
1) install cross-3.3.2.tar.bz2 (/opt/..)
2) mkdir /usr/local/arm/3.3.2
3) tar jxf gcc-3.3.2.tar.bz2 -C /tmp
4) mkdir /tmp/buildgcc ; cd /tmp/buildgcc ; export PATH=$PATH:/opt/cross/bin
5)
../gcc-3.3.2/configure --disable-shared --enable-languages=\'c,c++,f77\' --target=arm-linux --prefix=\'/usr/local/arm/3.3.2\' --with-headers=\'/opt/cross/arm-linux/sys-include\' --with-libs=\'/opt/cross/arm-linux/lib\'
BUT the following files are not found :
../../gcc-3.3.2/gcc/tsystem.h:72:19: stdio.h: No such file or directory
...
AND
make[1]: *** [crtbegin.o] Erreur 1
any idea ???
Try :
export ZAURUS_DIR=/opt/cross/
export PATH=$PATH:$ZAURUS_DIR/bin
export LO_DIR=/usr/local/arm/3.3.2
../gcc-3.3.2/configure
--prefix=$LO_DIR
--target=arm-linux
--disable-shared
--with-gnu-as
--with-gnu-ld
--with-as=$ZAURUS_DIR/bin/arm-linux-as
--with-ld=$ZAURUS_DIR/bin/arm-linux-ld
--with-headers=$ZAURUS_DIR/arm-linux/include
--with-libs=$ZAURUS_DIR/arm-linux/lib
--enable-languages=c,c++,f77
make
make install
But files (compiler/header/..) of interest are in /opt/cross and /usr/local/arm/3.3.2 , it is not very clean ...
@+
-
I don\'t know if this has been posted on these boards before, but this:
http://www-106.ibm.com/developerworks/libr...rary/wi-zaurus/ (http://www-106.ibm.com/developerworks/library/wi-zaurus/)
is a good primer for anyone interested in cross-compilation. it focuses on the zaurus platform and even includes some handy zaurus-specific links.
/D
-
Thanks for the link !
I\'ll tell you if I can manage have everything running with that
-
Thank you for the help, i\'ll give a try asap (i\'m sure it will work)
le chemin parcouru :
After some googling and http://openembedded.org/oe_wiki/ (http://openembedded.org/oe_wiki/) and
http://treke.net/oe/docs/oe-opie.html (http://treke.net/oe/docs/oe-opie.html) I tried openEmbeded (last python-2.3.4 and Numeric packages can be built with it) to build the \'initial environment\'
(toolchains etc) after \"oemake meta-opie\" I\'ve got errors :
...
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_patch completed
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_configure started
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_configure completed
NOTE: package glibc-2.3.2+cvs20040530-r2: task do_compile started
ERROR: function do_compile failed
ERROR: function do_compile failed
ERROR: see log in /data1/oetmp/base/glibc-2.3.2+cvs20040530-r2/temp/log.do_compile.8648
wich reads :
...
...
../sysdeps/generic/libc-start.c:241: internal compiler error: Aborted
....
This was a gcc bug which we recently fixed. Rebuild.
-
Sorry, I\'m still mixed up, and I have a few questions.
- I don\'t understand why you build GCC 3.3.2 after installing the cross-3.3.2.tar.bz2 toolchain. Isn\'t GCC 3.3.2 ready to work in /opt/cross/bin ?
- Do I need to install both Qt-embedded and Qtopia ? Qtopia is just the graphical system that works thanks to Qt, am I right ? Do I have to install the same version as the one used on the Zaurus ? For example, my Zaurus has Qtopia 1.5.4, but on the trolltech website you download the latest release (1.7.1).
Thanks for your help !
-
I don\'t understand why you build GCC 3.3.2 after installing the cross-3.3.2.tar.bz2 toolchain. Isn\'t GCC 3.3.2 ready to work in /opt/cross/bin ?
Possibly because the original toolchain doesn\'t support all of the language options you want. Therefore you rebuild it (using the same binutils, directory structure, etc.). It just makes life easier IMO.
Si
-
1. OK I understand.
2. \"Qtopia is the name for the qpe libraries and the desktop environment build on it for the Zaurus\", which means the Qtpia package should be enough. Still one question left : do I have to use the same version as the one installed on my Zaurus ?