[Gc] Problems again with built libs ;-(

Linuxhippy linuxhippy@web.de
Mon, 09 Dec 2002 18:30:30 +0100


Hi!

Thanks for the fast response!

 >	(a) build so it can run on any i386-compatible processor,
 >	    but is optimized for the kinds of i386-compatible processors
 >	    which are common today?
 >
Yeah, that exactly what I want!

 >Try `configure --enable-threads=<thread package>' for some appropriate 
value
 >of <thread package>.  Try `configure --help' for information on what the
 >possible values might be, or if that fails, try reading the documentation.
 >
 >
Hmm, I the --help flag only told me to set the type, hmm, i tries posix
and it seems to build fine.


But when I want to compile a program using libgc.a or libgc.so, I get
the followin errors:

clemi@cc02eiss:~/Kompilieren/gc6.1/tests> gcc -o test -I ../include/
../.libs/libgc.so.1.0.1  test.c
../.libs/libgc.so.1.0.1: undefined reference to `dlopen'
collect2: ld returned 1 exit status



or:

clemi@cc02eiss:~/Kompilieren/gc6.1/tests> gcc -o test -I ../include/
  ../.libs/libgc.a test.c
/tmp/ccjP3Mli.o: In function `cons':
/tmp/ccjP3Mli.o(.text+0x1f): undefined reference to `GC_malloc_stubborn'
/tmp/ccjP3Mli.o(.text+0x44): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x89): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x99): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xe7): undefined reference to `GC_end_stubborn_change'
/tmp/ccjP3Mli.o: In function `small_cons':
/tmp/ccjP3Mli.o(.text+0x106): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x12b): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o: In function `small_cons_uncollectable':
/tmp/ccjP3Mli.o(.text+0x164): undefined reference to
`GC_malloc_uncollectable'
/tmp/ccjP3Mli.o(.text+0x189): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o: In function `check_ints':
/tmp/ccjP3Mli.o(.text+0x2c7): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x2d7): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x304): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x314): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o: In function `check_uncollectable_ints':
/tmp/ccjP3Mli.o(.text+0x35f): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x36f): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x39f): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x3af): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o: In function `print_int_list':
/tmp/ccjP3Mli.o(.text+0x3f7): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x41a): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x43f): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x46e): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o: In function `reverse_test':
/tmp/ccjP3Mli.o(.text+0x4f0): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x509): undefined reference to `GC_realloc'
/tmp/ccjP3Mli.o(.text+0x53b): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x557): undefined reference to `GC_realloc'
/tmp/ccjP3Mli.o(.text+0x58b): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x5a7): undefined reference to `GC_realloc'
/tmp/ccjP3Mli.o(.text+0x60a): undefined reference to `GC_free'
/tmp/ccjP3Mli.o(.text+0x6e8): undefined reference to `GC_realloc'
/tmp/ccjP3Mli.o(.text+0x705): undefined reference to `GC_realloc'
/tmp/ccjP3Mli.o: In function `finalizer':
/tmp/ccjP3Mli.o(.text+0x803): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x813): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o: In function `mktree':
/tmp/ccjP3Mli.o(.text+0x82f): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x86c): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x94a): undefined reference to `GC_register_finalizer'
/tmp/ccjP3Mli.o(.text+0x96f): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x97f): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x9a7): undefined reference to
`GC_general_register_disappearing_link'
/tmp/ccjP3Mli.o(.text+0x9c7): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x9d7): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x9ee): undefined reference to
`GC_unregister_disappearing_link'
/tmp/ccjP3Mli.o(.text+0xa0e): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xa1e): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xa38): undefined reference to
`GC_general_register_disappearing_link'
/tmp/ccjP3Mli.o(.text+0xa58): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xa68): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o: In function `chktree':
/tmp/ccjP3Mli.o(.text+0xaa5): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xab5): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xae7): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xaf7): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xb3c): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0xb97): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o: In function `alloc_small':
/tmp/ccjP3Mli.o(.text+0xbd9): undefined reference to `GC_malloc_atomic'
/tmp/ccjP3Mli.o(.text+0xbf9): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xc09): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o: In function `tree_test':
/tmp/ccjP3Mli.o(.text+0xc75): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xc85): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xc9d): undefined reference to `GC_noop'
/tmp/ccjP3Mli.o: In function `typed_test':
/tmp/ccjP3Mli.o(.text+0xd31): undefined reference to `GC_make_descriptor'
/tmp/ccjP3Mli.o(.text+0xd45): undefined reference to `GC_make_descriptor'
/tmp/ccjP3Mli.o(.text+0xd59): undefined reference to `GC_make_descriptor'
/tmp/ccjP3Mli.o(.text+0xd6d): undefined reference to `GC_make_descriptor'
/tmp/ccjP3Mli.o(.text+0xd85): undefined reference to `GC_make_descriptor'
/tmp/ccjP3Mli.o(.text+0xd9b): undefined reference to
`GC_malloc_explicitly_typed'
/tmp/ccjP3Mli.o(.text+0xdd6): undefined reference to
`GC_malloc_explicitly_typed'
/tmp/ccjP3Mli.o(.text+0xe0a): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xe1a): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xe4a): undefined reference to
`GC_malloc_explicitly_typed'
/tmp/ccjP3Mli.o(.text+0xe80): undefined reference to
`GC_malloc_explicitly_typed'
/tmp/ccjP3Mli.o(.text+0xeb5): undefined reference to
`GC_calloc_explicitly_typed'
/tmp/ccjP3Mli.o(.text+0xef3): undefined reference to
`GC_calloc_explicitly_typed'
/tmp/ccjP3Mli.o(.text+0xf0d): undefined reference to
`GC_calloc_explicitly_typed'
/tmp/ccjP3Mli.o(.text+0xf41): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xf51): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xfaa): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0xfba): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0xfe1): undefined reference to `GC_gcollect'
/tmp/ccjP3Mli.o(.text+0xfec): undefined reference to `GC_noop'
/tmp/ccjP3Mli.o: In function `run_one_test':
/tmp/ccjP3Mli.o(.text+0x1015): undefined reference to `GC_free'
/tmp/ccjP3Mli.o(.text+0x1029): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x1032): undefined reference to `GC_size'
/tmp/ccjP3Mli.o(.text+0x1044): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x104d): undefined reference to `GC_size'
/tmp/ccjP3Mli.o(.text+0x105f): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x1068): undefined reference to `GC_size'
/tmp/ccjP3Mli.o(.text+0x108b): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x109b): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x10ae): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x10b7): undefined reference to `GC_size'
/tmp/ccjP3Mli.o(.text+0x10d6): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x10df): undefined reference to `GC_size'
/tmp/ccjP3Mli.o(.text+0x10ed): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x10fd): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x1110): undefined reference to
`GC_malloc_uncollectable'
/tmp/ccjP3Mli.o(.text+0x1119): undefined reference to `GC_size'
/tmp/ccjP3Mli.o(.text+0x113a): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x114a): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x1153): undefined reference to
`GC_is_valid_displacement_print_proc'
/tmp/ccjP3Mli.o(.text+0x115d): undefined reference to
`GC_is_visible_print_proc'
/tmp/ccjP3Mli.o(.text+0x1171): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x1186): undefined reference to `GC_base'
/tmp/ccjP3Mli.o(.text+0x11a7): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x11b7): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x11c5): undefined reference to `GC_base'
/tmp/ccjP3Mli.o(.text+0x11e5): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x11f5): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x120a): undefined reference to `GC_same_obj'
/tmp/ccjP3Mli.o(.text+0x1232): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x1242): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x1250): undefined reference to `GC_is_visible'
/tmp/ccjP3Mli.o(.text+0x1263): undefined reference to `GC_is_visible'
/tmp/ccjP3Mli.o(.text+0x1286): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x1296): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x12bb): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x12cb): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x12d9): undefined reference to
`GC_is_valid_displacement'
/tmp/ccjP3Mli.o(.text+0x12ec): undefined reference to
`GC_is_valid_displacement'
/tmp/ccjP3Mli.o(.text+0x1303): undefined reference to
`GC_is_valid_displacement'
/tmp/ccjP3Mli.o(.text+0x132d): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x133d): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x134a): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x136c): undefined reference to `GC_memalign'
/tmp/ccjP3Mli.o(.text+0x13a0): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x13b3): undefined reference to
`GC_all_interior_pointers'
/tmp/ccjP3Mli.o(.text+0x13c5): undefined reference to
`GC_all_interior_pointers'
/tmp/ccjP3Mli.o(.text+0x13ec): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x13fc): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x1410): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x142a): undefined reference to `GC_malloc'
/tmp/ccjP3Mli.o(.text+0x1458): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x1479): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o: In function `check_heap_stats':
/tmp/ccjP3Mli.o(.text+0x14a4): undefined reference to `GC_collect_a_little'
/tmp/ccjP3Mli.o(.text+0x14bc): undefined reference to `GC_gcollect'
/tmp/ccjP3Mli.o(.text+0x14c1): undefined reference to `GC_invoke_finalizers'
/tmp/ccjP3Mli.o(.text+0x14ea): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x150a): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x152a): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x154a): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x156a): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x158e): more undefined references to `GC_printf'
follow
/tmp/ccjP3Mli.o: In function `check_heap_stats':
/tmp/ccjP3Mli.o(.text+0x15e4): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x1602): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x166c): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x168e): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x16ac): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x16c1): undefined reference to `GC_arrays'
/tmp/ccjP3Mli.o(.text+0x16c7): undefined reference to `GC_arrays'
/tmp/ccjP3Mli.o(.text+0x16d5): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x16ed): undefined reference to `GC_get_heap_size'
/tmp/ccjP3Mli.o(.text+0x16fb): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x1703): undefined reference to `GC_arrays'
/tmp/ccjP3Mli.o(.text+0x1709): undefined reference to `GC_arrays'
/tmp/ccjP3Mli.o(.text+0x1767): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x1777): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x177f): undefined reference to `GC_get_heap_size'
/tmp/ccjP3Mli.o(.text+0x17a6): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x17b6): undefined reference to `GC_abort'
/tmp/ccjP3Mli.o(.text+0x17d2): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o: In function `warn_proc':
/tmp/ccjP3Mli.o(.text+0x17f6): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o: In function `main':
/tmp/ccjP3Mli.o(.text+0x1823): undefined reference to `GC_set_warn_proc'
/tmp/ccjP3Mli.o(.text+0x182b): undefined reference to
`GC_enable_incremental'
/tmp/ccjP3Mli.o(.text+0x1844): undefined reference to `GC_printf'
/tmp/ccjP3Mli.o(.text+0x1860): undefined reference to `GC_printf'
collect2: ld returned 1 exit status
clemi@cc02eiss:~/Kompilieren/gc6.1/tests>

This happens with and without threading-library. My libs are both about
170kB, not stripped.
The make-script says everything went O.K., as far as I can remember the
last lines were:

"ranlib .libs/libgc.a
creating libgc.la
(cd .libs && rm -f libgc.la && ln -s ../libgc.la libgc.la)"

and thats it. Hmm thats all I get.

Does anybody know whats that? I really dont know it, it seems that some
symbols are missing, but everything compilied fine.
I think I already had this problem with 6.1 and 6.0, the lastest working
one was 5.3 ;-((

I hope Im not nerving you...

Thx Linuxhippy