Problem compiling 4.2.4 on Solaris 10 with Sun Studio 12

John Center john.center at villanova.edu
Sat Feb 21 19:41:53 CET 2009


Hi Marc,


Marc Glisse wrote:
> On Fri, 20 Feb 2009, John Center wrote:
> 
>> To follow up, I recompiled with GMP 4.2.4 with -library=stlport4. I used 
>> the -enable-cxx option & the compile failed while building osdoprnti.cc.
> 
> Oh yes, I had forgotten to warn you about this gmp bug.
> 
That's ok about the gmp bug. I missed it in my search on gmp bugs & the 
"-DHAVE_CONFIG_H" flag threw me off for a while.  Since it's included 
with the cc & c++ compiles, I assumed it was actually being used.  Silly 
me...  ;-)


> These are the flags for misc/t-locale.c, not cxx/t-locale.cc.
> 
Sorry about that, I missed that.  Here they are:

  CC -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMPXX -I.. 
-I/opt/gnu/include -I/opt/local/include -I/usr/sfw/include 
-I/usr/include -D__GMP_NO_ATTRIBUTE_CONST_PURE -g0 -xs -fast -fsimple=1 
-fns=no -xtarget=ultraT1 -xarch=sparcvis2 -m64 -mt -xipo -xcode=pic32 
-xpagesize=default -features=extensions -library=stlport4,sunperf

-R/opt/gnu/lib/sparcv9 -R/opt/local/lib/sparcv9 -R/usr/sfw/lib/sparcv9 
-R/usr/lib/sparcv9 -L/opt/gnu/lib/sparcv9 -L/opt/local/lib/sparcv9 -L
/usr/sfw/lib/sparcv9 -L/usr/lib/sparcv9 -lumem -lpthread -lc  -ztext 
-Bdirect -zlazyload -zcombreloc -zignore


>> Could someone please tell me what might be wrong?
> 
> I don't know. Well I do know that stlport4 only supports the C locale, but 
> that should not cause this segfault. Also, you are using -fast without 
> -fsimple=0, which could cause problems, but usually not just there.
> 

> You could try running the test in dbx with check -all to get more 
> information, but I fear someone more knowledgeable than me will have to 
> help. You can try -library=stlport4_dbg, play with the various options 
> used (try with the default flags for instance), check you have the latest 
> patches for your compiler, etc.
> 
> Not related: I see you are compiling for a T1. You may want to replace 
> -xarch=sparcvis2 by -xarch=sparc there (I am not sure whether gmp disables 
> the use of floating point for the T1). Also, -xlic_lib=sunperf is a bit 
> useless for gmp.
> 
As you may be able to tell, I've been trying to come up with a common 
set of flags to build apps & libs for the ultraT1  platform.  So, this 
is for a T1000/T2000, not a Netra T1.  I've had to tweak these a bit, 
but I've gotten good results so far.  But, nothing's perfect..  :-)

Thanks for your help.

	-John

-- 
John Center
Villanova University


More information about the gmp-bugs mailing list