[Mono-dev] Mono HEAD build failed if there is /usr/local/include/gc.h

KISHIMOTO, Makoto ksmakoto at dd.iij4u.or.jp
Wed Aug 17 05:04:06 EDT 2011


Mono HEAD build failed if there is /usr/local/include/gc.h .
For example, simply put "#error" to /usr/local/include/gc.h , build
failed like follows.

$ cat /usr/local/include/gc.h

$ gmake
gmake[3]: Leaving directory `/export/home/ksmakoto/Mono/BUILD/mono/metadata'
Making all in mini
gmake[3]: Entering directory `/export/home/ksmakoto/Mono/BUILD/mono/mini'
gmake  all-am
gmake[4]: Entering directory `/export/home/ksmakoto/Mono/BUILD/mono/mini'
../../doltlibtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../mono/mono/mini -I../..   -DGC_FREEBSD_THREADS -DPLATFORM_BSD -I/usr/local/include  -D__default_codegen__ -I../../../mono -I../../../mono/eglib/src -I../../eglib/src    -DHAVE_BOEHM_GC -DHAVE_GC_H -DUSE_INCLUDED_LIBGC -DHAVE_GC_GCJ_MALLOC -DHAVE_GC_ENABLE -I../../../mono/libgc/include -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 -Wwrite-strings -mno-tls-direct-seg-refs -MT libmono_2_0_la-mini.lo -MD -MP -MF .deps/libmono_2_0_la-mini.Tpo -c -o libmono_2_0_la-mini.lo `test -f 'mini.c' || echo '../../../mono/mono/mini/'`mini.c
In file included from ../../../mono/mono/utils/gc_wrapper.h:46,
                 from ../../../mono/mono/metadata/gc-internal.h:15,
                 from ../../../mono/mono/mini/mini.c:45:
/usr/local/include/gc.h:1:2: error: #error
gmake[4]: *** [libmono_2_0_la-mini.lo] Error 1
gmake[4]: Leaving directory `/export/home/ksmakoto/Mono/BUILD/mono/mini'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory `/export/home/ksmakoto/Mono/BUILD/mono/mini'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/export/home/ksmakoto/Mono/BUILD/mono'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/ksmakoto/Mono/BUILD'
gmake: *** [all] Error 2

I have no idea that to jugde how fix is correct, but in FreeBSD,
ports (package) of Boehm GC library put incompatible gc.h at
/usr/local/include , it causes trouble with Mono build. Some software
require that ports, example w3m.

(Order change of -I option of compiler is fix?)

Thank you.

More information about the Mono-devel-list mailing list