[Mono-dev] mono 2.0, solaris x86, bootstrap

Andreas Färber andreas.faerber at web.de
Sun Oct 5 07:15:09 EDT 2008


pablosantosluac at terra.es schrieb:
> Well, it seems building the "core" is not hard if you make sure (on 
> Solaris 10) that you use GNU packages and not the SUN ones (gmake, 
> libtool, and everything else). I can build "mono" from trunk or 2-0. 
> but the problems start with mcs... I'm now following the instructions 
> sent by Geoff (basically using 
> http://mono.ximian.com/monobuild/preview/sources/mono/mono-2.0.tar.bz2).

Having the runtime compile does not imply it'll work at runtime... 
Whether you use a tarball or monolite usually doesn't matter, but if you 
can, a tarball is "safer".

Fwiw, I've just finished compiling mono at r114845+mcs@r114882 from
mono at r109531+mcs@r109587 (all trunk) on OpenSolaris build 95 for i86
using exactly this:

../mono/configure --prefix=/opt/mono --with-gc=boehm \
--with-sigaltstack=no \
CPPFLAGS="-I/opt/mono-gc/include" \
LDFLAGS="-L/opt/mono-gc/lib -R/opt/mono/lib"

where /opt/mono-gc is the prefix of Boehm GC 7.1, compiled with:

../gc-7.1/configure --prefix=/opt/mono-gc

Works nicely there. Don't have access to S10 from here though to fetch
my scripts or to try the latest revs there.

On OpenSolaris/amd64, I use these on top:

PREFIX=/opt/mono-gc

../gc-7.1/configure --prefix=$PREFIX --libdir=$PREFIX/lib/amd64 \
CPPFLAGS=-m64 CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64

and:

PREFIX=/opt/mono

../mono/configure --prefix=$PREFIX --bindir=$PREFIX/bin/amd64
--libdir=$PREFIX/lib/amd64 \
--with-gc=boehm --with-sigaltstack=no --enable-big-arrays
--enable-dtrace --disable-mcs-build \
CPPFLAGS="-m64 -I/opt/mono-gc/include" CFLAGS="-m64" \
LDFLAGS="-m64 -L/opt/mono-gc/lib/amd64 -R/opt/mono/lib/amd64" \
PKG_CONFIG_PATH="/usr/lib/amd64/pkgconfig:$PKG_CONFIG_PATH"

(Obviously I'm skipping mcs build in this script, but I've done full
amd64 bootstraps before with post-2.0 revisions.)

Note that I use dedicated /opt subdirs because that's where 3rdparty
packages are often installed on Solarises, making it easy to rename or
remove. $prefix/{bin,lib}/amd64 is where Sun places their amd64 files.

Using a monolite from 12:05 GMT+02:00 today (with Sun's `mcs` renamed),
there are no problems on OSol/i86 either.
So it's definitely not mcs's or monolite's fault!!!


>> Cetin actually mentioned OpenSolaris as opposed to Solaris 10. When 
>> OpenSolaris 2008.05 was released I posted the following mini-guide:
>> http://lists.ximian.com/pipermail/mono-list/2008-May/038584.html
>>
>> It was actually supposed to avoid questions later on. ;)
>>
> Following this guide the only thing I realize I missed is the LDFLAGS 
> stuff? Is it the reason why mcs.exe can't be run?

In case you mean LDFLAGS=-R/path then no, it has no influence on mcs. It
helps with MD (libPosixHelper.so et al.).

>> The often-referenced http://www.mono-project.com/Mono:Solaris page 
>> contains a link to another post of mine, for Solaris 10:
>> http://lists.ximian.com/pipermail/mono-list/2007-January/034101.html
>>
> Yes, this guide was helpful building 1.1.13 (almost two years ago 
> already), but now all those tricks are not needed anymore... You can 
> get the whole c code build easily...

If you build using Blastwave tools you don't need some of the 
environment variables; otherwise you still do on Solaris 10.

The only thing outdated in that post to my knowledge is
CFLAGS=-D_POSIX_PTHREAD_SEMANTICS and possibly the mono-service issue.
Jonel's blog on the -mt pkg-config issue is almost three years old and
mostly still applies due to the long lifetime of S10. :)
AS=gas for instance was only needed for running `make check` so you
won't notice during plain `make`.

Andreas




More information about the Mono-devel-list mailing list