pkgsrc-Bugs archive

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

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



The following reply was made to PR pkg/51788; it has been noted by GNATS.

From: Masanobu SAITOH <msaitoh%execsw.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: msaitoh%execsw.org@localhost,
 "hf%spg.tu-darmstadt.de@localhost >> Hauke Fath" <hf%spg.tu-darmstadt.de@localhost>
Subject: Re: pkg/51788 devel/gmp build fails in configure phase
Date: Wed, 14 Jun 2017 15:41:31 +0900

 Hi.
 
 > 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
 
 I can reproduce this problem with "/etc/malloc.conf -> J"
 Without the malloc.conf, I can compile it.
 
   The following change fixes with my i386 machine
 (malloc() -> calloc())
 
 OK to commit?
 
 Index: distinfo
 ===================================================================
 RCS file: /cvsroot/pkgsrc/devel/gmp/distinfo,v
 retrieving revision 1.52
 diff -u -p -r1.52 distinfo
 --- distinfo	19 Dec 2016 08:50:45 -0000	1.52
 +++ distinfo	14 Jun 2017 04:15:11 -0000
 @@ -5,5 +5,5 @@ RMD160 (gmp-6.1.2.tar.bz2) = 03b905b4d7f
   SHA512 (gmp-6.1.2.tar.bz2) = 268db88447174617f5746d9a6ba2b105940cc1a5e73155eb23b6eedf55f8e7724eda05d161b2de19aca9e794956d226ba9ed6f23124c7c82f7e1872e32b003cf
   Size (gmp-6.1.2.tar.bz2) = 2386766 bytes
   SHA1 (patch-aa) = dec275cbd5886a70f7cf0def1dedf01e7e4a49e9
 -SHA1 (patch-ab) = 829812822a72a4926ea4cf6e8ffafdcd13a0f76c
   SHA1 (patch-ac) = 6f7de0a285bec2c2645479d3090dc0276580f3d8
 +SHA1 (patch-acinclude.m4) = 7c8522c0c16f576c2f20794f0f2cac5df0066737
 Index: patches/patch-ab
 ===================================================================
 RCS file: patches/patch-ab
 diff -N patches/patch-ab
 --- patches/patch-ab	31 Jan 2013 20:30:26 -0000	1.8
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,23 +0,0 @@
 -$NetBSD: patch-ab,v 1.8 2013/01/31 20:30:26 adam Exp $
 -
 -Fixed detection of __attribute__((__mode__(XX))) for sunpro.
 -
 ---- acinclude.m4.orig	2007-09-01 12:09:03.000000000 +0200
 -+++ acinclude.m4	2007-11-25 09:26:07.000000000 +0100
 -@@ -3068,7 +3068,15 @@ dnl  Introduced in gcc 2.2, but perhaps
 - AC_DEFUN([GMP_C_ATTRIBUTE_MODE],
 - [AC_CACHE_CHECK([whether gcc __attribute__ ((mode (XX))) works],
 -                 gmp_cv_c_attribute_mode,
 --[AC_TRY_COMPILE([typedef int SItype __attribute__ ((mode (SI)));], ,
 -+[AC_TRY_COMPILE([
 -+  typedef int SItype __attribute__ ((mode (SI)));
 -+  typedef int QItype __attribute__ ((mode (QI)));
 -+], [
 -+  switch (1) {
 -+  case sizeof(SItype):
 -+  case sizeof(QItype): ;
 -+  }
 -+],
 -   gmp_cv_c_attribute_mode=yes, gmp_cv_c_attribute_mode=no)
 - ])
 - if test $gmp_cv_c_attribute_mode = yes; then
 Index: patches/patch-acinclude.m4
 ===================================================================
 RCS file: patches/patch-acinclude.m4
 diff -N patches/patch-acinclude.m4
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ patches/patch-acinclude.m4	14 Jun 2017 04:15:11 -0000
 @@ -0,0 +1,28 @@
 +--- acinclude.m4.orig	2016-12-17 00:45:27.000000000 +0900
 ++++ acinclude.m4	2017-06-14 13:05:04.000000000 +0900
 +@@ -741,7 +741,7 @@ main ()
 +   long i;
 +   for (i = 0; i < 88 + 1; i++)
 +     a[i] = ~0L;
 +-  r = malloc (10000 * sizeof (unsigned long));
 ++  r = calloc (10000, sizeof (unsigned long));
 +   r2 = r;
 +   for (i = 0; i < 528; i += 23)
 +     {
 +@@ -3228,7 +3228,15 @@ dnl  Introduced in gcc 2.2, but perhaps
 + AC_DEFUN([GMP_C_ATTRIBUTE_MODE],
 + [AC_CACHE_CHECK([whether gcc __attribute__ ((mode (XX))) works],
 +                 gmp_cv_c_attribute_mode,
 +-[AC_TRY_COMPILE([typedef int SItype __attribute__ ((mode (SI)));], ,
 ++[AC_TRY_COMPILE([
 ++  typedef int SItype __attribute__ ((mode (SI)));
 ++  typedef int QItype __attribute__ ((mode (QI)));
 ++], [
 ++  switch (1) {
 ++  case sizeof(SItype):
 ++  case sizeof(QItype): ;
 ++  }
 ++],
 +   gmp_cv_c_attribute_mode=yes, gmp_cv_c_attribute_mode=no)
 + ])
 + if test $gmp_cv_c_attribute_mode = yes; then
 
 
 -- 
 -----------------------------------------------
                  SAITOH Masanobu (msaitoh%execsw.org@localhost
                                   msaitoh%netbsd.org@localhost)
 


Home | Main Index | Thread Index | Old Index