help-gnucap
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnucap] cant compile or install on solaris 5.8


From: Al Davis
Subject: Re: [Help-gnucap] cant compile or install on solaris 5.8
Date: Tue, 19 Nov 2002 16:05:22 -0700

On Tuesday 19 November 2002 01:40 am, Surendra Anubolu wrote:
> It might be my machine setup. I am not a software engineer and many of the
> error messages didnt make much sense to me.
>
> I have download gnucap-0.31 and tried compiling on a sun machine.
> uname -a
> SunOS willers 5.8 Generic_108528-16 sun4u sparc
>
> > g++ -dumpversion
>
> 3.1
>
> I have done ./configure; make
> I am getting these types of erros
>
> g++ -DUNIX -O2 -DNDEBUG -I.. -I. -fno-exceptions -W -c ../m_matrix.cc^M
> ../m_matrix.cc: In member function `BSMATRIX<T>& BSMATRIX<T>::fbsub(T*,
> const ^M T*, T*) [with T = double]':^M
> ../m_matrix.cc:438:   instantiated from here^M
> ../m_matrix.cc:410: `copy_n' undeclared in namespace `std'^M
> ../m_matrix.cc: In member function `BSMATRIX<T>& BSMATRIX<T>::fbsub(T*,
> const ^M T*, T*) [with T = COMPLEX]':^M
> ../m_matrix.cc:439:   instantiated from here^M
> ../m_matrix.cc:410: `copy_n' undeclared in namespace `std'^M
> make[2]: *** [m_matrix.o] Error 1^M

Temporary fix:
Add "-DNEEDS_COPY_N" to Make2.g++ CCFLAGS

The function "copy_n" is in some versions of STL, not others.  A few years 
ago, only had g++ and Microsoft.  I assumed that Microsoft's not having it 
was a defect, so I handled it with the flag, expecting it to be always 
available eventually.  Later, I found that it is a non-standard extension.  
Going back to an older version of the compiler may help, but it may not.  The 
define will take care of it in all cases.

It is fixed in 0.32, to always use the local copy_n.


> g++ -DUNIX -O2 -DNDEBUG -I.. -I. -fno-exceptions -W -c ../u_xprobe.cc^M
> ../u_xprobe.cc:29: default argument given for parameter 1 of `double ^M
>    XPROBE::operator()(mod_t = mtNONE, bool = false) const'^M
> ../u_xprobe.h:51: after previous specification in `double ^M
>    XPROBE::operator()(mod_t = mtNONE, bool = false) const'^M
> ../u_xprobe.cc:29: default argument given for parameter 2 of `double ^M
>    XPROBE::operator()(mod_t = mtNONE, bool = false) const'^M
> ../u_xprobe.h:51: after previous specification in `double ^M
>    XPROBE::operator()(mod_t = mtNONE, bool = false) const'^M

It is complaining about specifying default values twice.  Strictly, it is 
nonstandard but worked until now, as g++ gets stricter at enforcing the 
standard.

Again, going back to an older compiler will make the error go away.  A better 
fix is to remove the default parameters in u_xprobe.cc, line 29.

was:
 double XPROBE::operator()(mod_t m=mtNONE, bool db = false)const
change to:
 double XPROBE::operator()(mod_t m, bool db)const

> I am not very familiar these functions. I might be missing some libraries.
> can you tell me if I am not using right setup.

Those are real.  It is not a setup problem.

> I have also tried bringing binary from another sun 5.8 machine and got
> message ld.so.1: gnucap: fatal: libstdc++.so.2.10.0: open failed: No such
> file or directory

This one IS a setup problem.  Your system does not have libstdc++.so.2.10.0 
installed, which is required by that binary.  It is the standard library for 
C++.  Library compatibility can be a real nuisance, especially when you move 
binaries.  When you recompile from source, it is less of a problem.  In this 
case, you need the old libraries for programs compiled with old compilers.  
The new compiler will come with libraries it needs, but is not likely to have 
the libraries for older or competitive compilers.  If you really want to move 
binaries between systems, and be immune from the library problem, you need to 
static link.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]