I've looked into things a bit further here.  Perhaps now it's not
problems with ECL per se, but with compiling the Boehm GC.

 >  On Fri, Oct 29, 2010 at 12:48 PM, Paul Goins<gene...@vultaire.net>   wrote:
 >>  libeclmin.a(threads.o): In function `ecl_import_current_thread':
 >>  c:/Users/Vultaire/Desktop/pauls_stuff/ecl-10.4.1/src/c/threads.d:248:
 >>  undefined reference to `GC_register_my_thread'
 >>  libeclmin.a(threads.o): In function `mp_process_enable':
 >>  c:/Users/Vultaire/Desktop/pauls_stuff/ecl-10.4.1/src/c/threads.d:408:
 >>  undefined reference to `gc_createthr...@24'
 >>  libeclmin.a(threads.o): In function `ecl_release_current_thread':
 >>  c:/Users/Vultaire/Desktop/pauls_stuff/ecl-10.4.1/src/c/threads.d:280:
 >>  undefined reference to `GC_unregister_my_thread)

The above are all threading related symbols.  A straight "./configure"
on the Boehm GC build doesn't enable thread support.  Unfortunately,
"./configure --enable-threads=win32" also seems not to work; I can
compile, but the symbols are non-existant.

**For those who don't want to read the reset of this "log", my
   question is: has anyone got the Boehm GC compiled and working with
   ECL via MinGW, and if so, how exactly did you pull it off?**

More details:

The above symbols should be compiled into win32_threads.o, but nm
shows this:

$ nm win32_threads.o
00000000 b .bss
00000000 d .data
00000000 N .debug_abbrev
00000000 N .debug_info
00000000 N .debug_line
00000000 N .debug_pubtypes
00000000 t .text

I retried the compile, adding CPPFLAGS=-DWIN32_THREADS to the
configure step.  In this case, win32_threads.o seems to turn out

$ nm win32_threads.o | grep -e "GC_CreateThread" -e "GC_register_my_thread" -e 
00000ec8 T _gc_createthr...@24
0000039c T _GC_register_my_thread
000000d8 T _GC_register_my_thread_inner
0000045c T _GC_unregister_my_thread

So, it looks like I've got the needed symbols for ECL now.  But, now
the Boehm compile doesn't finish (at which point I should probably be
switching this discussion to a different ML...):

/bin/sh ./libtool --tag=CC   --mode=link gcc -fexceptions -g -O2  -version-info 
1:3:0 -no-undefined  -o libgc.la -rpath /usr/local/lib allchblk.lo alloc.lo 
blacklst.lo checksums.lo dbg_mlc.lo dyn_load.lo finalize.lo gc_dlopen.lo 
gcj_mlc.lo headers.lo malloc.lo mallocx.lo mark.lo mark_rts.lo misc.lo 
new_hblk.lo obj_map.lo os_dep.lo pcr_interface.lo ptr_chck.lo real_malloc.lo 
reclaim.lo specific.lo stubborn.lo typd_mlc.lo backgraph.lo 
thread_local_alloc.lo   win32_threads.lo atomic_ops.lo mach_dep.lo
libtool: link: gcc -shared  .libs/allchblk.o .libs/alloc.o .libs/blacklst.o 
.libs/checksums.o .libs/dbg_mlc.o .libs/dyn_load.o .libs/finalize.o 
.libs/gc_dlopen.o .libs/gcj_mlc.o .libs/headers.o .libs/malloc.o 
.libs/mallocx.o .libs/mark.o .libs/mark_rts.o .libs/misc.o .libs/new_hblk.o 
.libs/obj_map.o .libs/os_dep.o .libs/pcr_interface.o .libs/ptr_chck.o 
.libs/real_malloc.o .libs/reclaim.o .libs/specific.o .libs/stubborn.o 
.libs/typd_mlc.o .libs/backgraph.o .libs/thread_local_alloc.o 
.libs/win32_threads.o .libs/atomic_ops.o .libs/mach_dep.o -o .libs/libgc-1.dll 
-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgc.dll.a
Creating library file: .libs/libgc.dll.a
.libs/win32_threads.o: In function `GC_check_finalizer_nested':
c:\Users\Vultaire\bdwgc/win32_threads.c:562: multiple definition of 
.libs/finalize.o:c:\Users\Vultaire\bdwgc/finalize.c:510: first defined here
.libs/win32_threads.o: In function `GC_do_blocking_inner':
c:\Users\Vultaire\bdwgc/win32_threads.c:769: multiple definition of 
.libs/misc.o:c:\Users\Vultaire\bdwgc/misc.c:1541: first defined here
.libs/win32_threads.o: In function `GC_call_with_gc_active':
c:\Users\Vultaire\bdwgc/win32_threads.c:799: multiple definition of 
.libs/misc.o:c:\Users\Vultaire\bdwgc/misc.c:1496: first defined here
.libs/ptr_chck.o: In function `GC_is_visible':
c:\Users\Vultaire\bdwgc/ptr_chck.c:206: undefined reference to 
c:\Users\Vultaire\bdwgc/ptr_chck.c:211: undefined reference to 
.libs/win32_threads.o:win32_threads.c:(.text+0x7d8): undefined reference to 
.libs/win32_threads.o:win32_threads.c:(.text+0x828): undefined reference to 
collect2: ld returned 1 exit status
make[1]: *** [libgc.la] Error 1
make[1]: Leaving directory `/c/Users/Vultaire/bdwgc'
make: *** [all-recursive] Error 1

Anyway, that's as far as I've gotten so far.

- Paul

Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
Ecls-list mailing list

Reply via email to