Compiling GMP 6.0.0a failed (Solaris 11/SPARC): '__gmpn_clz_tab' undeclared

André Schneider Andre.Schneider at eas.iis.fraunhofer.de
Mon Dec 1 16:36:11 UTC 2014


Hi all,

I have successfully compiled GMP 5.1.2 and 5.1.3 in the
same environment:

    Solaris 11/SPARC
    GCC 4.8.1
    setenv CFLAGS   "-O2 -m64 -mcpu=niagara4"
    setenv LDFLAGS  "-m64 -mcpu=niagara4 -L${PREFIX}/lib64
-L${PREFIX}/lib -Wl,-rpath=${PREFIX}/lib64 -Wl,-rpath=${PREFIX}
/lib"

    ultrasparc-sun-solaris2.11

If I compile GMP 6.0.0a a NEW error occures (configure, make):

    ./configure --prefix=/usr/local/gcc-4.9.2

--------------------------------------------------------------------
...
    using ABI="64"
      CC="gcc -std=gnu99"
      CFLAGS="-O2 -m64 -mcpu=niagara4"
      CPPFLAGS="-I/usr/local/gcc-4.9.2/include"
      MPN_PATH=" sparc64/ultrasparc1234 sparc64 generic"
...
configure: summary of build options:

  Version:           GNU MP 6.0.0
  Host type:         ultrasparc-sun-solaris2.11
  ABI:               64
  Install prefix:    /usr/local/gcc-4.9.2
  Compiler:          gcc -std=gnu99
  Static libraries:  yes
  Shared libraries:  yes
--------------------------------------------------------------------

    make

--------------------------------------------------------------------
...
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
-D__GMP_WITHIN_GMP -I.. -DOPERATION_divrem_1
-I/usr/local/gcc-4.9.2/include -O2 -m64 -mcpu=niagara4 -c divrem_1.c
-fPIC -DPIC -o .libs/divrem_1.o
In file included from divrem_1.c:32:0:
divrem_1.c: In function '__gmpn_divrem_1':
../gmp.h:251:18: error: '__gmpn_clz_tab' undeclared (first use in this
function)
 #define __MPN(x) __gmpn_##x
--------------------------------------------------------------------

Do you have any ideas?

Thanks,
André


Full log output after error:
--------------------------------------------------------------------
/bin/ksh ../libtool --tag=CC    --mode=compile gcc -std=gnu99
-DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I..  -DOPERATION_`echo
divrem_1 | sed 's/_$//'`   -I/usr/local/gcc-4.9.2/include  -O2 -m64
-mcpu=niagara4 -c -o divrem_1.lo divrem_1.c
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
-D__GMP_WITHIN_GMP -I.. -DOPERATION_divrem_1
-I/usr/local/gcc-4.9.2/include -O2 -m64 -mcpu=niagara4 -c divrem_1.c
-fPIC -DPIC -o .libs/divrem_1.o
In file included from divrem_1.c:32:0:
divrem_1.c: In function '__gmpn_divrem_1':
../gmp.h:251:18: error: '__gmpn_clz_tab' undeclared (first use in this
function)
 #define __MPN(x) __gmpn_##x
                  ^
../gmp-impl.h:1060:33: note: in expansion of macro '__MPN'
 #define __clz_tab               __MPN(clz_tab)
                                 ^
../mpn/sparc64/sparc64.h:173:39: note: in expansion of macro '__clz_tab'
     (count) = W_TYPE_SIZE + 1 - __a - __clz_tab[__xr >> __a];
       \
                                       ^
divrem_1.c:135:7: note: in expansion of macro 'count_leading_zeros_32'
       count_leading_zeros_32 (norm, d_limb);
       ^
../gmp.h:251:18: note: each undeclared identifier is reported only once
for each function it appears in
 #define __MPN(x) __gmpn_##x
                  ^
../gmp-impl.h:1060:33: note: in expansion of macro '__MPN'
 #define __clz_tab               __MPN(clz_tab)
                                 ^
../mpn/sparc64/sparc64.h:173:39: note: in expansion of macro '__clz_tab'
     (count) = W_TYPE_SIZE + 1 - __a - __clz_tab[__xr >> __a];
       \
                                       ^
divrem_1.c:135:7: note: in expansion of macro 'count_leading_zeros_32'
       count_leading_zeros_32 (norm, d_limb);
       ^
*** Error code 1
make: Fatal error: Command failed for target `divrem_1.lo'
Current working directory /tools/usrlocal5.11/src/gmp-6.0.0/mpn
*** 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 rand cxx 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 /tools/usrlocal5.11/src/gmp-6.0.0
*** Error code 1
make: Fatal error: Command failed for target `all'
Exit 1
--------------------------------------------------------------------



-- 
André Schneider
Multiphysics Simulation
Fraunhofer Institute for Integrated Circuits IIS
Design Automation Division EAS
Zeunerstraße 38, 01069 Dresden, Germany

phone: +49-351-4640-841
fax: +49-351-4640-703
mailto:andre.schneider at eas.iis.fraunhofer.de
http://www.eas.iis.fraunhofer.de



More information about the gmp-bugs mailing list