|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Problem compiling 4.2.4 on Solaris 10 with Sun Studio 12Hi,
I was unable to compile GMP 4.2.4 on Solaris 10 with Sun Studio 12. The errors were: "ismpf.cc", line 53: Error: Could not find a match for std::use_facet<std::Facet >(const std::locale) needed in operator>>(std::istream &, __mpf_struct*). "ismpf.cc", line 53: Error: Could not find a match for std::use_facet<std::Facet >(const std::locale) needed in operator>>(std::istream &, __mpf_struct*). "ismpf.cc", line 65: Error: Could not find a match for std::use_facet<std::Facet >(const std::locale) needed in operator>>(std::istream &, __mpf_struct*). 3 Error(s) and 11 Warning(s) detected. gmake[2]: *** [ismpf.lo] Error 1 I found a patch on gmp-bugs for GMP 4.2.1 for Sun Studio 11 from July 2006 by Matthias Koeppe (http://gmplib.org/list-archives/gmp-bugs/2006-July/000519.html) that worked for me. Could this, or one similar to it, be added to the patch list on the home page & incorporated in the next release? Thanks. -John -- John Center Villanova University _______________________________________________ gmp-bugs mailing list gmp-bugs@... http://gmplib.org/mailman/listinfo/gmp-bugs |
|
|
Re: Problem compiling 4.2.4 on Solaris 10 with Sun Studio 12On Tue, 17 Feb 2009, John Center wrote:
> I was unable to compile GMP 4.2.4 on Solaris 10 with Sun Studio 12. The > errors were: > > "ismpf.cc", line 53: Error: Could not find a match for > std::use_facet<std::Facet >> (const std::locale) needed in operator>>(std::istream &, __mpf_struct*). > > I found a patch on gmp-bugs for GMP 4.2.1 for Sun Studio 11 from July 2006 by > Matthias Koeppe > (http://gmplib.org/list-archives/gmp-bugs/2006-July/000519.html) that worked > for me. Good that you found it. > Could this, or one similar to it, be added to the patch list on the > home page & incorporated in the next release? A FAQ about typical problems with solaris+gmp would help. But do you really still need to use the old broken version of the standard library? If you have a choice, you should really use -library=stlport4, or some other self-compiled standard library like Apache stdcxx (used by default in opensolaris and soon shipped with the compiler). Both should work fine with gmp without any patch. I somehow doubt TG will be happy to include such a workaround, but I may be wrong. Note that such a workaround should test that _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE is defined (hello MPIR...). -- Marc Glisse _______________________________________________ gmp-bugs mailing list gmp-bugs@... http://gmplib.org/mailman/listinfo/gmp-bugs |
|
|
Re: Problem compiling 4.2.4 on Solaris 10 with Sun Studio 12Thanks, Marc. I wasn't aware of the libCstd vs. libstlport issue. I'll
back out of the patch, recompile & test. -John Marc Glisse wrote: > On Tue, 17 Feb 2009, John Center wrote: > >> I was unable to compile GMP 4.2.4 on Solaris 10 with Sun Studio 12. The >> errors were: >> >> "ismpf.cc", line 53: Error: Could not find a match for >> std::use_facet<std::Facet >>> (const std::locale) needed in operator>>(std::istream &, __mpf_struct*). >> I found a patch on gmp-bugs for GMP 4.2.1 for Sun Studio 11 from July 2006 by >> Matthias Koeppe >> (http://gmplib.org/list-archives/gmp-bugs/2006-July/000519.html) that worked >> for me. > > Good that you found it. > >> Could this, or one similar to it, be added to the patch list on the >> home page & incorporated in the next release? > > A FAQ about typical problems with solaris+gmp would help. > > But do you really still need to use the old broken version of the standard > library? If you have a choice, you should really use -library=stlport4, or > some other self-compiled standard library like Apache stdcxx (used by > default in opensolaris and soon shipped with the compiler). Both should > work fine with gmp without any patch. > > I somehow doubt TG will be happy to include such a workaround, but I may > be wrong. Note that such a workaround should test that > _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE is defined (hello MPIR...). > gmp-bugs mailing list gmp-bugs@... http://gmplib.org/mailman/listinfo/gmp-bugs |
|
|
Re: Problem compiling 4.2.4 on Solaris 10 with Sun Studio 12Hi,
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. The error was: "../gmp.h", line 613: Error: va_list is not defined. ... "../gmp-impl.h", line 3258: Error: va_list is not defined. ... The problem was cstdarg was included instead of stdarg.h. Here is a patch to fix this: *** gmp-4.2.4-ORIG/cxx/osdoprnti.cc Sat Sep 1 06:09:03 2007 --- gmp-4.2.4/cxx/osdoprnti.cc Thu Feb 19 22:50:36 2009 *************** *** 22,28 **** along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <iostream> ! #include <cstdarg> /* for va_list and hence doprnt_funs_t */ #include <cstring> /* for strlen */ #include "gmp.h" --- 22,28 ---- along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #include <iostream> ! #include <stdarg.h> /* for va_list and hence doprnt_funs_t */ #include <cstring> /* for strlen */ #include "gmp.h" On a different issue, when I ran "make check" one test failed, t-locale, & dumped core. Here's the output from dbx: # dbx .libs/t-locale /var/core/core_ra_t-locale_0_0_1235103740_10227 Reading t-locale core file header read successfully Reading ld.so.1 Reading libc.so.1 Reading libgmp.so.3.4.4 Reading libumem.so.1 Reading libstlport.so.1 Reading libCrun.so.1 Reading libm.so.1 Reading librt.so.1 Reading libaio.so.1 Reading libmd.so.1 Reading libc_psr.so.1 Reading libm.so.2 Reading libgmpxx.so.4.0.4 program terminated by signal SEGV (no mapping at the fault address) 0xffffffff7eb771f8: imbue+0x0078: ldx [%o0], %i5 Current function is check_output (optimized) 141 ostringstream got; (dbx) where [1] std::basic_ios<char,std::char_traits<char> >::imbue(0xffffffff7ffff018, 0xffffffff7ffff3a0, 0xffffffff7ffff010, 0x5d8, 0x400, 0x400), at 0xffffffff7eb771f8 [2] std::basic_ios<char,std::char_traits<char> >::init(0xffffffff7ffff3a0, 0x0, 0x158, 0xffffffff7ed194c8, 0xffffffff7ed194f0, 0xffffffff7ffff248), at 0xffffffff7eb76fc8 [3] std::basic_ostringstream<char,std::char_traits<char>,std::allocator<char> >::basic_ostringstream(0xffffffff7ffff248, 0x10, 0x6f0, 0xffffffff7ffff3a0, 0xffffffff7ed19518, 0xffffffff7ed10300), at 0xffffffff7eb796d0 =>[4] check_output() (optimized), at 0x10000658c (line ~141) in "t-locale.cc" [5] main() (optimized), at 0x100006ed0 (line ~184) in "t-locale.cc" Here's the flags it was compiled & linked with: cc -xc99=%all -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../tests -I/opt/gnu/include -I/opt/local/include -I/usr/sfw/include -I/usr/include -g -xs -fast -fsimple=1 -fns=no -xtarget=ultraT1 -xarch=sparcvis2 -m64 -mt -xipo -xcode=pic32 -xpagesize=default -xlic_lib=sunperf -c t-locale.c cc -xc99=%all -g -xs -fast -fsimple=1 -fns=no -xtarget=ultraT1 -xarch=sparcvis2 -m64 -mt -xipo -xcode=pic32 -xpagesize=default -xlic_lib=sunperf -Wl,-ztext -Wl,-Bdirect -Wl,-zlazyload -Wl,-zcombreloc -Wl,-zignore -o .libs/t-locale t-locale.o -L/opt/gnu/lib/sparcv9 -L/opt/local/lib/sparcv9 -L/usr/sfw/lib/sparcv9 -L/usr/lib/sparcv9 ../../tests/.libs/libtests.a /opt/ws/dists/gmp-4.2.4/.libs/libgmp.so ../../.libs/libgmp.so -lumem -lpthread -R/opt/gnu/lib/sparcv9 -R/opt/local/lib/sparcv9 -R/usr/sfw/lib/sparcv9 -R/usr/lib/sparcv9 Could someone please tell me what might be wrong? Thanks. -John Marc Glisse wrote: > On Tue, 17 Feb 2009, John Center wrote: > >> I was unable to compile GMP 4.2.4 on Solaris 10 with Sun Studio 12. The >> errors were: >> >> "ismpf.cc", line 53: Error: Could not find a match for >> std::use_facet<std::Facet >>> (const std::locale) needed in operator>>(std::istream &, __mpf_struct*). >> I found a patch on gmp-bugs for GMP 4.2.1 for Sun Studio 11 from July 2006 by >> Matthias Koeppe >> (http://gmplib.org/list-archives/gmp-bugs/2006-July/000519.html) that worked >> for me. > > Good that you found it. > >> Could this, or one similar to it, be added to the patch list on the >> home page & incorporated in the next release? > > A FAQ about typical problems with solaris+gmp would help. > > But do you really still need to use the old broken version of the standard > library? If you have a choice, you should really use -library=stlport4, or > some other self-compiled standard library like Apache stdcxx (used by > default in opensolaris and soon shipped with the compiler). Both should > work fine with gmp without any patch. > > I somehow doubt TG will be happy to include such a workaround, but I may > be wrong. Note that such a workaround should test that > _RWSTD_NO_TEMPLATE_ON_RETURN_TYPE is defined (hello MPIR...). > gmp-bugs mailing list gmp-bugs@... http://gmplib.org/mailman/listinfo/gmp-bugs |
|
|
Re: Problem compiling 4.2.4 on Solaris 10 with Sun Studio 12On 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. > On a different issue, when I ran "make check" one test failed, t-locale, & > dumped core. > > Here's the output from dbx: > > # dbx .libs/t-locale /var/core/core_ra_t-locale_0_0_1235103740_10227 > Reading t-locale > core file header read successfully > Reading ld.so.1 > Reading libc.so.1 > Reading libgmp.so.3.4.4 > Reading libumem.so.1 > Reading libstlport.so.1 > Reading libCrun.so.1 > Reading libm.so.1 > Reading librt.so.1 > Reading libaio.so.1 > Reading libmd.so.1 > Reading libc_psr.so.1 > Reading libm.so.2 > Reading libgmpxx.so.4.0.4 > program terminated by signal SEGV (no mapping at the fault address) > 0xffffffff7eb771f8: imbue+0x0078: ldx [%o0], %i5 > Current function is check_output (optimized) > 141 ostringstream got; > (dbx) where > [1] std::basic_ios<char,std::char_traits<char> >::imbue(0xffffffff7ffff018, > 0xffffffff7ffff3a0, 0xffffffff7ffff010, 0x5d8, 0x400, 0x400), at > 0xffffffff7eb771f8 > [2] std::basic_ios<char,std::char_traits<char> >::init(0xffffffff7ffff3a0, > 0x0, 0x158, 0xffffffff7ed194c8, 0xffffffff7ed194f0, 0xffffffff7ffff248), at > 0xffffffff7eb76fc8 > [3] > std::basic_ostringstream<char,std::char_traits<char>,std::allocator<char> >> ::basic_ostringstream(0xffffffff7ffff248, 0x10, 0x6f0, 0xffffffff7ffff3a0, > 0xffffffff7ed19518, 0xffffffff7ed10300), at 0xffffffff7eb796d0 > =>[4] check_output() (optimized), at 0x10000658c (line ~141) in "t-locale.cc" > [5] main() (optimized), at 0x100006ed0 (line ~184) in "t-locale.cc" > > Here's the flags it was compiled & linked with: > > cc -xc99=%all -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../tests > -I/opt/gnu/include -I/opt/local/include -I/usr/sfw/include -I/usr/include -g > -xs -fast -fsimple=1 -fns=no -xtarget=ultraT1 -xarch=sparcvis2 -m64 -mt -xipo > -xcode=pic32 -xpagesize=default -xlic_lib=sunperf -c t-locale.c > > cc -xc99=%all -g -xs -fast -fsimple=1 -fns=no -xtarget=ultraT1 > -xarch=sparcvis2 -m64 -mt -xipo -xcode=pic32 -xpagesize=default > -xlic_lib=sunperf -Wl,-ztext -Wl,-Bdirect -Wl,-zlazyload -Wl,-zcombreloc > -Wl,-zignore -o .libs/t-locale t-locale.o -L/opt/gnu/lib/sparcv9 > -L/opt/local/lib/sparcv9 -L/usr/sfw/lib/sparcv9 -L/usr/lib/sparcv9 > ../../tests/.libs/libtests.a /opt/ws/dists/gmp-4.2.4/.libs/libgmp.so > ../../.libs/libgmp.so -lumem -lpthread -R/opt/gnu/lib/sparcv9 > -R/opt/local/lib/sparcv9 -R/usr/sfw/lib/sparcv9 -R/usr/lib/sparcv9 These are the flags for misc/t-locale.c, not cxx/t-locale.cc. > 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. -- Marc Glisse _______________________________________________ gmp-bugs mailing list gmp-bugs@... http://gmplib.org/mailman/listinfo/gmp-bugs |
|
|
Re: Problem compiling 4.2.4 on Solaris 10 with Sun Studio 12Hi 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. > 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 _______________________________________________ gmp-bugs mailing list gmp-bugs@... http://gmplib.org/mailman/listinfo/gmp-bugs |
| Free embeddable forum powered by Nabble | Forum Help |