Re[2]: [Gc] [bdwgc] 7.2alpha6 fails to compile with clang (#14)

Ivan Maidanski ivmai at mail.ru
Sun Mar 4 04:15:07 PST 2012


Hi Hans A.,

This is known (caused by using deprecated API) but could anybody propose a fix for it?

Regards.

04 03 2012, 15:55 Hans Aberg <haberg-1 at telia.com>:
> On 4 Mar 2012, at 11:50, Ivan Maidanski wrote:
> 
> > I've added a workaround for the bug to "release" branch - please test it.
> > (I've post the alternate solution to "master" branch on Monday after testing.)
> 
> It compiled, from 'git clone --branch "release" ...', and all 10 'make check' tests passed, though I got 3 warnings (below), and linker comments (even further below).
> 
> Hans
> 
> --------
> libtool: compile:  /usr/bin/clang -DHAVE_CONFIG_H -I./include -I../bdwgc/include -I./libatomic_ops/src -I../bdwgc/libatomic_ops/src -fexceptions -g -O2 -fno-strict-aliasing -MT dyn_load.lo -MD -MP -MF .deps/dyn_load.Tpo -c ../bdwgc/dyn_load.c  -fno-common -DPIC -o .libs/dyn_load.o
> ../bdwgc/dyn_load.c:1379:37: warning: incompatible pointer types passing 'void (const struct mach_header_64 *, intptr_t)' to parameter of type
>       'void (*)(const struct mach_header *, intptr_t)' [-Wincompatible-pointer-types]
>   _dyld_register_func_for_add_image(GC_dyld_image_add);
>                                     ^~~~~~~~~~~~~~~~~
> /usr/include/mach-o/dyld.h:61:54: note: passing argument to parameter 'func' here
> extern void _dyld_register_func_for_add_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide)) ...
>                                                      ^
> ../bdwgc/dyn_load.c:1380:40: warning: incompatible pointer types passing 'void (const struct mach_header_64 *, intptr_t)' to parameter of type
>       'void (*)(const struct mach_header *, intptr_t)' [-Wincompatible-pointer-types]
>   _dyld_register_func_for_remove_image(GC_dyld_image_remove);
>                                        ^~~~~~~~~~~~~~~~~~~~
> /usr/include/mach-o/dyld.h:62:57: note: passing argument to parameter 'func' here
> extern void _dyld_register_func_for_remove_image(void (*func)(const struct mach_header* mh, intptr_t vmaddr_slide)) ...
>                                                         ^
> ../bdwgc/dyn_load.c:1403:12: warning: '_dyld_bind_fully_image_containing_address' is deprecated [-Wdeprecated-declarations]
>       if (!_dyld_bind_fully_image_containing_address(
>            ^
> 3 warnings generated.
> 
> --------
> libtool: link: ar cru .libs/libgc.a  allchblk.o alloc.o blacklst.o checksums.o dbg_mlc.o dyn_load.o finalize.o gc_dlopen.o gcj_mlc.o headers.o malloc.o mallocx.o mark.o mark_rts.o misc.o new_hblk.o obj_map.o os_dep.o pcr_interface.o ptr_chck.o real_malloc.o reclaim.o specific.o stubborn.o typd_mlc.o backgraph.o thread_local_alloc.o pthread_start.o pthread_support.o pthread_stop_world.o darwin_stop_world.o atomic_ops.o mach_dep.o
> /usr/bin/ranlib: file: .libs/libgc.a(checksums.o) has no symbols
> /usr/bin/ranlib: file: .libs/libgc.a(gc_dlopen.o) has no symbols
> /usr/bin/ranlib: file: .libs/libgc.a(pcr_interface.o) has no symbols
> /usr/bin/ranlib: file: .libs/libgc.a(real_malloc.o) has no symbols
> /usr/bin/ranlib: file: .libs/libgc.a(specific.o) has no symbols
> /usr/bin/ranlib: file: .libs/libgc.a(backgraph.o) has no symbols
> /usr/bin/ranlib: file: .libs/libgc.a(pthread_stop_world.o) has no symbols
> libtool: link: ranlib .libs/libgc.a
> ranlib: file: .libs/libgc.a(checksums.o) has no symbols
> ranlib: file: .libs/libgc.a(gc_dlopen.o) has no symbols
> ranlib: file: .libs/libgc.a(pcr_interface.o) has no symbols
> ranlib: file: .libs/libgc.a(real_malloc.o) has no symbols
> ranlib: file: .libs/libgc.a(specific.o) has no symbols
> ranlib: file: .libs/libgc.a(backgraph.o) has no symbols
> ranlib: file: .libs/libgc.a(pthread_stop_world.o) has no symbols
> libtool: link: ( cd ".libs" && rm -f "libgc.la" && ln -s "../libgc.la" "libgc.la" )
> /bin/sh ./libtool  --tag=CC   --mode=compile /usr/bin/clang -DHAVE_CONFIG_H   -I./include -I../bdwgc/include -I./libatomic_ops/src -I../bdwgc/libatomic_ops/src  -fexceptions -g -O2 -fno-strict-aliasing -MT cordbscs.lo -MD -MP -MF .deps/cordbscs.Tpo -c -o cordbscs.lo `test -f 'cord/cordbscs.c' || echo '../bdwgc/'`cord/cordbscs.c
> --------



More information about the Gc mailing list