[csw-maintainers] Revisiting the GCC4 Undefined symbol __sync_fetch_and_add_4 nonsense

Geoff Davis gadavis at opencsw.org
Fri Sep 10 18:56:46 CEST 2010


  Hi all,

I'm battling with a program called NetCDF that can't be compiled under 
Sun Studio due to problems with the redistribution of the Fortran to C 
libraries. I'm attempting to compile under GCC4, but I'm getting a link 
error in the C++ bindings where it starts looking for a symbol called 
__sync_fetch_and_add_4. I'm on a Sparc system, so this of course fails.

Roger mentioned that he tweaked the compiler options for GCC4 from 
-mcpu=v8 to -m32. I tried this but checkpackage whined that all of my 
binaries and libraries were compiled for v8+ instead of v8 and wanted 
them in arch-specific sub directories.

Has anyone found the magic set of GCC4 options to make C++ work properly 
on Sparc in a fashion that generates pure sparcv8 libraries? Or should I 
just put in ignores for checkpackage and release the v8+ binaries 
instead of the v8 ones?

Package Makefile in question is 
https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/pkg/netcdf/branches/gar-fortran/Makefile

Also, I haven't been able to get ahold of Ihsan recently. I actually 
sent a couple of emails to this list last Friday, September 3, but they 
never posted. I'm trying to use the mail.opencsw.org SMTP server instead 
of my work SMTP box in case there is some weird interaction there.

Thanks,
Geoff


More information about the maintainers mailing list