Sun Studio 12 .. just for the heck of it ( again )

Dennis Clarke dclarke at blastwave.org
Mon Feb 20 03:40:55 CET 2012


Same as with this :

   http://gmplib.org/list-archives/gmp-bugs/2011-June/002271.html

Sun Studio 12 simply will not compile GMP 5.0.4 and fails when it hits
isfuns.cc and needs to grok attribute malloc. Well the feature list at :

    http://developers.sun.com/sunstudio/support/Ccompare.html

clearly says "Additions to the __attributes__ clause: always_inline, noinline,
pure, const, malloc, and aligned" are supported on Studio 12 and Studio 12
Update 1.

I beg to differ :

libtool: compile:  CC -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMPXX -I.. -xO3
-xarch=v9 -xchip=generic -c isfuns.cc  -KPIC -DPIC -o .libs/isfuns.o
CC: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs
"../gmp-impl.h", line 330: Warning: attribute malloc is unsupported and will
be skipped..
"../gmp-impl.h", line 879: Warning: Attribute name expected instead of const..
"../gmp-impl.h", line 879: Warning: attribute  is unsupported and will be
skipped..
"../gmp-impl.h", line 879: Error: ")" expected instead of "const".
"../gmp-impl.h", line 879: Error: The function "__gmpn_jacobi_base(unsigned
long, unsigned long, int) const" cannot be declared const.
"../gmp-impl.h", line 879: Error: "{" expected instead of ")".
"../gmp-impl.h", line 879: Error: Unexpected ")" -- Check for matching
parenthesis.
"../gmp-impl.h", line 879: Error: Operand expected instead of ")".
"../gmp-impl.h", line 952: Warning: Attribute name expected instead of const..
"../gmp-impl.h", line 952: Warning: attribute  is unsupported and will be
skipped..
"../gmp-impl.h", line 952: Error: ")" expected instead of "const".
"../gmp-impl.h", line 952: Error: The function
"__gmpn_mulmod_bnm1_next_size(long) const" cannot be declared const.
"../gmp-impl.h", line 952: Error: "," expected instead of ")".
"../gmp-impl.h", line 953: Error: "inline" is not allowed here.
"../gmp-impl.h", line 954: Error: Use ";" to terminate declarations.
"../gmp-impl.h", line 956: Error: rn is not defined.
"../gmp-impl.h", line 957: Error: rn is not defined.
"../gmp-impl.h", line 958: Error: an is not defined.
"../gmp-impl.h", line 958: Error: bn is not defined.
"../gmp-impl.h", line 958: Error: rn is not defined.
"../gmp-impl.h", line 965: Warning: Attribute name expected instead of const..
"../gmp-impl.h", line 965: Warning: attribute  is unsupported and will be
skipped..
"../gmp-impl.h", line 965: Error: ")" expected instead of "const".
"../gmp-impl.h", line 965: Error: The function
"__gmpn_sqrmod_bnm1_next_size(long) const" cannot be declared const.
"../gmp-impl.h", line 965: Error: "," expected instead of ")".
"../gmp-impl.h", line 966: Error: "inline" is not allowed here.
"../gmp-impl.h", line 967: Error: Use ";" to terminate declarations.
"../gmp-impl.h", line 969: Error: rn is not defined.
"../gmp-impl.h", line 970: Error: rn is not defined.
"../gmp-impl.h", line 971: Error: an is not defined.
"../gmp-impl.h", line 971: Error: an is not defined.
"../gmp-impl.h", line 1165: Error: Badly formed expression.
Compilation aborted, too many Error messages.
*** Error code 1
make: Fatal error: Command failed for target `isfuns.lo'
Current working directory /export/home/dclarke/pgm/C/gmpbench/gmp-5.0.4/cxx
*** Error code 1
The following command caused the error:
fail= failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
  case $f in \
    *=* | --[!k]*);; \
    *k*) failcom='fail=yes';; \
  esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc'; for subdir
in $list; do \
  echo "Making $target in $subdir"; \
  if test "$subdir" = "."; then \
    dot_seen=yes; \
    local_target="$target-am"; \
  else \
    local_target="$target"; \
  fi; \
  (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make  $local_target) \
  || eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
  make  "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/dclarke/pgm/C/gmpbench/gmp-5.0.4
*** Error code 1
make: Fatal error: Command failed for target `all'
eris-sparc-SunOS5.10 $


However GCC 4.6.2 works just fine of course.

Dennis
I am doing this to run gmpbench on a Niagara T2 T5220

-- 
--
http://pgp.mit.edu:11371/pks/lookup?op=vindex&search=0x1D936C72FA35B44B
+-------------------------+-----------------------------------+
| Dennis Clarke           | Solaris and Linux and Open Source |
| dclarke at blastwave.org   | Respect for open standards.       |
+-------------------------+-----------------------------------+



More information about the gmp-bugs mailing list