Package: g++-3.2 Severity: important Version: 3.2.1-0pre5 As James has already posted, the following does not work on sparc:
| (unstable)[EMAIL PROTECTED]:~$ cat test.C | #include <cstdio> | | int main (int argc, char **argv) | { | printf("Hello\n"); | return 0; | | } | (unstable)[EMAIL PROTECTED]:~$ echo "#include <cmath>" > test-with-cmath.C; cat test.C >> test-with-cmath.C | (unstable)[EMAIL PROTECTED]:~$ g++ -o test{,.C}; echo $? | 0 | (unstable)[EMAIL PROTECTED]:~$ g++-3.2 -o test{,.C}; echo $? | 0 | (unstable)[EMAIL PROTECTED]:~$ g++ -o test-with-cmath{,.C}; echo $? | 0 | (unstable)[EMAIL PROTECTED]:~$ g++-3.2 -o test-with-cmath{,.C}; echo $? | In file included from test-with-cmath.C:1: | /usr/include/c++/3.2/cmath: In function `long double std::acos(long double)': | /usr/include/c++/3.2/cmath:109: `::acosl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::asin(long double)': | /usr/include/c++/3.2/cmath:127: `::asinl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::atan(long double)': | /usr/include/c++/3.2/cmath:145: `::atanl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::atan2(long double, | long double)': | /usr/include/c++/3.2/cmath:164: `::atan2l' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::ceil(long double)': | /usr/include/c++/3.2/cmath:183: `::ceill' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::cosh(long double)': | /usr/include/c++/3.2/cmath:211: `::coshl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::exp(long double)': | /usr/include/c++/3.2/cmath:229: `::expl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::floor(long double)': | /usr/include/c++/3.2/cmath:257: `::floorl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::fmod(long double, | long double)': | /usr/include/c++/3.2/cmath:276: `::fmodl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::frexp(long double, | int*)': | /usr/include/c++/3.2/cmath:295: `::frexpl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::ldexp(long double, | int)': | /usr/include/c++/3.2/cmath:315: `::ldexpl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::log(long double)': | /usr/include/c++/3.2/cmath:334: `::logl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::log10(long double)': | /usr/include/c++/3.2/cmath:352: `::log10l' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::modf(long double, | long double*)': | /usr/include/c++/3.2/cmath:376: `::modfl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::pow(long double, long | double)': | /usr/include/c++/3.2/cmath:410: `::powl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::sinh(long double)': | /usr/include/c++/3.2/cmath:451: `::sinhl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::tan(long double)': | /usr/include/c++/3.2/cmath:479: `::tanl' undeclared (first use here) | /usr/include/c++/3.2/cmath: In function `long double std::tanh(long double)': | /usr/include/c++/3.2/cmath:497: `::tanhl' undeclared (first use here) | 1 | (unstable)[EMAIL PROTECTED]:~$ The problem is caused by /usr/lib/gcc-lib/sparc-linux/3.2.1/include/bits/mathdef.h:77: #ifndef __NO_LONG_DOUBLE_MATH # if __WORDSIZE == 32 /* Signal that in 32bit ABI we do not really have a `long double'. The disables the declaration of all the `long double' function variants. */ # define __NO_LONG_DOUBLE_MATH 1 # endif when combined with:/usr/include/c++/3.2/sparc-linux/bits/c++config.h:398: /* Define if you have the acosl function. */ #define _GLIBCPP_HAVE_ACOSL 1 (and other #defines like it that cause the above errors) So, all of the functions that are causing an error need to be wrapped in # ifndef __NO_LONG_DOUBLE_MATH - 0 blocks in c++config.h, or in # __WORDSIZE checks. This may mean that sparc needs an arch specific # c++config.h, like it has an arch specific mathdef.h However, all of these functions do exist in libm.so.6, so perhaps the sparc specific bits/mathdef.h should be removed instead? Ben? What should we do with this? -- Ryan Murray, Debian Developer ([EMAIL PROTECTED], [EMAIL PROTECTED]) The opinions expressed here are my own.
pgpVFkCTPNCES.pgp
Description: PGP signature