[Gc] gc make fail on Solaris 10 x86_64 with gcc-3.* & -m64 option

Kiyoshi KANAZAWA yoi_no_myoujou at yahoo.co.jp
Tue Mar 27 06:53:27 PST 2012

Hi, Ivan,

Done without Git.

(1) release
(1.1) suggestion
I guess it is better to set -DGC_THREADS for Solaris by default.
There was choice -DGC_SOLARIS_THREADS (thr_ functions) or -DGC_THREADS in gc-7.1.
Now, it is said in doc/README.solaris2 that
  The collector must be compiled with -DGC_THREADS to be thread safe.
  This assumes use of the pthread_ interface.  Old style Solaris threads
  are no longer supported.

(1.2) test result by gcc
make & make check passed with all the combination of
(gcc-3.4.3, gcc-4.4.7, gcc-4.6.3) (-m32, -m64)

(1.3) test result with Oracle cc
Tried also Oracle cc (solstudio12.2, solarisstudio12.3), and found
make check fails (both -m32 & -m64).
It might be caused by some compile switces.
Error message is such as
libtool: link: cc -I/tmp/ivmai-bdwgc-aee0d2b -xarch=sse4_1 -xchip=core2 -xO3 -DGC_THREADS -m32 -I/usr/local/GNU/include -L/usr/local/GNU/lib -G -z defs -h libgc.so.1 -o .libs/libgc.so.1.0.3  .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/mach_dep.o   -L/usr/local/GNU/lib -ldl -lc  -xarch=sse4_1 -m32  
Undefined                       first referenced
 symbol                             in file
GC_start_world                      .libs/alloc.o
GC_do_blocking_inner                .libs/misc.o
GC_check_finalizer_nested           .libs/finalize.o
GC_allocate_lock                    .libs/alloc.o
GC_reset_finalizer_nested           .libs/finalize.o
GC_collecting                       .libs/alloc.o
GC_lock                             .libs/alloc.o
GC_push_thread_structures           .libs/mark_rts.o
GC_push_all_stacks                  .libs/os_dep.o
GC_lock_holder                      .libs/finalize.o
GC_need_to_lock                     .libs/alloc.o
GC_thr_init                         .libs/misc.o
GC_stop_world                       .libs/alloc.o
ld: fatal: symbol referencing errors. No output written to .libs/libgc.so.1.0.3
make[1]: *** [libgc.la] Error 2
make[1]: Target `all-am' not remade because of errors.
make[1]: Leaving directory `/tmp/ivmai-bdwgc-aee0d2b'
make: *** [all-recursive] Error 1
make: Target `all' not remade because of errors.
make[1]: Entering directory `/tmp/ivmai-bdwgc-aee0d2b'

(2) master
It is confusing.
make & make check passed with
(gcc-3.4.3, gcc-4.6.3,  solstudio12.2 cc , solarisstudio12.3 cc) (-m32, -m64)
and (gcc-4.4.7)  (-m64),
but make check fails only with (gcc-4.4.7) (-m32).

libtool: link: gcc -I/tmp/ivmai-master -mtune=core2 -msse3 -mfpmath=sse -O2 -m32 -I/usr/local/GNU/include -Wall -Wextra -D__PIC__=1 -g -O2 -o test_malloc test_malloc.o  -L/usr/local/GNU/lib -lpthread ../src/.libs/libatomic_ops_gpl.a ../src/.libs/libatomic_ops.a
make[3]: Leaving directory `/tmp/ivmai-master/tests'
make  check-TESTS
make[3]: Entering directory `/tmp/ivmai-master/tests'
/bin/bash: line 5: 16359 Segmentation Fault      ${dir}$tst
FAIL: test_atomic
Missing: AO_nop_acquire
Missing: AO_store_acquire
Missing: AO_short_store_acquire
Missing: AO_char_store_acquire
Missing: AO_int_store_acquire
Missing: AO_nop_release
Missing: AO_load_release
Missing: AO_short_load_release
Missing: AO_char_load_release
Missing: AO_int_load_release
Missing: AO_store_read
Missing: AO_short_store_read
Missing: AO_char_store_read
Missing: AO_int_store_read
Missing: AO_load_write
Missing: AO_short_load_write
Missing: AO_char_load_write
Missing: AO_int_load_write
Missing: AO_nop_release_write
Missing: AO_load_release_write
Missing: AO_short_load_release_write
Missing: AO_char_load_release_write
Missing: AO_int_load_release_write
Missing: AO_nop_acquire_read
Missing: AO_store_acquire_read
Missing: AO_short_store_acquire_read
Missing: AO_char_store_acquire_read
Missing: AO_int_store_acquire_read
Testing add1/sub1

I do not know what "Missing: AO..." mean, but they are found also in cases make check pass.

--- Kiyosih <yoi_no_myoujou at yahoo.co.jp>

--- On Tue, 2012/3/27, Ivan Maidanski <ivmai at mail.ru> wrote:

> Hi Kiyoshi,
> Tue, 27 Mar 2012 06:27:04 +0900 (JST) Kiyoshi KANAZAWA <yoi_no_myoujou at yahoo.co.jp>:
> > > Everything is OK now.
> > > I tested all the combination of
> > > (gcc-4.6.3, gcc-4.4.7, gcc-4.6.3), (-m32, -m64), (gc-7.1, gc-7.2alpha6).
> > 
> > wong: (gcc-4.6.3, gcc-4.4.7, gcc-4.6.3)
> > correct  (gcc-3.4.3, gcc-4.4.7, gcc-4.6.3)
> > 
> > --- Kiyoshi <yoi_no_myoujou at yahoo.co.jp>
> > 
> Would also be good if you test recent BDWGC/libatomic_ops snapshots instead of gc-7.1/7.2alpha6:
> In case you don't use Git, to test the recent "release" branch snapshot (corresponding to 7.2 final candidate):
> wget https://github.com/ivmai/bdwgc/zipball/release
> unzip release
> cd ivmai-bdwgc-*/
> wget https://github.com/ivmai/libatomic_ops/zipball/release
> unzip release
> mv ivmai-libatomic_ops-* libatomic_ops
> ./configure
> make check
> The same for "master" branch (corresponding to 7.3alpha2 candidate): just replace "release" with "master" and call ./autogen.sh before ./configure
> Regards.

More information about the Gc mailing list