How to package code compiled with 'gcc -m32'?

Richard W.M. Jones rjones at redhat.com
Tue Oct 7 18:51:27 UTC 2008


On Tue, Oct 07, 2008 at 05:40:15PM +0000, Kevin Kofler wrote:
> Richard W.M. Jones <rjones <at> redhat.com> writes:
> > It turns out that [NSIS is] not just built for 32 bit because of the
> > general hideousness of the code, but because it builds Windows 32 bit
> > plugins.  Somehow -- and I've no idea how it does this -- the Windows
> > plugins get loaded into the native Fedora binary at runtime.
> 
> Those plugins don't actually get loaded into the Fedora binary. They get packed 
> into the generated installer image.

Aha ... I'm glad someone knows what's going on here (not me :-)

I thought that the Stubs were copied into the output binary, but the
Plugins got loaded into the executable, but I seem to be wrong about
that.

> > Even though the main binary is Fedora native, it still has to be built as
> > 32 bit to achieve this minor miracle.
>
> The Debian folks worked hard on making NSIS build as a true 64-bit
> binary, not with -m32, and as far as I know their patches got merged
> upstream already.  The W32 plugins need to be built with the MinGW
> cross-compiler of course, not the native compiler, so they aren't
> affected by this problem at all.

I'm actually using Debian's patch, but I rebased them against 2.39.
Debian is on 2.19 for reasons I can't determine, but 2.19 doesn't
build on Fedora (it looked like a gcc error, but I didn't examine it
in great detail, because the newer version builds fine).

> I can have a try at making a proper x86_64 package with the plugins
> actually built from source. What I know is that my hack (packaging
> the binary plugins from the prebuilt ZIP and rebuilding makensis
> from source as 64-bit) worked.

Please, and if you can supply patches against our repository, or I can
get you commit access, then all the better.

Of course, building anything from binaries isn't acceptable.  It has
to be all built from source.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the devel mailing list