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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 07, 2008 at 11:12:09AM -0400, Jeremy Katz wrote:
> On Tue, 2008-10-07 at 14:35 +0100, Richard W.M. Jones wrote:
> > I've got a nasty program I'm trying to package for Fedora.  To cut a
> > very long story short, this C/C++ mixed program started out on Windows
> > and makes lots of 32 bit assumptions.  So it's compiled with 'gcc -m32'.
> > 
> > Expressing the build requirements so it can build on a 64 bit platform
> > is proving troublesome.  (It builds fine on i386).
> 
> In general, for these situations the right answer is to ExcludeArch and
> file the appropriate tracking bugs rather than trying to do 32-bit
> builds on a 64-bit arch.  The latter is only done in a few special cases
> (bootloaders mainly) which don't have any external deps

The issues is actually weirder / more complicated than I thought.
(But hey, Windows software, what do you expect :-)

It turns out that it's 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.  Even
though the main binary is Fedora native, it still has to be built as
32 bit to achieve this minor miracle.

The package is NSIS, in case you were wondering ...

http://hg.et.redhat.com/misc/fedora-mingw--devel/?cmd=manifest;manifest=d9257c5046c7e63b8c00d01528031f14cf6fc319;path=/nsis/

http://www.annexia.org/tmp/mingw/fedora-9/x86_64/RPMS/mingw32-nsis-2.39-3.fc9.x86_64.rpm

$ file /usr/bin/makensis 
/usr/bin/makensis: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
$ file /usr/share/nsis/Stubs/zlib
/usr/share/nsis/Stubs/zlib: PE32 executable for MS Windows (GUI) Intel 80386 32-bit
$ strace makensis --help 2>&1 | egrep '(Plugins|Stubs)'
open("/usr/share/nsis/Stubs/zlib", O_RDONLY) = 3
open("/usr/share/nsis/Stubs/uninst", O_RDONLY) = 3

I guess if we ExcludeArch we'll still be OK because x86-64 users will
be able to install and use the i386 version?

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

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux