|
Re: question on how to compile 32-bit packages on x86_64 system
I'm trying to get the Guest Additions to compile on a Fedora rawhide (F18) x86_64 guest.
The GA provided by the released F17 RPM (4.1.18_78361) doesn't compile under rawhide kernel
(3.5.0-git3) since the 3.5 kernel changed one of the APIs and removed a few interfaces. The VB devel
mailing list has a thread about this already, but the fixed code is only in the SVN repository.
So I've downloaded the whole shebang and am trying to build the whole thing. I've installed the i686 toolchain
and libraries (gcc glibc and the -devel RPMs) but there are still a few problems.
This is where I get a little frustrated. I'm no stranger to programming, I've got a few major projects
under my belt, but I've not dealt with dealing with the particular situation of cross-compiling for ix86
on an x86_64 based platform. The VB configure is a little bit fragile and complains about not being able
to simply use the "-m32" flag on a simple gcc invocation.
Specifically, the linker step is failing to find an appropriate lib for the "-lgcc_s" default library. Which tells
me that the -m32 flag is properly generating ix86 code now, but the linker needs an additional option or
something to correctly make an ix86 executeable. So, here I am asking the question.
There are some work-arounds for rawhide and VBox Guest Additions: The rpmfusion.org binary RPM for
x86_64 rawhide works, but is tied to the particular kernel version. I'd like to find the proper source-level
fixes and give them back to VB so it's less of a hassel for others.
---------- Post added at 01:19 PM ---------- Previous post was at 12:53 PM ----------
A little more research indicates that a mock chrot may be usefull...
However, the conditions that mock needs are not met: There isn't a .src.rpm for VBox available, and it doesn't solve the problem of building for both architectures from the 64-bit side.
This should not be that hard a question.
|