Building 32 bit Mozart for 64 bit Linux

Kevin Glynn kevin.glynn at gmail.com
Tue May 9 23:06:25 CEST 2006


"Kevin Glynn" <kevin.glynn at gmail.com> writes:



To follow up these instructions.  Debian includes a script called
linux32 which creates an environment in which 'uname' will report that
it is running on an i686 processor.  I presume other distributions
have something similar (e.g. similar functionality is provided by
'setarch').

With this script it is not necessary to modify Mozart sources at all,
just run configure as:

# linux32 ../mozart/configure --prefix= ... etc ....
# make bootstrap
# make install

and you will have a 32 bit mozart runnable in your 32 bit chroot.

cheers
k


> Dear hackers,
>
> I accidentally bought a 64 bit machine at the weekend (;-)). Only a
> small patch to mozart is required to build mozart in a 32 bit
> chroot. First: set up your 32 bit chroot, here are some sample
> instructions
> for debian:
>       https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html#id271960
>
> You must also copy your /etc/hosts to /etc/hosts in the chroot.
>
> Mozart will fail to build successfully in this chroot because it
> detects the platform as unknown-unknown and tries to link executables
> with ld rather than gcc.  To fix this apply the following patch:
>
> Index: share/bin/ozplatform
> ===================================================================
> RCS file: /services/mozart/CVS/mozart/share/bin/ozplatform,v
> retrieving revision 1.33
> diff -r1.33 ozplatform
> 40a41,42
>>    x86_64\ Linux\ *)    OZARCH=linux-i486   # Must build in 32 bit chroot!!!
>>    ;;
>
> Now you should be able to configure, make bootstrap and make install
> as usual. Of course, you will need to run oz from inside the chroot
> but you can wrap a script round oz to make this almost painless.
>
> If we could automatically detect from configure that we are running
> inside a 32 bit chroot we could add this fix to mozart but I don't
> know if there is a standard way to detect that.
>
> Hope this helps,
>
> k




More information about the mozart-hackers mailing list