[Mono-list] build of mono 1.1.7 & fails on Solaris: failure to compile mcs

Gerard Tromp mono.lists at sanger.med.wayne.edu
Mon Jul 18 16:24:30 EDT 2005

Dear Hari,

Thanks for the reply. That would have been my initial guess also. Perhaps I
should have indicated the additional diagnostics that I performed to rule
that out.

1. cmp shows no difference between class/lib/monolite/mcs.exe (part of the
distribution) and the newly made class/lib/basic/mcs.exe (what is supposed
to be the newly made mcs.exe) (The path references are relative to the mcs

2. file class/lib/basic/mcs.exe indicates: data. Even for an incorrectly
built binary object file indicates something like: "_binary_name_: ELF
32-bit MSB executable SPARC Version 1, dynamically linked, stripped" on a
sparc system.

3. copying the mcs.exe (either one) executable to an x386 *nix system
results in file yielding "mcs.exe: MS Windows PE 32-bit Intel 80386 console

4. Reading the scripts shows that the class/lib/monolite/mcs.exe binary is a
fallback included in the distribution intended to allow the build to
complete even if mcs.exe does not get built correctly.

The relevant portion is in "build/profiles/basic.make"
        @ok=:; \
        rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
        $(MAKE) -s $(PROFILE_OUT) || ok=false; \
        rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
        if $$ok; then :; else \
            echo "*** The compiler '$(EXTERNAL_MCS)' doesn't appear to be
usable." 1>&2 ; \
            if test -f $(topdir)/class/lib/monolite/mcs.exe; then \
                echo "*** Falling back to using pre-compiled binaries.  Be
warned, this may not work." 1>&2 ; \
                ( cd $(topdir)/jay && $(MAKE) ); \
                ( cd $(topdir)/mcs && $(MAKE) PROFILE=basic cs-parser.cs );
                ( cd $(topdir)/class/lib/monolite/ && cp *.exe *.dll
../basic ); \
                case `ls -1t $(topdir)/class/lib/basic/mcs.exe
$(topdir)/mcs/cs-parser.cs | sed 1q` in \
                $(topdir)/class/lib/basic/mcs.exe) : ;; \
                *) sleep 5; cp $(topdir)/class/lib/monolite/mcs.exe
$(topdir)/class/lib/basic ;; \
                esac; \
            else \
                echo "*** You need a C# compiler installed to build MCS.
(make sure mcs works from the command line)" 1>&2 ; \
                echo "*** Read INSTALL.txt for information on how to
bootstrap a Mono installation." 1>&2 ; \
                exit 1; fi; fi

The commands clearly indicate that if the make fails and mcs.exe exists [if
test -f $(topdir)/class/lib/monolite/mcs.exe] ) then mcs.exe is copied from
$(topdir)/class/lib/monolite to class/lib/basic

5. I have edited the make commands in build/profiles/basic.make to prevent
the supposedly newly made mcs.exe from being overwritten and verified that
no mcs.exe is actually compiled and liked.

Unfortunately, the configuration scripts are extremely complex and I have
not been able to figure out yet what commands are intended to be executed to
actually compile and link mcs.exe. If I was able to obtain those, at worst I
could executed them "by hand."


Gerard Tromp

-----Original Message-----
From: Raja R Harinath [mailto:rharinath at novell.com]
Sent: Monday, July 18, 2005 02:29
To: Gerard Tromp
Cc: mono-list at lists.ximian.com
Subject: Re: [Mono-list] build of mono 1.1.7 & fails on Solaris:
failure to compile mcs


"Gerard Tromp" <mono.lists at sanger.med.wayne.edu> writes:

> I tried to mail this in June and the request never appeared on the list. I
> have since tried to build mono and the build fails in exactly the
> same place.
> The build fails because make fails to build mcs. The failure appears to be
> in the scripts and configuration.

Nope :-)

> gmake[7]: Nothing to be done for `all-local'.
> gmake[7]: Leaving directory `/home/tromp/software/mono-1.1.7/mcs/jay'
> gmake[6]: Leaving directory `/home/tromp/software/mono-1.1.7/mcs/jay'
> gmake[6]: Entering directory `/home/tromp/software/mono-1.1.7/mcs/mcs'
> gmake all-local
> gmake[7]: Entering directory `/home/tromp/software/mono-1.1.7/mcs/mcs'
> MONO_PATH="../class/lib/basic:$MONO_PATH"
> /home/tromp/software/mono-1.1.7/runtime/mono-wrapper
> ../class/lib/basic/mcs.exe   -d:NET_1_1 -d:ONLY_1_1 -debug /target:exe
> /out:mcs.exe cs-parser.cs  @mcs.exe.sources
> Segmentation Fault - core dumped
> gmake[7]: *** [../class/lib/net_1_1_bootstrap/mcs.exe] Error 139
> gmake[7]: Leaving directory `/home/tromp/software/mono-1.1.7/mcs/mcs'
> gmake[6]: *** [all.real] Error 2
> gmake[6]: Leaving directory `/home/tromp/software/mono-1.1.7/mcs/mcs'
> gmake[5]: *** [all-recursive] Error 1
> gmake[5]: Leaving directory `/home/tromp/software/mono-1.1.7/mcs'
> gmake[4]: *** [profile-do--net_1_1_bootstrap--all] Error 2
> gmake[4]: Leaving directory `/home/tromp/software/mono-1.1.7/mcs'
> gmake[3]: *** [profiles-do--all] Error 2
> gmake[3]: Leaving directory `/home/tromp/software/mono-1.1.7/mcs'
> gmake[2]: *** [all-local] Error 2
> gmake[2]: Leaving directory `/home/tromp/software/mono-1.1.7/runtime'
> gmake[1]: *** [all-recursive] Error 1
> gmake[1]: Leaving directory `/home/tromp/software/mono-1.1.7'
> gmake: *** [all] Error 2

It probably means there's something wrong with the just-compiled mono.

- Hari

More information about the Mono-list mailing list