NetBSD Problem Report #50646

From www@NetBSD.org  Mon Jan 11 13:54:53 2016
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 38A9F7A0EB
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 11 Jan 2016 13:54:53 +0000 (UTC)
Message-Id: <20160111135452.230777ACC4@mollari.NetBSD.org>
Date: Mon, 11 Jan 2016 13:54:52 +0000 (UTC)
From: joel.bertrand@systella.fr
Reply-To: joel.bertrand@systella.fr
To: gnats-bugs@NetBSD.org
Subject: [netbsd-7] undefined reference to `cabsl'
X-Send-Pr-Version: www-1.0

>Number:         50646
>Category:       lib
>Synopsis:       [netbsd-7] undefined reference to `cabsl'
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 11 13:55:00 +0000 2016
>Closed-Date:    Sat Apr 11 16:27:04 +0000 2020
>Last-Modified:  Sat Apr 11 16:27:04 +0000 2020
>Originator:     BERTRAND Joël
>Release:        netbsd-7 Jan 10 2016
>Organization:
>Environment:
NetBSD legendre.systella.fr 7.0_STABLE NetBSD 7.0_STABLE (CUSTOM) #1: Sun Jan 10 12:53:36 CET 2016  root@legendre.systella.fr:/usr/obj/sys/arch/amd64/compile/CUSTOM amd64
>Description:
    I'm trying to package RPL/2 (http://www.rpl2.net). I have modified some script to build a standalone version but final link stage aborts with :

../rplcas/lib/librplcas.a(6-usual.o): In function `giac::erf0(giac::gen const&, giac::gen&, giac::context const*)':
(.text+0x3abd2): undefined reference to `cabsl'
../rplcas/lib/librplcas.a(6-usual.o): In function `giac::erf0(giac::gen const&, giac::gen&, giac::context const*)':
(.text+0x3b69a): undefined reference to `cabsl'

    I have tried to swap libraries invocations without any success. I have tried to add -std=gnu11. Same result. When makefile tries to link programm, it runs :

g++  -Wall -Wextra -g -O2 -mtune=native -march=native  -O3 -malign-double -mieee-fp -Wall -funsigned-char -g   -Wl,--export-dynamic -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/gcc49/bin/../lib -Wl,-whole-archive ../tools/openmotif-2.3.4/lib/Xm/.libs/libXm.a ../tools/libXpm-3.5.9/src/.libs/libXpm.a ../tools/zlib-1.2.8/libz.a -L/usr/X11R7/lib -lXft -lXrender -L/usr/X11R7/lib -Wl,-rpath,/usr/X11R7/lib -lfontconfig  -L/usr/X11R7/lib -Wl,-rpath,/usr/X11R7/lib -lXft  -lXmu -Wl,-no-whole-archive  -o rpl
    (here: all object files)
../lapack/lapack/liblapack.a ../lapack/blas/libblas.a ../tools/readline-6.3/libhistory.a ../tools/readline-6.3/libreadline.a ../tools/ncurses-6.0/lib/libncurses.a ../tools/libiconv-1.14/lib/.libs/libiconv.a ../tools/openssl-1.0.2e/libcrypto.a ../tools/openssl-1.0.2e/libssl.a ../tools/sqlite-3.9.2/.libs/libsqlite3.a ../tools/libsigsegv-2.11/src/.libs/libsigsegv.a ../tools/zlib-1.2.8/libz.a ../tools/gsl-2.1/.libs/libgsl.a ../rplcas/lib/librplcas.a  -L/usr/X11R7/lib -R/usr/X11R7/lib -L/usr/X11R7/lib -lXt -lX11 -lXext -lgfortran -lpthread -lm  -lrt -lrt -lpthread

    As RPL/2 requires a fortran compiler, I have built gcc49 from pkgsrc tree :

legendre$ which gcc
/usr/pkg/gcc49/bin/gcc
legendre$ gcc -v
Utilisation des specs internes.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/pkg/gcc49/libexec/gcc/x86_64--netbsd/4.9.2/lto-wrapper
Target: x86_64--netbsd
Configuré avec: ../gcc-4.9.2/configure --enable-languages='c obj-c++ objc java fortran c++' --enable-shared --enable-long-long --with-local-prefix=/usr/pkg/gcc49 --enable-libssp --enable-threads=posix --with-boot-ldflags='-static-libstdc++ -static-libgcc -Wl,-R/usr/pkg/lib ' --with-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/usr/bin/as --enable-nls --with-libiconv-prefix=/usr --with-gmp=/usr/pkg --with-mpc=/usr/pkg --with-mpfr=/usr/pkg --with-ecj-jar=/usr/pkgsrc/distfiles/ecj-4.5.jar --enable-java-home --with-os-directory=netbsd --with-arch-directory=amd64 --with-jvm-root-dir=/usr/pkg/java/gcc49 --with-java-home=/usr/pkg/java/gcc49 --with-system-zlib --enable-__cxa_atexit --with-gxx-include-dir=/usr/pkg/gcc49/include/c++/ --prefix=/usr/pkg/gcc49 --build=x86_64--netbsd --host=x86_64--netbsd --infodir=/usr/pkg/gcc49/info --mandir=/usr/pkg/gcc49/man
Modèle de thread: posix
gcc version 4.9.2 (GCC) 

legendre$ nm libm.so | grep cabsl
0000000000018828 T __c99_cabsl

There is not unprotected symbol.

Best regards,

JKB


>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50646 CVS commit: src/external/gpl3/gcc/dist/libstdc++-v3/include/std
Date: Mon, 11 Jan 2016 11:52:54 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Mon Jan 11 16:52:54 UTC 2016

 Modified Files:
 	src/external/gpl3/gcc/dist/libstdc++-v3/include/std: complex

 Log Message:
 PR/50646: Use the c99 cabs math builtins directly, because cabs and cabsf
 have broken ABI's can cabsl does not exist. The correct(?) probably fix is
 to change the cabs builtins to point to the c99 variants directly...
 XXX: pullup-7 and the same file from the gcc.old tree.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.2 -r1.2 \
     src/external/gpl3/gcc/dist/libstdc++-v3/include/std/complex

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->needs-pullups
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 19 Jun 2018 16:49:24 +0000
State-Changed-Why:
Missing fixes: pkgsrc lang/gcc49, lang/gcc48, netbsd-7, netbsd-6
Have fixes: gcc trunk (https://github.com/gcc-mirror/gcc/commit/efb5972cc5d578e36e388de565ccb2d9ae3c981f), gcc{8,7,6,5} in pkgsrc.


From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50646 CVS commit: src
Date: Wed, 20 Jun 2018 03:51:27 +0000

 Module Name:	src
 Committed By:	maya
 Date:		Wed Jun 20 03:51:27 UTC 2018

 Modified Files:
 	src/distrib/sets/lists/debug: mi
 	src/distrib/sets/lists/tests: mi
 	src/tests/lib/libm: Makefile
 Added Files:
 	src/tests/lib/libm: t_cabsl.cxx

 Log Message:
 Add test case for PR lib/50646.

 Make sure that cabsl (aka __c99_cabsl) is usable from C++.


 To generate a diff of this commit:
 cvs rdiff -u -r1.251 -r1.252 src/distrib/sets/lists/debug/mi
 cvs rdiff -u -r1.787 -r1.788 src/distrib/sets/lists/tests/mi
 cvs rdiff -u -r1.43 -r1.44 src/tests/lib/libm/Makefile
 cvs rdiff -u -r0 -r1.1 src/tests/lib/libm/t_cabsl.cxx

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50646 CVS commit: [netbsd-7] src/external/gpl3/gcc/dist/libstdc++-v3/include/std
Date: Sat, 23 Jun 2018 10:43:57 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Jun 23 10:43:57 UTC 2018

 Modified Files:
 	src/external/gpl3/gcc/dist/libstdc++-v3/include/std [netbsd-7]: complex

 Log Message:
 Pull up following revision(s) (requested by maya in ticket #1617):

 	external/gpl3/gcc/dist/libstdc++-v3/include/std/complex: revision 1.2

 PR/50646: Use the c99 cabs math builtins directly, because cabs and cabsf
 have broken ABI's can cabsl does not exist. The correct(?) probably fix is
 to change the cabs builtins to point to the c99 variants directly...

 XXX: pullup-7 and the same file from the gcc.old tree.


 To generate a diff of this commit:
 cvs rdiff -u -r1.1.1.2 -r1.1.1.2.4.1 \
     src/external/gpl3/gcc/dist/libstdc++-v3/include/std/complex

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: needs-pullups->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sat, 11 Apr 2020 16:27:04 +0000
State-Changed-Why:
fixing lang/gccN with N>=5 and netbsd-7 seems liek far enough.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.