[Mono-list] Troubles compiling mono on cygwin
Norbert Harrer
Norbert Harrer <nharrer@gmx.at>
Sat, 2 Nov 2002 20:04:50 +0100
Hi.
This is my first time compiling mono on cygwin. Unfortunately I am
playing around with it since two days now without success.
I am using mono-build-w32.sh. It downloaded the mono source code and
some packages, ran autogen.sh and make. But make failed because of
some funny lines in mono/mono/Makefile [see makefile log 1 at end].
Here are the lines that caused the failure (line 310):
if PLATFORM_WIN32
arch monograph interpreter jit tests benchmark
else
arch monograph interpreter jit tests benchmark handles
endif
Somewhere else I read about using the devel version of automake if
something goes wrong. So I removed the two lines which set AUTO_STABLE
and AUTO_DEVEL to /usr/autotool/stable in mono-build-w32.sh. And
hurray, the newly generated Makefiles compiled away quite a while.
Until they hit mono/mono/jit [see makefile log 2]. After messing
around with it for a while, I got rid of most errors by adding
-lgmodule-2.0 -lglib-2.0 -lintl and -liconv to the linker args in the
Makefile. But references to __assert and __errno are still unresolved.
Has anybody every had similar problems?
B.t.w. I always removed the the whole source tree before every
mono-build-w32.sh run. And I have just updated cygwin. I have
installed all the devel packages. Here are the version numbers of some
of the packages:
autoconf-devel: 2.53a-1
autoconf-stable: 2.13-4
automake-devel: 1.6.2-1
automake-stable: 1.4p5-5
gcc: 3.2-1
gcc-mingw: 3.2-20020817-1
make: 3.79.1-7
mingw-runtime: 2.2-1
I would be happy about every hint.
Thanks,
Norbert.
--- makefile log 1 ------------------------------------------
make all-recursive
make[1]: Entering directory `/home/Norbert/mono/mono'
Making all in mono
make[2]: Entering directory `/home/Norbert/mono/mono/mono'
Makefile:310: *** missing separator. Stop.
make[2]: Leaving directory `/home/Norbert/mono/mono/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Norbert/mono/mono'
make: *** [all-recursive-am] Error 2
-------------------------------------------------------------
--- makefile log 2 ------------------------------------------
[snip]
Making all in jit
make[3]: Entering directory `/home/Norbert/mono/mono/mono/jit'
make all-am
make[4]: Entering directory `/home/Norbert/mono/mono/mono/jit'
/bin/bash ../../libtool --mode=link gcc -mno-cygwin -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -L/home/Norbert/mono/install/lib -o libmono.la -rpath C:/mono/install/lib -Wl,-version-script=./ldscript win32-exception.lo codegen-x86.lo emit-x86.lo regset.lo debug.lo debug-stabs.lo debug-dwarf2.lo jit.lo trampoline.lo exception.lo linear-scan.lo helpers.lo ../metadata/libmonoruntime.la ../metadata/libmetadata.la ../io-layer/libwapi.la ../utils/libmonoutils.la ../os/libmonoos.la -lgc -lws2_32 -lpsapi
rm -fr .libs/libmono.dll.a .libs/libmono.lax
*** Warning: linker path does not have real file for library -lgc.
*** I have the capability to make that library automatically link in when
*** 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.
rm -fr .libs/libmono.lax
mkdir .libs/libmono.lax
rm -fr .libs/libmono.lax/libmonoruntime.a
mkdir .libs/libmono.lax/libmonoruntime.a
(cd .libs/libmono.lax/libmonoruntime.a && ar x /home/Norbert/mono/mono/mono/jit/../metadata/.libs/libmonoruntime.a)
rm -fr .libs/libmono.lax/libmetadata.a
mkdir .libs/libmono.lax/libmetadata.a
(cd .libs/libmono.lax/libmetadata.a && ar x /home/Norbert/mono/mono/mono/jit/../metadata/.libs/libmetadata.a)
rm -fr .libs/libmono.lax/libwapi.a
mkdir .libs/libmono.lax/libwapi.a
(cd .libs/libmono.lax/libwapi.a && ar x /home/Norbert/mono/mono/mono/jit/../io-layer/.libs/libwapi.a)
rm -fr .libs/libmono.lax/libmonoutils.a
mkdir .libs/libmono.lax/libmonoutils.a
(cd .libs/libmono.lax/libmonoutils.a && ar x /home/Norbert/mono/mono/mono/jit/../utils/.libs/libmonoutils.a)
rm -fr .libs/libmono.lax/libmonoos.a
mkdir .libs/libmono.lax/libmonoos.a
(cd .libs/libmono.lax/libmonoos.a && ar x /home/Norbert/mono/mono/mono/jit/../os/.libs/libmonoos.a)
gcc -shared .libs/win32-exception.o .libs/codegen-x86.o .libs/emit-x86.o .libs/regset.o .libs/debug.o .libs/debug-stabs.o .libs/debug-dwarf2.o .libs/jit.o .libs/trampoline.o .libs/exception.o .libs/linear-scan.o .libs/helpers.o .libs/libmono.lax/libmonoruntime.a/appdomain.o .libs/libmono.lax/libmonoruntime.a/debug-mono-symfile.o .libs/libmono.lax/libmonoruntime.a/decimal.o .libs/libmono.lax/libmonoruntime.a/exception.o .libs/libmono.lax/libmonoruntime.a/file-io.o .libs/libmono.lax/libmonoruntime.a/gc.o .libs/libmono.lax/libmonoruntime.a/icall.o .libs/libmono.lax/libmonoruntime.a/marshal.o .libs/libmono.lax/libmonoruntime.a/object.o .libs/libmono.lax/libmonoruntime.a/process.o .libs/libmono.lax/libmonoruntime.a/profiler.o .libs/libmono.lax/libmonoruntime.a/rand.o .libs/libmono.lax/libmonoruntime.a/reflection.o .libs/libmono.lax/libmonoruntime.a/socket-io.o .libs/libmono.lax/libmonoruntime.a/string-icalls.o .libs/libmono.lax/libmonoruntime.a/sysmath.o .libs/libmono.lax/libmonoruntime.a/threadpool.o .libs/libmono.lax/libmonoruntime.a/threads.o .libs/libmono.lax/libmonoruntime.a/unicode.o .libs/libmono.lax/libmetadata.a/assembly.o .libs/libmono.lax/libmetadata.a/class.o .libs/libmono.lax/libmetadata.a/debug-helpers.o .libs/libmono.lax/libmetadata.a/domain.o .libs/libmono.lax/libmetadata.a/image.o .libs/libmono.lax/libmetadata.a/loader.o .libs/libmono.lax/libmetadata.a/mempool.o .libs/libmono.lax/libmetadata.a/metadata.o .libs/libmono.lax/libmetadata.a/mono-config.o .libs/libmono.lax/libmetadata.a/mono-endian.o .libs/libmono.lax/libmetadata.a/opcodes.o .libs/libmono.lax/libmetadata.a/rawbuffer.o .libs/libmono.lax/libmetadata.a/verify.o .libs/libmono.lax/libwapi.a/io-layer-dummy.o .libs/libmono.lax/libmonoutils.a/mono-hash.o .libs/libmono.lax/libmonoutils.a/mono-md5.o .libs/libmono.lax/libmonoutils.a/mono-sha1.o .libs/libmono.lax/libmonoutils.a/monobitset.o .libs/libmono.lax/libmonoutils.a/strtod.o .libs/libmono.lax/libmonoos.a/util.o -L/home/Norbert/mono/install/lib -lws2_32 -lpsapi -Wl,-version-script=./ldscript -o .libs/cygmono-0.dll -Wl,--image-base=0x10000000 -Wl,--out-implib,.libs/libmono.dll.a
Creating library file: .libs/libmono.dll.a
.libs/win32-exception.o: In function `seh_handler':
/home/Norbert/mono/mono/mono/jit/win32-exception.c:51: undefined reference to `_g_malloc'
.libs/codegen-x86.o: In function `mono_burg_emit_16':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1259: undefined reference to `__assert'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1259: undefined reference to `__assert'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1259: undefined reference to `__assert'
.libs/codegen-x86.o: In function `mono_burg_emit_23':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1387: undefined reference to `_g_log'
.libs/codegen-x86.o: In function `mono_burg_emit_26':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1484: undefined reference to `__assert'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1484: undefined reference to `__assert'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1484: undefined reference to `__assert'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1489: undefined reference to `__assert'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1489: undefined reference to `__assert'
.libs/codegen-x86.o:/home/Norbert/mono/mono/mono/jit/codegen-x86.c:1489: more undefined references to `__assert' follow
.libs/codegen-x86.o: In function `mono_burg_emit_64':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2201: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2201: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2210: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2210: undefined reference to `_g_free'
.libs/codegen-x86.o: In function `mono_burg_emit_66':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2237: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2237: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2246: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2246: undefined reference to `_g_free'
.libs/codegen-x86.o: In function `mono_burg_emit_68':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2315: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2315: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2324: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2324: undefined reference to `_g_free'
.libs/codegen-x86.o: In function `mono_burg_emit_69':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2332: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2332: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2333: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2333: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2344: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2344: undefined reference to `_g_free'
.libs/codegen-x86.o: In function `mono_burg_emit_70':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2352: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2352: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2353: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2353: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2364: undefined reference to `_g_strdup_printf'
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2364: undefined reference to `_g_free'
.libs/codegen-x86.o: In function `mono_burg_emit_81':
/home/Norbert/mono/mono/mono/jit/codegen-x86.c:2515: undefined reference to `_g_log'
.libs/codegen-x86.o: In function `mono_burg_emit_91':
[snip:
another 3000 lines complaining about undefined _g_**** references]
/home/Norbert/mono/mono/mono/utils/monobitset.c:405: undefined reference to `_g_log'
.libs/libmono.lax/libmonoutils.a/monobitset.o: In function `mono_bitset_intersection':
/home/Norbert/mono/mono/mono/utils/monobitset.c:422: undefined reference to `_g_log'
.libs/libmono.lax/libmonoutils.a/monobitset.o: In function `mono_bitset_sub':
/home/Norbert/mono/mono/mono/utils/monobitset.c:439: undefined reference to `_g_log'
.libs/libmono.lax/libmonoutils.a/strtod.o: In function `bsd_strtod':
/home/Norbert/mono/mono/mono/utils/strtod.c:1390: undefined reference to `__errno'
/home/Norbert/mono/mono/mono/utils/strtod.c:1392: undefined reference to `__imp___HUGE'
/home/Norbert/mono/mono/mono/utils/strtod.c:1443: undefined reference to `__errno'
.libs/libmono.lax/libmonoos.a/util.o: In function `mono_set_rootdir':
/home/Norbert/mono/mono/mono/os/win32/util.c:26: undefined reference to `_g_path_get_dirname'
/home/Norbert/mono/mono/mono/os/win32/util.c:27: undefined reference to `_g_path_get_dirname'
/home/Norbert/mono/mono/mono/os/win32/util.c:28: undefined reference to `_g_build_path'
/home/Norbert/mono/mono/mono/os/win32/util.c:31: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/os/win32/util.c:32: undefined reference to `_g_free'
/home/Norbert/mono/mono/mono/os/win32/util.c:33: undefined reference to `_g_free'
collect2: ld returned 1 exit status
make[4]: *** [libmono.la] Error 1
make[4]: Leaving directory `/home/Norbert/mono/mono/mono/jit'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/Norbert/mono/mono/mono/jit'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/Norbert/mono/mono/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Norbert/mono/mono'
make: *** [all] Error 2
--------------------------------------------------------------