pkgsrc-Bugs archive

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

pkg/51788: devel/gmp build fails in configure phase



>Number:         51788
>Category:       pkg
>Synopsis:       devel/gmp build fails in configure phase
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 06 15:05:00 +0000 2017
>Originator:     Hauke Fath
>Release:        NetBSD 7.99.50
>Organization:
Technische Universitaet Darmstadt
>Environment:
	
	
System: NetBSD Gstoder 7.99.50 NetBSD 7.99.50 (MONOLITHIC) #0: Fri Dec 16 15:07:39 CET 2016 hf@Hochstuhl:/var/obj/netbsd-builds/developer/i386/sys/arch/i386/compile/MONOLITHIC i386
Architecture: i386
Machine: i386
>Description:

	The devel/gmp build fails early with

[...]
===> Configuring for gmp-6.1.2
cd /var/obj/pkgsrc/devel/gmp/work/gmp-6.1.2 && type autoconf && autoconf
autoconf is /var/obj/pkgsrc/devel/gmp/work/.tools/bin/autoconf
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
=> Checking for portability problems in extracted files
checking build system type... i486--netbsdelf
checking host system type... i486--netbsdelf
checking for a BSD-compatible install... /usr/bin/install -c -o hf -g spgmit
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking ABI=32
checking compiler gcc -O2 ... no, mpn_lshift_com optimization 2, program does not run
configure: error: could not find a working compiler, see config.log for details
*** Error code 1


	The config.log has

[...]
Test compile: mpn_lshift_com optimization 2
configure:6805: gcc -O2  conftest.c >&5
configure:6808: $? = 0
configure:6813: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest
[1]   Abort trap (core dumped) ./a.out
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:7200: error: could not find a working compiler, see config.log for details
[...]


	
>How-To-Repeat:

	Build devel/gmp on NetBSD-current/i386, find you cannot.

	
>Fix:

	No idea.

	

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index