Hi
First some informations. "armel-cross-toolchain" is a package which will generate armel cross toolchain for x86(-64) machines (but nothing keeps from building powerpc->armel one etc). Do to that I am building several stages of linux/eglibc/gcc-4.5/binutils in proper order. This is called 'bootstrap' way of building cross compiler and can be automated (which can not be done with Embedian way which we used before).
In last week I did a split of package into 2 steps:
- armel-cross-toolchain-base - armel-cross-toolchain
Where first one provides binutils, linux headers, libc6 and libgcc packages. Second provides final gcc.
My armel-cross-toolchain-base package got to the moment when it builds out of box on Ubuntu maverick.
But build != upload ;( And here I need some help.
As you can see on page [1] package got built [2] but then was rejected to be uploaded [3]. Here my Debian/Ubuntu packaging skills ends as I never imported any package to those systems.
According to people from #launchpad my package is buggy as it is producing a binutils binary which expects to be built from a binutils source. Whereas mine source package is neither named binutils nor does it have that version.
So problem is how to get it done... So far I tried ugly hacks like:
sed -i -e "s/^binutils/armel-cross-toolchain-base/g" debian/changelog; \ sed -i -e "s/^Source: binutils/Source: armel-cross-toolchain-base/g" debian/control.in; \ sed -i -e "s/^Source: binutils/Source: armel-cross-toolchain-base/g" debian/control; \
But this does not look right for me and require more changes in linux packaging as it uses changelog name as base for package names.
So help me please if you have ideas.
1. https://edge.launchpad.net/~hrw/+archive/arm-cross-compiler/+build/1940050 2. http://launchpadlibrarian.net/54624642/buildlog_ubuntu-maverick-i386.armel-c... 3. http://launchpadlibrarian.net/54624644/upload_1942031_log.txt
Regards,
On Mon, Aug 30, 2010, Marcin Juszkiewicz wrote:
sed -i -e "s/^binutils/armel-cross-toolchain-base/g" debian/changelog; \ sed -i -e "s/^Source: binutils/Source: armel-cross-toolchain-base/g" debian/control.in; \ sed -i -e "s/^Source: binutils/Source: armel-cross-toolchain-base/g" debian/control; \
But this does not look right for me and require more changes in linux packaging as it uses changelog name as base for package names.
So help me please if you have ideas.
Hmm that's not easy indeed
I guess you could extend the cross-compilation logic in binutils/gcc-4.5/eglibc/linux etc. to allow outputting the binary packages with "Source: armel-cross-toolchain-base (x.y-z)" instead of the default. You can probably achieve that by creating a control file and a changelog file which have the right information and passing -c + -l to dpkg-gencontrol.
Another way, probably less complex, is to extract and repack the .debs with the proper control information.
Note that because the version of the binaries and the version of your source differ, your source field needs to be "Source: armel-cross (yourversion goes here)"
Cheers
On Mon, Aug 30, 2010 at 04:52:06PM +0200, Loïc Minier wrote:
Note that because the version of the binaries and the version of your source differ, your source field needs to be "Source: armel-cross (yourversion goes here)"
That option probably only works if repacking the .deb, right? I would expect dpkg-gencontrol to ignore any ($version) in the source debian/control.
On Tue, Aug 31, 2010, Steve Langasek wrote:
That option probably only works if repacking the .deb, right? I would expect dpkg-gencontrol to ignore any ($version) in the source debian/control.
Oh yes, that's why I was suggesting passing -c + -l; I think this might work without repacking the .debs though
Dnia wtorek, 31 sierpnia 2010 o 21:42:54 Loïc Minier napisał(a):
On Tue, Aug 31, 2010, Steve Langasek wrote:
That option probably only works if repacking the .deb, right? I would expect dpkg-gencontrol to ignore any ($version) in the source debian/control.
It does not ignore - it fails.
cd linux-source-2.6.35 ;\ DEB_STAGE=stage1 NO_PKG_MANGLE=1 dpkg-buildpackage -b -uc -us -aarmel dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2 dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions dpkg-buildpackage: source package armel-cross-toolchain-base dpkg-buildpackage: source version 2.6.35-19.28 dpkg-buildpackage: source changed by Leann Ogasawara leann.ogasawara@canonical.com dpkg-architecture: warning: Specified GNU system type arm-linux-gnueabi does not match gcc system type x86_64-linux-gnu. dpkg-source --before-build linux-source-2.6.35 dpkg-buildpackage: host architecture armel dpkg-source: error: source package name `armel-cross-toolchain-base (1.28)' contains illegal character ` ' dpkg-buildpackage: error: dpkg-source --before-build linux-source-2.6.35 gave error exit status 255 make: *** [stamp-dir/build-linux] Error 255 dpkg-buildpackage: error: debian/rules build gave error exit status 2 debuild: fatal error at line 1337: dpkg-buildpackage -rfakeroot -D -us -uc -b failed 10:11 hrw@home:armel-cross-toolchain-base-1.28$ grep ^Source linux-source-2.6.35/debian/control Source: armel-cross-toolchain-base (1.28)
Oh yes, that's why I was suggesting passing -c + -l; I think this might work without repacking the .debs though
I would like to keep original versions for components. Otherwise we will have binutils 1.28, gcc-4.5 1.28 etc which does not tell anything.
Regards,