[Mono-dev] Linking errors in mono build

Brian Crowell mono-devel at fluggo.com
Thu Feb 9 11:39:47 EST 2006


Various parts of the mono build process are failing on my installation. Building 
it raw first runs into a link error in making pedump:

****
./.libs/libmonoruntime.a(assembly.o)(.text+0x881): In function 
`mono_assemblies_init':
/home/dsl/mono-1.1.13.2/mono/metadata/assembly.c:481: undefined reference to 
`mono_set_rootdir'
collect2: ld returned 1 exit status
make: *** [pedump] Error 1
****

Investigation shows that the unix path of libmonoos.a was built, but was not 
being used, hence the missing mono_set_rootdir function.

Copying mono/os/unix/.libs/libmonoos.a to mono/os/.libs/libmonoos.a solves that 
problem, but not much further down the line, a whole mess of linker errors 
occurs while building mono itself:

****
gcc -I../.. -I../../libgc/include -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include -g -O2 -fno-strict-aliasing -g -Wall -Wunused 
-Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes 
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual 
-Wcast-align -Wwrite-strings -o mono -Wl,-version-script=./ldscript.mono main.o 
-Wl,--export-dynamic -Wl,--export-dynamic  ./.libs/libmono-static.a 
-L/usr/local/lib ../os/.libs/libmonoos.a -pthread 
/usr/local/lib/libgthread-2.0.so /usr/local/lib/libgmodule-2.0.so -ldl 
/usr/local/lib/libglib-2.0.so -lnsl -lpthread -lm -lrt
./.libs/libmono-static.a(driver.o)(.text+0x320): In function `mini_regression':
/home/dsl/mono-1.1.13.20060208/mono/mini/driver.c:290: undefined reference to 
`mono_image_get_table_rows'
./.libs/libmono-static.a(driver.o)(.text+0x349):/home/dsl/mono-1.1.13.20060208/mono/mini/driver.c:291: 
undefined reference to `mono_get_method'
./.libs/libmono-static.a(driver.o)(.text+0x357):/home/dsl/mono-1.1.13.20060208/mono/mini/driver.c:292: 
undefined reference to `mono_class_init'
./.libs/libmono-static.a(driver.o)(.text+0x3f2):/home/dsl/mono-1.1.13.20060208/mono/mini/driver.c:311: 
undefined reference to `mono_image_get_filename'
****

This appears to be because of a missing reference to 
mono/metadata/.libs/libmonoruntime.a. I'm afraid I'm not familiar with the whole 
automake business, so this one may take me awhile to fix on my own.

Can anyone help me figure out what's going on here? Please?

--Brian



More information about the Mono-devel-list mailing list