[opensuse-packaging] build with cross compiling icecream
Hello, I'm using build version 0.0_SVNr930M to compile Packman packages on PPC. Now I started to use icecream to cross compile, as my PPC build machine is a kind of weak, while I just got a strong x86 machine. This version of build does not seem to have support for cross compile icecream, it creates a package for the native compiler, sets up ICECC_VERSION, and that's all. I made a (very) ugly hack to get it to cross compile and reduce compile times significantly, but that's really not the way it should be solved. Is there anyone working on it, or is it fixed for a later version? I'm a bit afraid to update to a later version just for testing, when I don't have the rpm for this version... :) Bye, CzP Ps: just for the record, I added this few lines to the end of setupicecream() in /usr/lib/build/build: " echo icecream cross compile preparation cp /root/build_icecream.sh "$BUILD_ROOT"/etc/profile.d/build_icecream.sh if [ ! -f "$BUILD_ROOT"/opt/icecream/bin/powerpc-unknown-linux-gnu-c++ ] ; then for i in powerpc-unknown-linux-gnu-c++ powerpc-unknown-linux-gnu-cc powerpc-unknown-linux-gnu-g++ powerpc-unkno wn-linux-gcc ; do ln -s /usr/bin/icecc "$BUILD_ROOT"/opt/icecream/bin/$i done fi cp /root/cross-ppc-gcc-icecream-backend_i386.tar.gz /root/native.tar.gz "$BUILD_ROOT" " Content of /root/build_icecream.sh is: " export PATH=/opt/icecream/bin:$PATH export ICECC_VERSION="/native.tar.gz,i686:/cross-ppc-gcc-icecream-backend_i386.tar.gz" " The links are there, as sometimes I found, that configure looks for these, and it helped a lot at least on Gentoo. cross-ppc-gcc-icecream-backend_i386.tar.gz is from a SuSE rpm, native.tar.gz is the one generated by /usr/lib/icecc/icecc-create-env --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, On Mon, 9 Jul 2007, Peter Czanik wrote:
I'm using build version 0.0_SVNr930M to compile Packman packages on PPC.
Sorry for my ignorance, but where is the repository for 'build', i.e. what sources are you looking at? For autobuild we have our own internal version of build (with icecream support including cross compilers) and in the build.rpm sources I don't see any icecream support at all, so you must be looking at some third variant of build, which is it? ;-) Ciao, Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello, Michael Matz wrote:
Hi,
On Mon, 9 Jul 2007, Peter Czanik wrote:
I'm using build version 0.0_SVNr930M to compile Packman packages on PPC.
Sorry for my ignorance, but where is the repository for 'build', i.e. what sources are you looking at? It was from http://software.opensuse.org/download/openSUSE:/Tools/openSUSE_10.2/ as far as I can remember, and was downloaded in December, so quite some time ago.
# rpm -qi build Name : build Relocations: (not relocatable) Version : 0.0_SVNr930M Vendor: openSUSE Build Service Release : 2.1 Build Date: 2006. dec. 8., péntek, 15.41.54 CET Install Date: 2006. dec. 17., vasárnap, 12.25.14 CET Build Host: build02 Group : Development/Tools/Building Source RPM: build-0.0_SVNr930M-2.1.src.rpm Size : 282116 License: GNU General Public License (GPL) Signature : DSA/SHA1, 2006. dec. 8., péntek, 15.41.54 CET, Key ID 3b3011b76b9d6523 Summary : A Script to Build SUSE Linux RPMs Description : This package provides a script for building RPMs for SUSE Linux in a chroot environment. Distribution: (none)
For autobuild we have our own internal version of build (with icecream support including cross compilers) Is that available somewhere? Or that's too much internal, so does not work without the rest of your infrastructure? Bye, CzP
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Peter Czanik wrote:
Michael Matz wrote:
On Mon, 9 Jul 2007, Peter Czanik wrote:
I'm using build version 0.0_SVNr930M to compile Packman packages on PPC.
Sorry for my ignorance, but where is the repository for 'build', i.e. what sources are you looking at? It was from http://software.opensuse.org/download/openSUSE:/Tools/openSUSE_10.2/ as far as I can remember, and was downloaded in December, so quite some time ago.
# rpm -qi build Name : build Relocations: (not relocatable) Version : 0.0_SVNr930M Vendor: openSUSE Build
What you use is the enhanced version from my home. I've renamed it to lbuild in the meantime to avoid confusion. You can get it from http://software.opensuse.org/download/home:/lnussel/SLES_9/ cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hello, Ludwig Nussel wrote:
What you use is the enhanced version from my home. I've renamed it to lbuild in the meantime to avoid confusion. You can get it from http://software.opensuse.org/download/home:/lnussel/SLES_9/
OK, thanks for clearing this up. Question: does the latest version have cross compiling icecream? Because for the rest, this old version from December seems to work fine, and I have an "if it works, don't fix it" attitude towards upgrading :) Bye, CzP --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Peter Czanik wrote:
Ludwig Nussel wrote:
What you use is the enhanced version from my home. I've renamed it to lbuild in the meantime to avoid confusion. You can get it from http://software.opensuse.org/download/home:/lnussel/SLES_9/
OK, thanks for clearing this up. Question: does the latest version have cross compiling icecream? Because for the rest, this old version from December seems to work fine, and I have an "if it works, don't fix it" attitude towards upgrading :)
No, the icecream related code is unchanged. I haven't thought about how to properly implement that yet as I personally don't need it :-) cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Hi, On Mon, 9 Jul 2007, Peter Czanik wrote:
I made a (very) ugly hack to get it to cross compile and reduce compile times significantly, but that's really not the way it should be solved.
FWIW our internal build script (which uses internal stuff, so I'm not sure it's of any help to you) does it like this: 1) Inside the changeroot, build an distinct identifier for the toolchain in use. We can use the MD5 sum over the changelogs of the gcc package, binutils and glibc for that: changes_md5sum=`LC_ALL=C chroot $BUILD_ROOT rpm -q --changelog $gcc_package_name binutils glibc | sed -e '/\*/d' -e '/^$/d' | md5sum | cut -d' ' -f1` 2) We have a directory containing all unpacked cross-icecream-*-backend rpms, named per the above md5 sum in subdirs per architecture: % ls -l /mounts/work2/CDs/icecream/envs/f2bf24c90aeb3ecddf955d977b3de95f/s390 total 31178 -rw-r--r-- 1 root root 31497 2007-06-29 00:20 binutils.changes -rw-r--r-- 1 root root 4599 2007-06-29 00:20 gcc.changes -rw-r--r-- 1 root root 80380 2007-06-29 00:20 glibc.changes -rw-r--r-- 1 root root 5313444 2007-06-29 01:00 i386.tar.gz -rw-r--r-- 1 root root 9217515 2007-06-29 01:40 ia64.tar.gz -rw-r--r-- 1 root root 5807840 2007-06-29 07:00 ppc64.tar.gz -rw-r--r-- 1 root root 5766936 2007-06-29 05:40 ppc.tar.gz -rw-r--r-- 1 root root 5658685 2007-06-29 00:20 x86_64.tar.gz I.e. here we have five cross compilers to s390 (from i386,ia64,ppc,ppc64,x86_64), it's just a random example. So after building the above md5 sum in (1), we look for them in a directory: $BASE/icecream/envs/$MD5/$MY_ARCHITECTURE/*.tar.gz and copy them to the /var/cache/icecream dir in addition to the native environment. We further set ICECC_VERSION to hold the right value for whatever *.tar.gz we found (i.e. they are named according to the host architecture all the time). There's a periodic job which collects new cross-icecream-* packages and unpacks them into the above directories. I.e. it also involves some shell hackery ;-) Ciao, Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (3)
-
Ludwig Nussel
-
Michael Matz
-
Peter Czanik