[Mono-list] Compile error with current cvs

Lluis Sanchez lluis@ideary.com
Mon, 3 Feb 2003 16:17:22 +0100


I've been tracking down the source of the problem, and it seems to be in
The script mono-build-w32.sh selects the stable version of autoconf, which
generates a configure script that fails to detect gc.h, due to a problem
already pointed out by Francisco Figueiredo some mails ago. This is the
output in config.log:

gcc -mno-cygwin -E -I/home/Lluis/install/include -DGC_WIN32_THREADS -DWIN32_
THREADS conftest.c >/dev/null 2>conftest.out
In file included from configure:6521:
/home/Lluis/install/include/gc/gc.h:61:1: warning: "GC_WIN32_THREADS"
conftest.c:1:1: warning: this is the location of the previous definition
configure: failed program was:
#line 6520 "configure"
#include "confdefs.h"
#include <gc/gc.h>

This problem can be solved by commenting the #define GC_WIN32_THREADS in
gc.h. Then, it compiles.

On the other hand, the script autogen.sh does not select the stable version
of autoconf, so when it is not executed through mono-build-w32.sh, it uses
the devel version to generate the configure script. This script does not
fail to detect gc.h as far as CPPFLAGS is set to my install/include
directory. However, the libtool script generated by this configure script is
unable to link the jit, since it generates all those "undefined reference"

So to compile using autogen.h I had to include this in the script:

CPPFLAGS="$CPPFLAGS -I/home/Lluis/install/include"
LDFLAGS="$LDFLAGS -L/home/Lluis/install/lib"
export LDFLAGS

if [ ! -z "${AUTO_STABLE}" -o -e /usr/autotool/stable ]; then
export AUTO_STABLE=${AUTO_STABLE:-/usr/autotool/stable}

Well, I've been able to compile and install... and now I get this when error
when running mono:

** ERROR **: file jit.c: line 4101 (mono_get_lmf_addr): should not be

But that's another problem ...


----- Original Message -----
From: "Gonzalo Paniagua Javier" <gonzalo@ximian.com>
To: <mono-list@lists.ximian.com>
Sent: Sunday, February 02, 2003 11:33 PM
Subject: Re: [Mono-list] Compile error with current cvs

> El vie, 31-01-2003 a las 18:29, Lluis Sanchez escribió:
> > *** Warning: linker path does not have real file for library -lgc.
> > *** I have the capability to make that library automatically link in
> > *** you link to this library. But I can only do this if you have a
> > *** shared version of the library, which you do not appear to have
> > *** because I did check the linker path looking for a file starting
> > *** with libgc but no candidates were found. (...for file magic test)
> > *** The inter-library dependencies that have been dropped here will be
> > *** automatically added whenever a program is linked with this library
> > *** or is declared to -dlopen it.
> I also get this warning.
> > .libs/win32-exception.o(.text+0x26): In function `seh_handler':
> > /home/Lluis/mono/mono/jit/win32-exception.c:51: undefined reference to
> > `_g_malloc'
> > .libs/codegen-x86.o(.text+0x3241): In function `mono_burg_emit_16':
> > /home/Lluis/mono/mono/jit/codegen-x86.c:1257: undefined reference to
> > `__assert'
> >
> > 57: undefined reference to `__assert'
> >
> > 57: undefined reference to `__assert'
> > .libs/codegen-x86.o(.text+0x4227): In function `mono_burg_emit_23':
> > /home/Lluis/mono/mono/jit/codegen-x86.c:1385: undefined reference to
> > `_g_log'
> > .libs/codegen-x86.o(.text+0x5495): In function `mono_burg_emit_26':
> > /home/Lluis/mono/mono/jit/codegen-x86.c:1482: undefined reference to
> > `__assert'
> >
> > ... and so on.
> >
> > I have gc.dll (the one from libgc-6.1-dev.zip) copied in my install/lib
> > folder, and all gc headers in install/include/gc.
> ...but this looks like another problem. Do you have glib2 installed and
> PKG_CONFIG_PATH properly set?
> -Gonzalo
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list