NetBSD Problem Report #49387

From www@NetBSD.org  Wed Nov 12 16:50:50 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(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 DE0C8A65FC
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 12 Nov 2014 16:50:50 +0000 (UTC)
Message-Id: <20141112165049.B56D2A66A4@mollari.NetBSD.org>
Date: Wed, 12 Nov 2014 16:50:49 +0000 (UTC)
From: kuehro@gmx.de
Reply-To: kuehro@gmx.de
To: gnats-bugs@NetBSD.org
Subject: erfl and erfcl missing
X-Send-Pr-Version: www-1.0

>Number:         49387
>Category:       lib
>Synopsis:       erfl and erfcl missing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 12 16:55:00 +0000 2014
>Last-Modified:  Thu Nov 13 21:45:00 +0000 2014
>Originator:     Kai-Uwe Eckhardt
>Release:        7.99.1
>Organization:
>Environment:
>Description:
erfl and erfcl are required by the C99, C++11 and Fortran 2008 standards,
but missing in NetBSD.
>How-To-Repeat:

>Fix:
Take the version from FreeBSD.

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, lib-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: lib/49387: erfl and erfcl missing
Date: Wed, 12 Nov 2014 19:39:20 -0500

 On Nov 12,  4:55pm, kuehro@gmx.de (kuehro@gmx.de) wrote:
 -- Subject: lib/49387: erfl and erfcl missing

 | >Number:         49387
 | >Category:       lib
 | >Synopsis:       erfl and erfcl missing
 | >Confidential:   no
 | >Severity:       non-critical
 | >Priority:       low
 | >Responsible:    lib-bug-people
 | >State:          open
 | >Class:          change-request
 | >Submitter-Id:   net
 | >Arrival-Date:   Wed Nov 12 16:55:00 +0000 2014
 | >Originator:     Kai-Uwe Eckhardt
 | >Release:        7.99.1
 | >Organization:
 | >Environment:
 | >Description:
 | erfl and erfcl are required by the C99, C++11 and Fortran 2008 standards,
 | but missing in NetBSD.
 | >How-To-Repeat:

 nm /usr/lib/libm.so  | grep erf
 00000000000173b0 T __ieee754_remainderf
 000000000000c430 T erf
 000000000000c8e8 T erfc
 000000000000bf7b T erfcf
 000000000000bae4 T erff
 000000000000b4e0 T nextafterf
 0000000000015744 T remainderf

 uname -a
 NetBSD quasar.astron.com 7.99.1 NetBSD 7.99.1 (QUASAR) #70: Sun Nov  9 20:09:53 UTC 2014  root@quasar.astron.com:/usr/src/sys/arch/amd64/compile/QUASAR amd64

From: Dave Huang <khym@azeotrope.org>
To: gnats-bugs@NetBSD.org, lib-bug-people@netbsd.org, 
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: lib/49387: erfl and erfcl missing
Date: Thu, 13 Nov 2014 12:00:30 -0600

 On 2014-11-12 6:40 PM, Christos Zoulas wrote:
 >   nm /usr/lib/libm.so  | grep erf
 >   00000000000173b0 T __ieee754_remainderf
 >   000000000000c430 T erf
 >   000000000000c8e8 T erfc
 >   000000000000bf7b T erfcf
 >   000000000000bae4 T erff
 >   000000000000b4e0 T nextafterf
 >   0000000000015744 T remainderf

 Not sure if you were trying to demonstrate that the functions are
 missing or that they are present--if the latter, the PR is about erfl
 and erfcl being missing not that all erf* functions are missing. The nm
 output shows that the "l" versions are indeed missing.

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, lib-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, kuehro@gmx.de
Cc: 
Subject: Re: lib/49387: erfl and erfcl missing
Date: Thu, 13 Nov 2014 13:34:51 -0500

 On Nov 13,  6:05pm, khym@azeotrope.org (Dave Huang) wrote:
 -- Subject: Re: lib/49387: erfl and erfcl missing

 |  Not sure if you were trying to demonstrate that the functions are
 |  missing or that they are present--if the latter, the PR is about erfl
 |  and erfcl being missing not that all erf* functions are missing. The nm
 |  output shows that the "l" versions are indeed missing.

 Yes, but there are no FreeBSD versions... FreeBSD just does:

 __weak_reference(erf, erfl);

 which I don't think works.

 christos

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, lib-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, kuehro@gmx.de
Cc: 
Subject: Re: lib/49387: erfl and erfcl missing
Date: Thu, 13 Nov 2014 13:38:04 -0500

 On Nov 13,  1:34pm, christos@zoulas.com (Christos Zoulas) wrote:
 -- Subject: Re: lib/49387: erfl and erfcl missing

 | Yes, but there are no FreeBSD versions... FreeBSD just does:
 | 
 | __weak_reference(erf, erfl);
 | 
 | which I don't think works.

 I missed that:

 #if (LDBL_MANT_DIG == 53)    
 __weak_reference(erf, erfl); 
 #endif 

 christos

From: "Kai-Uwe Eckhardt" <kuehro@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: lib/49387: erfl and erfcl missing
Date: Thu, 13 Nov 2014 20:08:01 +0100

 Hi,

 the FreeBSD sources for erfl and erfcl can be found here:

 https://svnweb.freebsd.org/base/head/lib/msun/ld128/

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, lib-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, kuehro@gmx.de
Cc: 
Subject: Re: lib/49387: erfl and erfcl missing
Date: Thu, 13 Nov 2014 14:50:29 -0500

 On Nov 13,  7:15pm, kuehro@gmx.de ("Kai-Uwe Eckhardt") wrote:
 -- Subject: Re: lib/49387: erfl and erfcl missing

 |  the FreeBSD sources for erfl and erfcl can be found here:
 |  
 |  https://svnweb.freebsd.org/base/head/lib/msun/ld128/

 Yes, but it is more complicated than that. It is not just erfl that
 needs the ld128/ld80 treatment... It is a good project for someone
 to do... To bring long double support to libm correctly. OpenBSD
 has done it, by copying the FreeBSD code and porting it. Our structs
 and defines are more similar to OpenBSD, so perhaps starting from there
 is going to be easier. I looked into it a bit, and it seems like a few
 days of work to get the first couple of platforms working, and a lot
 more to get the rest and the testing done.

 christos

From: "Kai-Uwe Eckhardt" <kuehro@gmx.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: Re: lib/49387: erfl and erfcl missing
Date: Thu, 13 Nov 2014 21:23:17 +0100

 >  Yes, but it is more complicated than that. 

 Yes I know, and I really think the world doesn't need long double. People
 should think about their algorithms before using it and about the performance
 penalty. But since it is part of the standards, programs like gcc and R complain
 about missing functions. 

 Thanks for all your work on the long double complex functions by the way, it
 really helped to reduce test failures in gcc.

 Kai-Uwe


From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, lib-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, kuehro@gmx.de
Cc: 
Subject: Re: Re: lib/49387: erfl and erfcl missing
Date: Thu, 13 Nov 2014 16:40:42 -0500

 On Nov 13,  8:25pm, kuehro@gmx.de ("Kai-Uwe Eckhardt") wrote:
 -- Subject: Re: Re: lib/49387: erfl and erfcl missing

 | The following reply was made to PR lib/49387; it has been noted by GNATS.
 | 
 | From: "Kai-Uwe Eckhardt" <kuehro@gmx.de>
 | To: gnats-bugs@NetBSD.org
 | Cc: 
 | Subject: Re: Re: lib/49387: erfl and erfcl missing
 | Date: Thu, 13 Nov 2014 21:23:17 +0100
 | 
 |  >  Yes, but it is more complicated than that. 
 |  
 |  Yes I know, and I really think the world doesn't need long double. People
 |  should think about their algorithms before using it and about the performance
 |  penalty. But since it is part of the standards, programs like gcc and R complain
 |  about missing functions. 
 |  
 |  Thanks for all your work on the long double complex functions by the way, it
 |  really helped to reduce test failures in gcc.

 For now we can do the regular hack in the dummy functions... I think I'll
 do that for expediency. I do have some work in progress fixing the issue
 but it will be a while until it gets in commit worthy shape:
 http://www.netbsd.org/~christos/libm.tar.gz

 christos

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.