[Mono-dev] Compiling Mono v2.4 (Solaris 10 SPARCv9)

John M john_mandia at yahoo.com
Thu Jul 16 06:52:57 EDT 2009


Hi,

I am getting the following error while compiling mono on Solaris.

I checked on various forums and here is what I find but it didn’t work

http://mail.opensolaris.org/pipermail/tools-gcc/2006-September/000130.html

We want to use /usr/sfw/lib/gld instead of /usr/ccs/bin/ld but even if I
provide this in the options the compiler doesn’t pick it up

./configure --prefix=/local/0/sw/mono/2.4 --with-tls=pthread
--enable-dtrace=no --with-gc=none --with-as=/usr/sfw/bin/gas
--with-ld=/usr/sfw/bin/gld


Error message:

gmake[3]: Entering directory `/local/0/mono-2.4/mono/metadata'
/bin/bash ../../libtool --quiet --tag=CC   --mode=link gcc  -g -O2
-fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes 
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
-Wcast-align -Wwrite-strings -Wno-char-subscripts -Wno-cast-align -mcpu=v9 
-L/opt/lib -L/opt/sfw/lib -L/usr/sfw/lib -L/usr/lib -lstdc++ -o pedump
pedump.o libmonoruntime.la ../io-layer/libwapi.la ../utils/libmonoutils.la 
-threads -L/local/0/sw/glib/2.4.0/lib -lgthread-2.0 -lglib-2.0   -lm  -lrt  
-lsocket -lnsl -lxnet -lpthread -lm
/usr/ccs/bin/ld: illegal option -- rpath
/usr/ccs/bin/ld: illegal option -- rpath
/usr/ccs/bin/ld: illegal option -- rpath
/usr/ccs/bin/ld: illegal option -- rpath
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?]
file(s)
        [-64]           enforce a 64-bit link-edit
        [-a]            create an absolute file
        [-b]            do not do special PIC relocations in a.out
        [-B direct | nodirect]
                        establish direct bindings, or inhibit direct binding
                        to, the object being created
        [-B dynamic | static]
                        search for shared libraries|archives
        [-B eliminate]  eliminate unqualified global symbols from the
                        symbol table
        [-B group]      relocate object from within group
        [-B local]      reduce unqualified global symbols to local
        [-B reduce]     process symbol reductions
        [-B symbolic]   bind external references to definitions when
creating
                        shared objects
        [-c name]       record configuration file `name'
        [-C]            demangle C++ symbol name diagnostics
        [-d y | n]      operate in dynamic|static mode
        [-D token,...]  print diagnostic messages
        [-e epsym]      use `epsym' as entry point address
        [-f name]       specify library for which this file is an auxiliary
                        filter
        [-F name]       specify library for which this file is a filter
        [-G]            create a shared object
        [-h name]       use `name' as internal shared object identifier
        [-i]            ignore LD_LIBRARY_PATH setting
        [-I name]       use `name' as path of interpreter
        [-l x]          search for libx.so or libx.a
        [-L path]       search for libraries in directory `path'
        [-m]            print memory map
        [-M mapfile]    use processing directives contained in `mapfile'
        [-N string]     create a dynamic dependency for `string'
        [-o outfile]    name the output file `outfile'
        [-p auditlib]   identify audit library to accompany this object
        [-P auditlib]   identify audit library for processing the
dependencies
                        of this object
        [-Q y | n]      do|do not place version information in output file
        [-r]            create a relocatable object
        [-R path]       specify a library search path to be used at run time
        [-s]            strip any symbol and debugging information
        [-S supportlib]
                        specify a link-edit support library
        [-t]            do not warn of multiply-defined symbols that have
                        different sizes or alignments
        [-u symname]    create an undefined symbol `symname'
        [-V]            print version information
        [-Y P,dirlist]  use `dirlist' as a default path when searching for
                        libraries
        [-z absexec]    when building an executable absolute symbols
                        referenced in dynamic objects are promoted to
                        the executable
        [-z allextract | defaultextract | weakextract]
                        extract all member files, only members that resolve
                        undefined tor tentative symbols, or allow extraction
of
                        archive members to resolvetweak references from
                        archive files
        [-z combreloc]  combine multiple relocation sections
        [-z nocompstrtab]
                        disable compression of string tables
        [-z defs]       disallow undefined symbol references
        [-z direct | nodirect]
                        enable|disable direct binding to shared object
                        dependencies
        [-z endfiltee]  marks a filtee such that it will terminate a filters
                        search
        [-z finiarray=function]
                        name of function to be appended to the .finiarray
        [-z groupperm | nogroupperm]
                        enable|disable setting of group permissions
                        on dynamic dependencies
        [-z help ]      print this usage message
        [-z ignore | record]
                        ignore|record unused dynamic dependencies
        [-z initarray=function]
                        name of function to be appended to the .initarray
        [-z initfirst]  mark object to indicate that its .init section
should
                        be executed before the .init section of any other
                        objects
        [-z interpose]  dynamic object is to be an `interposer' on direct
                        bindings
        [-z lazyload | nolazyload]
                        enable|disable delayed loading of shared object
                        dependencies
        [-z ld32=arg1,arg2,...]
                        define arguments applicable to the 32-bit class of
ld(1)
        [-z ld64=arg1,arg2,...]
                        define arguments applicable to the 64-bit class of
ld(1)
        [-z loadfltr]   mark filter as requiring immediate loading of its
                        filtees at runtime
        [-z muldefs]    allow multiply-defined symbols
        [-z nodefs]     allow undefined symbol references
        [-z nodefaultlib]
                        mark object to ignore any default library search
path
        [-z nodelete]   mark object as non-deletable
        [-z nodlopen]   mark object as non-dlopen()'able
        [-z nodump]     mark object as non-dldump()'able
        [-z nopartial]  expand any partially initialized symbols
        [-z noversion]  don't record any version sections
        [-z now]        mark object as requiring non-lazy binding
        [-z origin]     mark object as requiring $ORIGIN processing
        [-z preinitarray=function]
                        name of function to be appended to the .preinitarray
        [-z redlocsym]  reduce local syms in .symtab to a minimum
        [-z rescan]     rescan archive list until no further member
                        extraction occurs
        [-z text]       disallow output relocations against text
        [-z textoff]    allow output relocations against text
        [-z textwarn]   warn if there are relocations against text
        [-z verbose]    generate warnings for suspicious processings
collect2: ld returned 1 exit status
gmake[3]: *** [pedump] Error 1
gmake[3]: Leaving directory `/local/0/mono-2.4/mono/metadata'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/local/0/mono-2.4/mono'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/local/0/mono-2.4'
gmake: *** [all] Error 2

We seem to be almost there (hopefully). 

Do you know if 2.4.2 resolves any of the issues compilling on Solaris (or
anyway around the above error)?

Thanks,

John



vargaz wrote:
> 
> Hi,
> 
>  No idea then. You could pass --disable-nls to configure to disable this
> stuff.
> 
>                 Zoltan
> 
> On Tue, Jun 16, 2009 at 5:21 PM, John M <john_mandia at yahoo.com> wrote:
> 
>>
>> Hi Zoltan,
>>
>> Thanks for getting back to me.
>>
>> I already have the gettext installed on the box and it is already on the
>> PATH.
>>
>> bash-3.00# which gettext
>> /usr/bin/gettext
>>
>> Could there be something else I am missing?
>>
>> Thanks again,
>>
>> John
>>
>>
>> vargaz wrote:
>> >
>> > Hi,
>> >
>> >   Install the gettext package.
>> >
>> >                 Zoltan
>> >
>> > On Tue, Jun 16, 2009 at 12:24 PM, John M <john_mandia at yahoo.com> wrote:
>> >
>> >>
>> >> Has anyone come across this problem?:
>> >>
>> >> I am trying to compile mono on Solaris 10.
>> >> I got pkgconfig, glib compiled and ran configure successfully but it
>> just
>> >> fails while running gmake for mono 2.4
>> >>
>> >> bash-3.00# gmake
>> >> gmake  all-recursive
>> >> gmake[1]: Entering directory `/mono_downloads/mono-2.4'
>> >> Making all in po
>> >> gmake[2]: Entering directory `/mono_downloads/mono-2.4/po'
>> >> Making all in mcs
>> >> gmake[3]: Entering directory `/mono_downloads/mono-2.4/po/mcs'
>> >> test ! -f ./mcs.pot || \
>> >>  test -z "es.gmo ja.gmo de.gmo" || gmake es.gmo ja.gmo de.gmo
>> >> gmake[4]: Entering directory `/mono_downloads/mono-2.4/po/mcs'
>> >> : --update es.po mcs.pot
>> >> : --update ja.po mcs.pot
>> >> : --update de.po mcs.pot
>> >> rm -f de.gmo && : -c --statistics -o de.gmo de.po
>> >> mv: cannot access t-de.gmo
>> >> gmake[4]: *** [de.gmo] Error 2
>> >> gmake[4]: Leaving directory `/mono_downloads/mono-2.4/po/mcs'
>> >> gmake[3]: *** [stamp-po] Error 2
>> >> gmake[3]: Leaving directory `/mono_downloads/mono-2.4/po/mcs'
>> >> gmake[2]: *** [all-recursive] Error 1
>> >> gmake[2]: Leaving directory `/mono_downloads/mono-2.4/po'
>> >> gmake[1]: *** [all-recursive] Error 1
>> >> gmake[1]: Leaving directory `/mono_downloads/mono-2.4'
>> >> gmake: *** [all] Error 2
>> >> bash-3.00# pwd
>> >> /mono_downloads/mono-2.4
>> >> bash-3.00# pwd
>> >> /mono_downloads/mono-2.4
>> >>
>> >> Thanks,
>> >>
>> >> John
>> >>
>> >> Thracx wrote:
>> >> >
>> >> > <P>In short, it's not working for me but I'm willing to keep trying
>> and
>> >> > document my experiences if I can get some help from the Mono
>> developer
>> >> > community.  I apologize for the lengthy post but I figured that I
>> might
>> >> as
>> >> > well be thorough.</P>
>> >> > Background:<BR>
>> >> > <P>
>> >> > I have been wrestling with trying to compile various versions of
>> Mono.
>> >> > After a good deal of trouble, I managed to build v2.0.1 on my
>> Solaris
>> >> 10
>> >> > SPARCv9 machine.  It has issues (i.e. bugs in Mono), but I think the
>> >> build
>> >> > itself was successful.
>> >> > </P><P>
>> >> > I believe many of my issues have been fixed in later Mono fixes, but
>> >> thus
>> >> > far I have been unable to build Mono v2.2, v126637, and v2.4 RC2. 
>> I'm
>> >> > hoping to be able to utilize v2.4 when it's released but if I can't
>> >> > compile the RC2,  obviously I'll have an issue when v2.4 becomes
>> >> official.
>> >> > If it's a bug with me, I could certainly use some help.  If it's a
>> bug
>> >> in
>> >> > Mono, I need some help finding it so hopefully it can be fixed
>> before
>> >> v2.4
>> >> > is released later this month.
>> >> > </P><P>
>> >> > I hope to document all the issues and fixes that I've encountered
>> thus
>> >> far
>> >> > - the documentation for building Mono on Solaris is very scattered,
>> but
>> >> > I'd hate to conclude mine with "but in the end it doesn't work".
>> >> > </P>
>> >> > Problem:<BR>
>> >> > <P>
>> >> > 'Configure' succeeds and 'make' gets all the way to where it
>> compiles
>> >> > System.dll (with warning 'System.dll build without parts that don't
>> >> depend
>> >> > on: System.Xml.dll'.  I then get "MCS   [basic] System.dll", and
>> then
>> >> the
>> >> > annoying "GC Warning: Large stack limit(...):  only scanning 8 MB"
>> >> > warning.  It's followed by a 'Compilation succeeded - 13
>> warnings(s)'
>> >> > message which tells me that it finished System.dll.  It then tries
>> >> working
>> >> > on System.Xml.dll after doing what looks like some lexer tree
>> >> reductions
>> >> > (messages like 3 rules never reduced, 1 shift-reduce conflict, etc)
>> and
>> >> > then the "MCS    [basic] System.Xml.dll" message.  This is the last
>> >> thing
>> >> > I see.  I can wait for over 16 hours and nothing happens, other than
>> >> > prstat reporting that 'mono' has used 16+ hours of CPU time.  It
>> gives
>> >> an
>> >> > '.../class/lib/basic/System.Xml.dll]  Error 130' message after I
>> kill
>> >> it
>> >> > but that is just from me interrupting it.  For some reason, the
>> build
>> >> > process is either unable to compile System.Xml.dll, or it runs
>> >> something
>> >> > that hangs.  I don't see any 'compilation succeeded' message like
>> with
>> >> > System.dll so I assume it's the former.  But it was able to compile
>> >> > System.dll so why can't it compile System.Xml.dll?
>> >> > </P>
>> >> > <P>
>> >> > As what may be an important side-note, my previous brick wall was
>> with
>> >> > build/deps/basic-profile-check.exe.  I was able to get past this
>> issue
>> >> but
>> >> > I think it's probably the same problem as above, or at least
>> related,
>> >> so
>> >> I
>> >> > thought it best to mention it:  'Configure' succeeds and 'make' gets
>> >> all
>> >> > the way to where it enters the mcs directory.  I get the "The
>> compiler
>> >> > 'mcs' doesn't appear to be usable.  Trying the 'monolite'
>> directory."
>> >> > message and then it seems to re-try compiling and/or running
>> >> > basic-profile-check.exe and I've waiting over 16 hours and nothing
>> else
>> >> > happens - it's hung.  When I kill it, it says
>> >> > "[build/deps/basic-profile-check.exe]  Error 127", and then gives an
>> >> Error
>> >> > 130 but that's just from my interrupting it.  For some reason, the
>> >> build
>> >> > process is either unable to compile basic-profile-check.exe or when
>> it
>> >> > runs it, it hangs.  My guess is the former.  Either way, if I add my
>> >> Mono
>> >> > v2.0.1 bin directory to my path, it's able to get past this problem
>> -
>> >> but
>> >> > then hangs on System.Xml.dll per above.
>> >> > </P>
>> >> > What Didn't Work:<BR>
>> >> > <P>
>> >> > First, note that my system does not have access to the Internet.
>> >> Things
>> >> > like 'make get-mono-latest' don't work for me.  Regardless, I now
>> have
>> >> a
>> >> > rather complete GNU bin directory that I've compiled myself,
>> including
>> >> GCC
>> >> > v3.4.3, TAR v1.21, ar, as, grep, ranlib, strip, ld, etc.  I've
>> renamed
>> >> the
>> >> > 'mcs' file native to Solaris to something else.  I've replaced the
>> >> "-mt"
>> >> > option in gthread-2.0.pc with -D_REENTRANT.  I'm including a copy of
>> >> > libgdiplus v2.4 that I built, although I understand that's just
>> needed
>> >> for
>> >> > System.Drawing to work.
>> >> > </P><P>
>> >> > I've tried including and not including my v2.0.1 bin and lib in my
>> >> > environment to no avail.  I've tried various combinations of
>> configure
>> >> > options such as these:  --disable-dtrace --with-gc=none
>> >> > --with-sigaltstack=no --with-ikvm-native=no --disable-mcs-build. 
>> The
>> >> > summary at the end of Configure confirms that these work (i.e. I was
>> >> > previously using signaltstack=no...), and "TLS: pthread", which I
>> >> believe
>> >> > was auto-detected correctly.  I'm using "ulimit -Hs 10240" now but
>> it
>> >> > doesn't seem to be doing anything.  I've tried using monolite from
>> >> > mono-project.org and adding that to my path.  I've even tried
>> letting
>> >> the
>> >> > _tmpinst directory get created and then editing the scripts in it to
>> >> point
>> >> > to my Mono v2.0.1 files instead of the build ones.  I have read that
>> >> > others have succeeded on Solaris 10 SPARC, so thus far I've avoid
>> >> making
>> >> > any code changes to the source, but as of this post that's my next
>> step
>> >> as
>> >> > I can't think of any other avenues.
>> >> > </P><P>
>> >> > Nothing seems to let me get past this problem - any ideas?
>> >> > </P>
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Compiling-Mono-v2.4-RC2-%28Solaris-10-SPARCv9%29-tp22587130p24051545.html
>> >> Sent from the Mono - Dev mailing list archive at Nabble.com.
>> >>
>> >> _______________________________________________
>> >> Mono-devel-list mailing list
>> >> Mono-devel-list at lists.ximian.com
>> >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> >>
>> >
>> > _______________________________________________
>> > Mono-devel-list mailing list
>> > Mono-devel-list at lists.ximian.com
>> > http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Compiling-Mono-v2.4-RC2-%28Solaris-10-SPARCv9%29-tp22587130p24056631.html
>> Sent from the Mono - Dev mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 

-- 
View this message in context: http://www.nabble.com/Compiling-Mono-v2.4-RC2-%28Solaris-10-SPARCv9%29-tp22587130p24514211.html
Sent from the Mono - Dev mailing list archive at Nabble.com.



More information about the Mono-devel-list mailing list