NetBSD Problem Report #47930

From julio+host-netbsd-jmmv@meroh.net  Sat Jun 15 00:50:11 2013
Return-Path: <julio+host-netbsd-jmmv@meroh.net>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A84157092B
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 15 Jun 2013 00:50:11 +0000 (UTC)
Message-Id: <20130614215554.B813C352959@netbsd.meroh.net>
Date: Fri, 14 Jun 2013 17:55:54 -0400 (EDT)
From: julio+host-netbsd-jmmv@meroh.net
Reply-To: julio+host-netbsd-jmmv@meroh.net
To: gnats-bugs@NetBSD.org
Subject: Crossbuilding from ppc64 hosts is broken
X-Send-Pr-Version: 3.95

>Number:         47930
>Category:       toolchain
>Synopsis:       Crossbuilding from ppc64 hosts is broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mrg
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 15 00:55:00 +0000 2013
>Closed-Date:    Tue Dec 25 14:20:32 +0000 2018
>Last-Modified:  Tue Dec 25 14:20:32 +0000 2018
>Originator:     Julio Merino
>Release:        NetBSD 6.99.17
>Organization:

>Environment:


System: NetBSD netbsd.meroh.net 6.99.17 NetBSD 6.99.17 (GENERIC) #0: Sun Feb 24 07:58:12 EST 2013 jmmv@netbsd.meroh.net:/home/jmmv/os/merge/amd64/obj/home/jmmv/os/merge/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	Trying to build NetBSD-current from a ppc64 host (be it from Linux
        or from FreeBSD) results in the message attached below.

        I have traced down the problem to the GMP release we have in the
        tree, 5.0.2.  Updating GMP to the latest release along the 5.0.x
        series, which is 5.0.5, fixes this particular problem.  The notes
        have no specific reference to this issue, but they mention fixing
        some issues in PowerPC systems.  The changes between 5.0.2 and
        5.0.5 in the code are numerous, so cherry-picking this particular
        fix seems non-trivial.

        This has been filed from the discussion in:
        http://mail-index.netbsd.org/current-users/2013/05/01/msg022605.html

----- cut here -----
configure:5635: checking for the correct version of the gmp/mpfr/mpc libraries
configure:5666: cc -o conftest -O
-I/home/jmmv/os/netbsd/macppc/tools/include
-I/home/jmmv/os/netbsd/macppc/tools/include
-I/home/jmmv/os/netbsd/macppc/tools/include    conftest.c
-L/home/jmmv/os/netbsd/macppc/tools/lib
-L/home/jmmv/os/netbsd/macppc/tools/lib
-L/home/jmmv/os/netbsd/macppc/tools/lib -lmpc -lmpfr -lgmp >&5
/home/jmmv/os/netbsd/macppc/tools/lib/libgmp.a(divrem_1.o): In
function `__gmpn_divrem_1':
divrem_1.c:(.text+0x1b8): undefined reference to `__multi3'
divrem_1.c:(.text+0x2a0): undefined reference to `__multi3'
divrem_1.c:(.text+0x340): undefined reference to `__multi3'
divrem_1.c:(.text+0x520): undefined reference to `__multi3'
divrem_1.c:(.text+0x608): undefined reference to `__multi3'
/home/jmmv/os/netbsd/macppc/tools/lib/libgmp.a(divrem_1.o):divrem_1.c:(.text+0x710):
more undefined references to `__multi3' follow
collect2: ld returned 1 exit status
configure:5666: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <mpc.h>
| int
| main ()
| {
|
|     mpfr_t n;
|     mpfr_t x;
|     mpc_t c;
|     int t;
|     mpfr_init (n);
|     mpfr_init (x);
|     mpfr_atan2 (n, n, x, GMP_RNDN);
|     mpfr_erfc (n, x, GMP_RNDN);
|     mpfr_subnormalize (x, t, GMP_RNDN);
|     mpfr_clear(n);
|     mpfr_clear(x);
|     mpc_init2 (c, 53);
|     mpc_set_ui_ui (c, 1, 1, MPC_RNDNN);
|     mpc_cosh (c, c, MPC_RNDNN);
|     mpc_pow (c, c, c, MPC_RNDNN);
|     mpc_acosh (c, c, MPC_RNDNN);
|     mpc_clear (c);
|
|   ;
|   return 0;
| }
configure:5670: result: no
configure:5691: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and
MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.
----- cut here -----
>How-To-Repeat:
	Attempt to "build.sh tools" on a ppc64 host.
>Fix:
	Update GMP to 5.0.5.  Or look for a specific fix to this issue
        instead, but I don't think it's worth it.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: toolchain-manager->mrg
Responsible-Changed-By: jmmv@NetBSD.org
Responsible-Changed-When: Wed, 19 Jun 2013 13:02:42 +0000
Responsible-Changed-Why:
Assigning to gmp's maintainer.

I could do the update myself, but I'd like some advice as to how do you
usually do it -- particularly to check nothing has broken.


From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org
Cc: toolchain-manager@netbsd.org, netbsd-bugs@netbsd.org,
    gnats-admin@netbsd.org, jmmv@NetBSD.org,
    julio+host-netbsd-jmmv@meroh.net
Subject: re: toolchain/47930 (Crossbuilding from ppc64 hosts is broken)
Date: Thu, 20 Jun 2013 08:44:15 +1000

 > Synopsis: Crossbuilding from ppc64 hosts is broken
 > 
 > Responsible-Changed-From-To: toolchain-manager->mrg
 > Responsible-Changed-By: jmmv@NetBSD.org
 > Responsible-Changed-When: Wed, 19 Jun 2013 13:02:42 +0000
 > Responsible-Changed-Why:
 > Assigning to gmp's maintainer.
 > 
 > I could do the update myself, but I'd like some advice as to how do you
 > usually do it -- particularly to check nothing has broken.

 hmm.. we've never updated gmp yet.


 .mrg.

State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 25 Dec 2018 14:20:32 +0000
State-Changed-Why:
GMP is at 6.x and includes this fix. Thanks for the report.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.