>>>>> "Kevin" == Kevin Glynn <[EMAIL PROTECTED]> writes:

    Kevin> If you can build a 32 bit mozart that runs outside the
    Kevin> chroot I would be very interested, but I don't see how that
    Kevin> can be done.

Using linux32 I finally managed to build a 32 bit Mozart/OZ.  It's a
bit complicated since it implies building gdbm, gmp and zlib as 32 bit
static libraries.  It requires minimal changes to Mozart build system,
specifically platform/emulator/Makefile.vars.in and
platform/emulator/oztool.sh.

--- platform/emulator/Makefile.vars.in  2003-04-16 04:02:57.000000000 -0400
+++ ../mozart-BUILD/platform/emulator/Makefile.vars.in  2006-10-31 
20:59:36.000000000 -0500
@@ -41,10 +41,10 @@
 YFLAGS=                -d
 M4=            @M4@
 M4_S=          @M4_S@
-CXX=           @CXX@
+CXX=           @CXX@ -m32
 CXXCPP=                @CXXCPP@

-LD=            @LD@
+LD=            @LD@ -m32
 DYNLD=         @OZTOOL_SH@ ld
 RANLIB=                @RANLIB@
 AR=            @AR@

--- platform/emulator/oztool.in 2004-05-18 12:11:27.000000000 -0400
+++ ../mozart-BUILD/platform/emulator/oztool.in 2006-10-31 21:00:16.000000000 
-0500
@@ -48,9 +48,9 @@
   fi
 fi

-: ${oztool_cxx="@OZTOOL_CXX@ @OZTOOLDYNOPT@ $OZTOOL_INCLUDES"}
-: ${oztool_cc="@CC@ @OZTOOLDYNOPTCC@ $OZTOOL_INCLUDES"}
-: ${oztool_ld="@TOOLLDCMD@ @LDFLAGS@"}
+: ${oztool_cxx="@OZTOOL_CXX@ -m32 @OZTOOLDYNOPT@ $OZTOOL_INCLUDES"}
+: ${oztool_cc="@CC@ -m32 @OZTOOLDYNOPTCC@ $OZTOOL_INCLUDES"}
+: ${oztool_ld="@TOOLLDCMD@ -m32 @LDFLAGS@"}
 : ${oztool_platform="@platform@"}
 : ${oztool_version="@OZVERSION@"}

My autoconf skills are too little to insert those changes in a more
elegant fashion in the build system so they are provided here as
patches to those wanting to build the 32 bit version from source only.
The ./configure line looks like this:

linux32 ./configure --with-lib-dir=/tmp/MOZART/mozart-1.3.2.20060615/LIBS 
--prefix=/tmp/LIBS

where tmp/LIBS is the path where you put libgdbm.a, libz.a and
libgmp.a.

Compiling libz, very easy:

CFLAGS="-m32 -O3" ./configure && make

and you'll find libz.a in the directory.

Compiling libgmp, quite easy, but I had to look up some docs.

./configure ABI=32 && make

you'll find libgmp.a in the hidden .libs directory

Compiling gdbm, that one a bit of a pain to figure out but turned out
not to need any changes to the build system:

CFLAGS="-O3 -m32" LDFLAGS="-m32" linux32 ./configure --disable-shared 
--enable-static && make

and you end up with libgdbm.a in the hidden .libs directory.

** NOTE ** NOTE ** 

The instructions I gave here might not be complete.  I would like
somebody, maybe you Kevin, to try to build the 32 bit distribution on
AMD64.  I will provide the required support to make it work.  Once I
know what I might have forgotten, I will rework the details and make a
decent howto.

and now, to learn Oz ...

F-D

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to