[Gc] Problem compiling on Sparc Solaris10

Boehm, Hans hans.boehm at hp.com
Tue Jul 12 17:59:49 PDT 2005


If you Google for the error message (minus the address), you get
messages about an old tool chain bug.

It might be fixable with newer GNU tools.  Otherwise we would need
to understand what exactly goes wrong here.

I do occasionally test on SPARC/Solaris, though not with GNU tools.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Chris Ross
> Sent: Thursday, July 07, 2005 8:54 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Problem compiling on Sparc Solaris10
> 
> 
> 
>    I have a Solaris 10 [Ultra]sparc, and when I try to build 
> gc6.5 with the default configuration generated by config, it 
> won't link the library.  The configuration tries to build 
> sparc_mach_dep.S into things, and this is apparently "not 
> right" for a gcc system, and the built-in linker.  I don't 
> know why, and assume it might work if you had the unbundled 
> compiler(s), but I don't.  I'm just using the gcc that 
> shipped with the system.
> 
>    I am seeing the following error:
> 
> /bin/bash ./libtool --mode=link gcc -fexceptions -g -O2  -o libgc.la 
> -rpath /usr/local/lib -version-info 1:2:0 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 solaris_pthreads.lo 
> solaris_threads.lo specific.lo stubborn.lo typd_mlc.lo  backgraph.lo 
> win32_threads.lo pthread_support.lo  pthread_stop_world.lo 
> darwin_stop_world.lo  sparc_mach_dep.lo -lpthread -ldl
> rm -fr .libs/libgc.la .libs/libgc.* .libs/libgc.* 
> /usr/ccs/bin/ld -G -h libgc.so.1 -o .libs/libgc.so.1.0.2  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 solaris_pthreads.lo 
> solaris_threads.lo specific.lo stubborn.lo typd_mlc.lo backgraph.lo 
> win32_threads.lo pthread_support.lo pthread_stop_world.lo 
> darwin_stop_world.lo sparc_mach_dep.lo  -lpthread -ldl -lc
> ld: fatal: relocation error: R_SPARC_32: file 
> sparc_mach_dep.lo: symbol 
> <unknown>: offset 0xfeb5d11d is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file 
> sparc_mach_dep.lo: symbol 
> <unknown>: offset 0xfeb5d123 is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file 
> sparc_mach_dep.lo: symbol 
> <unknown>: offset 0xfeb5d127 is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file 
> sparc_mach_dep.lo: symbol 
> <unknown>: offset 0xfeb5d12b is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file 
> sparc_mach_dep.lo: symbol 
> <unknown>: offset 0xfeb70bf3 is non-aligned
> ld: fatal: relocation error: R_SPARC_32: file 
> sparc_mach_dep.lo: symbol 
> <unknown>: offset 0xfeb760a6 is non-aligned
> *** Error code 1
> make: Fatal error: Command failed for target `libgc.la'
> 
> 
>    If I change the makefile to build/link with mach_dep.lo, 
> instead of sparc_mach_dep.lo, it works just fine.  The 
> asm()'s in mach_dep.c work, as expected, with gcc.  At least, 
> it builds.  I guess I haven't tested the lib yet.  Hmm, if I 
> build tests/test.c, it fails a test, then crashes with an IOT 
> instruction.  Maybe I have bigger problems.
> 
>    Perhaps the configure script needs to be changed to not 
> only check for sparc-solaris2.x, but to also check to see if 
> you're using the unbundled compilers?  Only in that case 
> adding in sparc_mach_dep.S.
> 
>    Thanks...  I'll look around for a little more information 
> on getting this running on the sparcs at all, since it's not 
> working for me yet.
> 
>                       - Chris
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com 
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 



More information about the Gc mailing list