Re: i386 to amd64
Sven Joachim escreveu:
On 2008-11-09 03:51 +0100, Vinicius Massuchetto wrote:
Sven Joachim escreveu:
On 2008-11-08 17:06 +0100, Vinicius Massuchetto wrote:
Is there any way to build amd64 packages from i386?
There is probably more than one way, but assuming you have a 64-bit
processor (if not, why would you want to build packages for it?), the
easiest solution is to boot with a 64-bit kernel and set up an amd64
chroot for that task with "debootstrap --arch=amd64 --variant=buildd".
You can also set up pbuilder for amd64, look for the --debootstrapopts
option in the pbuilder manpage.
Thanks for helping me, but I got a little bit confused by this explanation.
I got a package: package_0.0.0_i386.deb
And I want: samepackage_0.0.0_amd64.deb
Okay, it seems I completely misunderstood you. I thought you wanted to
build packages from source.
I know I can install i386 packages by the --force-architecture
parameter, but what I really need is to build one.
I'm used to build my own packages with checkinstall, but they're not
providing me the source for this specific package.
Here is a way to just hack the architecture in foobar_i386.deb, with
# We want the files in the control.tar.gz to be owned by root, so let's
# pretend we are root; apt-get install fakeroot if necessary.
# extract the files in the control archive into a scratch dir
ar x foobar_i386.deb control.tar.gz
tar -C scratch -xzvf control.tar.gz
# change the Architecture in the control file
sed -i -e 's/Architecture: i386/Architecture: amd64/' scratch/control
# regenerate the control archive
GZIP=-9n tar -C scratch -cvzf control.tar.gz .
# replace the control archive in the .deb
ar rav debian-binary foobar_i386.deb control.tar.gz
# clean up and exit the fakeroot shell:
rm -rf scratch control.tar.gz
That looks risky, but thanks for the point.
This is a really dirty hack, though. A better framework for converting
i386 packages is developed in the ia32-libs-tools package, available in
Well, then maybe you can help me out here:
vinicius:/home/vinicius# apt-get install ia32-libs-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
ia32-libs-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up ia32-libs-tools (11) ...
mangle: ia32-libs-tools/mangle.cc:231: size_t
PkgDepAnd::parse(std::string&, size_t): Assertion `is_name(s[offset])'
/var/lib/dpkg/info/ia32-libs-tools.postinst: line 23: 7098 Done
7099 Aborted | /usr/lib/ia32-libs-tools/mangle
--index > /dev/null
dpkg: error processing ia32-libs-tools (--configure):
subprocess post-installation script returned error exit status 134
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
I can't even read this bug. =)
Vinicius Andre Massuchetto