not really a bug but somewhat odd : checking compiler /usr/local/bin/gcc8 ... no, mpn_lshift_com

Dennis Clarke dclarke at blastwave.org
Sun Jul 28 10:12:06 UTC 2019


Dear gmp/mpfr folks :

On a ppc64 FreeBSD 13.0-CURRENT r350103 boxen I am getting a compile
error over and over. I have not seen this before anywhere. I am
wondering if my CFLAGS were the issue and so I simply removed them from
the equation :

hydra$
hydra$ env | sort
ABI=mode64
AR=/usr/local/bin/ar
AS=/usr/local/bin/as
BLOCKSIZE=K
CC=/usr/local/bin/gcc8
COLUMNS=132
CXX=/usr/local/bin/g++8
DISPLAY=localhost:11.0
ENV=/home/dclarke/.shrc
GREP=/usr/bin/grep
HOME=/home/dclarke
LC_COLLATE=C
LC_CTYPE=C
LC_MESSAGES=C
LC_MONETARY=C
LC_NUMERIC=C
LC_TIME=C
LD=/usr/local/bin/ld
LD_FLAGS=-Wl,-rpath=/opt/bw/lib,--enable-new-dtags
LD_RUN_PATH=/opt/bw/lib
LINES=43
LOGNAME=dclarke
MAIL=/var/mail/dclarke
MAKE=/opt/bw/bin/gmake
NM=/usr/local/bin/nm -p
OLDPWD=/opt/bw/build
PATH=/opt/bw/bin:/opt/bw/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:/usr/sbin:/opt/schily/bin
PERL=/usr/local/bin/perl
PWD=/opt/bw/build/gmp-6.1.2_FreeBSD_13.0-CURRENT_r350103_ppc64.001
SED=/usr/bin/sed
SHELL=/bin/sh
SSH_CLIENT=172.16.35.3 39398 22
SSH_CONNECTION=172.16.35.3 39398 172.16.35.8 22
SSH_TTY=/dev/pts/2
TERM=xterm
TMPDIR=/var/tmp/dclarke
TZ=GMT0
USER=dclarke
XTERM_LOCALE=C
hydra$


hydra$
hydra$ ./configure ABI=mode64 --enable-cxx --disable-assembly
--prefix=/opt/bw \
--libdir=/opt/bw/lib
checking build system type... powerpc64-unknown-freebsd13.0
checking host system type... powerpc64-unknown-freebsd13.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether /opt/bw/bin/gmake sets $(MAKE)... yes
checking whether /opt/bw/bin/gmake supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=mode64
checking whether /usr/local/bin/gcc8 is gcc... yes
checking compiler /usr/local/bin/gcc8 -m64  ... no, mpn_lshift_com
optimization 2, program does not run
checking compiler /usr/local/bin/gcc8  ... no, mpn_lshift_com
optimization 2, program does not run
configure: error: could not find a working compiler, see config.log for
details
hydra$

hydra$
hydra$ more config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU MP configure 6.1.2, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure ABI=mode64 --enable-cxx --disable-assembly
--prefix=/opt/bw --libdir=/opt/bw/lib

## --------- ##
## Platform. ##
## --------- ##

hostname = hydra
uname -m = powerpc
uname -r = 13.0-CURRENT
uname -s = FreeBSD
uname -v = FreeBSD 13.0-CURRENT r350103 GENERIC

/usr/bin/uname -p = powerpc64
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /opt/bw/bin
PATH: /opt/bw/sbin
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /usr/bin
PATH: /bin
PATH: /sbin
PATH: /usr/sbin
PATH: /opt/schily/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:3055: checking build system type
configure:3069: result: powerpc64-unknown-freebsd13.0
configure:3089: checking host system type
configure:3102: result: powerpc64-unknown-freebsd13.0
configure:3139: checking for a BSD-compatible install
configure:3207: result: /usr/bin/install -c
configure:3218: checking whether build environment is sane
configure:3273: result: yes
configure:3424: checking for a thread-safe mkdir -p
configure:3463: result: ./install-sh -c -d
configure:3470: checking for gawk
configure:3486: found /usr/local/bin/gawk
configure:3497: result: gawk
configure:3508: checking whether /opt/bw/bin/gmake sets $(MAKE)
configure:3530: result: yes
configure:3559: checking whether /opt/bw/bin/gmake supports nested variables
configure:3576: result: yes
configure:3705: checking whether to enable maintainer-specific portions
of Makefiles
configure:3714: result: no
User:
ABI=mode64
CC=/usr/local/bin/gcc8
CFLAGS=(unset)
CPPFLAGS=(unset)
MPN_PATH=
GMP:
abilist=mode64 mode32 32
cclist=gcc cc
configure:5779: /usr/local/bin/gcc8 -c conftest.c >&5
configure:5782: $? = 0
configure:5785: checking whether /usr/local/bin/gcc8 is gcc
configure:5787: result: yes
configure:5801: /usr/local/bin/gcc8 2>&1 | grep xlc >/dev/null
configure:5804: $? = 1
configure:5858: checking compiler /usr/local/bin/gcc8 -m64
Test compile:
configure:5872: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:5875: $? = 0
configure:5880: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5883: $? = 0
Test compile: function pointer return
configure:5926: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:5929: $? = 0
configure:5934: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5937: $? = 0
Test compile: cmov instruction
configure:5982: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:5985: $? = 0
configure:5990: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5993: $? = 0
Test compile: double -> ulong conversion
configure:6039: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6042: $? = 0
configure:6047: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6050: $? = 0
Test compile: double negation
configure:6094: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6097: $? = 0
configure:6102: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6105: $? = 0
Test compile: double -> float conversion
configure:6150: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6153: $? = 0
configure:6158: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6161: $? = 0
Test compile: gnupro alpha ev6 char spilling
configure:6235: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6238: $? = 0
configure:6243: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6246: $? = 0
Test compile: __builtin_alloca availability
configure:6286: /usr/local/bin/gcc8 -m64   conftest.c >&5
/usr/local/bin/ld: /usr/lib/crt1.o:(.got+0x60): undefined reference to
`main'
collect2: error: ld returned 1 exit status
configure:6289: $? = 1
failed program was:
int k; int foo () { __builtin_alloca (k); }
Test compile: abs int -> double conversion
configure:6410: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6413: $? = 0
configure:6418: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6421: $? = 0
Test compile: long long reliability test 1
configure:6475: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6478: $? = 0
configure:6483: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6486: $? = 0
Test compile: long long reliability test 2
configure:6536: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6539: $? = 0
configure:6544: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6547: $? = 0
Test compile: freebsd hacked gcc
configure:6597: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6600: $? = 0
configure:6605: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6608: $? = 0
Test compile: mpn_lshift_com optimization
configure:6696: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6699: $? = 0
configure:6704: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6707: $? = 0
Test compile: mpn_lshift_com optimization 2
configure:6805: /usr/local/bin/gcc8 -m64   conftest.c >&5
configure:6808: $? = 0
configure:6813: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
Abort trap (core dumped)
eval: ./b.out: not found
eval: ./a.exe: not found
eval: ./a_out.exe: not found
eval: ./conftest: not found
configure:6816: $? = 127
failed program was:
/* The following is mis-compiled by Intel ia-64 icc version 1.8 under
    "icc -O3",  After several calls, the function writes partial garbage to
    the result vector.  Perhaps relates to the chk.a.nc insn.  This code
needs
    to be run to show the problem, but that's fine, the offending cc is a
    native-only compiler so we don't have to worry about cross
compiling.  */

#if ! defined (__cplusplus)
#include <stdlib.h>
void
lshift_com (rp, up, n, cnt)
  unsigned long *rp;
  unsigned long *up;
  long n;
  unsigned cnt;
{
  unsigned long high_limb, low_limb;
  unsigned tnc;
  long i;
  up += n;
  rp += n;
  tnc = 8 * sizeof (unsigned long) - cnt;
  low_limb = *--up;
  high_limb = low_limb << cnt;
  for (i = n - 1; i != 0; i--)
    {
      low_limb = *--up;
      *--rp = ~(high_limb | (low_limb >> tnc));
      high_limb = low_limb << cnt;
    }
  *--rp = ~high_limb;
}
int
main ()
{
  unsigned long *r, *r2;
  unsigned long a[88 + 1];
  long i;
  for (i = 0; i < 88 + 1; i++)
    a[i] = ~0L;
  r = malloc (10000 * sizeof (unsigned long));
  r2 = r;
  for (i = 0; i < 528; i += 23)
    {
      lshift_com (r2, a,
                  i / (8 * sizeof (unsigned long)) + 1,
                  i % (8 * sizeof (unsigned long)));
      r2 += 88 + 1;
    }
  if (r[2048] != 0 || r[2049] != 0 || r[2050] != 0 || r[2051] != 0 ||
      r[2052] != 0 || r[2053] != 0 || r[2054] != 0)
    abort ();
  free (r);
  return 0;
}
#else
int
main ()
{
  return 0;
}
#endif

configure:6962: result: no, mpn_lshift_com optimization 2, program does
not run
configure:5858: checking compiler /usr/local/bin/gcc8
Test compile:
configure:5872: /usr/local/bin/gcc8   conftest.c >&5
configure:5875: $? = 0
configure:5880: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5883: $? = 0
Test compile: function pointer return
configure:5926: /usr/local/bin/gcc8   conftest.c >&5
configure:5929: $? = 0
configure:5934: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5937: $? = 0
Test compile: cmov instruction
configure:5982: /usr/local/bin/gcc8   conftest.c >&5
configure:5985: $? = 0
configure:5990: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:5993: $? = 0
Test compile: double -> ulong conversion
configure:6039: /usr/local/bin/gcc8   conftest.c >&5
configure:6042: $? = 0
configure:6047: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6050: $? = 0
Test compile: double negation
configure:6094: /usr/local/bin/gcc8   conftest.c >&5
configure:6097: $? = 0
configure:6102: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6105: $? = 0
Test compile: double -> float conversion
configure:6150: /usr/local/bin/gcc8   conftest.c >&5
configure:6153: $? = 0
configure:6158: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
configure:6161: $? = 0
.
.
.


This has me wondering ??



-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional


More information about the gmp-bugs mailing list