develooper Front page | perl.perl5.porters | Postings from August 2019

[perl #134371] build-time failure on FreeBSD using clang++ andconfiguring with '-Duselongdouble'

Thread Previous
From:
James E Keenan
Date:
August 17, 2019 22:10
Subject:
[perl #134371] build-time failure on FreeBSD using clang++ andconfiguring with '-Duselongdouble'
Message ID:
rt-4.0.24-29753-1566079839-1900.134371-75-0@perl.org
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #134371]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=134371 >


When I attempt to build perl on FreeBSD using clang++ as the C-compiler 
and adding '-Duselongdouble' to the configuration options, 'make' fails 
at this relatively early point in the compilation process:

#####
$ sh ./Configure -des -Dusedevel -Dcc=clang -Duselongdouble
...
$ make
...
clang++ -c -DPERL_CORE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H 
-I/usr/local/include -D_FORTIFY_SOURCE=2 -ansi -O2 -Wall 
-Werror=declaration-after-statement -Werror=pointer-arith -Wextra 
-Wc++-compat -Wwrite-strings perly.c
clang++: warning: treating 'c' input as 'c++' when in C++ mode, this 
behavior is deprecated [-Wdeprecated]
@ 

"make.freebsd11.clang++.longdouble.output.txt" 61L, 7089C 
                 1,1           Top
sv.c:3206:21: error: use of undeclared identifier 'gcvt'
                     SNPRINTF_G(SvNVX(sv), s, SvLEN(sv), NV_DIG);
                     ^
sv.c:48:24: note: expanded from macro 'SNPRINTF_G'
     PERL_UNUSED_RESULT(Gconvert((NV)(nv), (int)ndig, 0, buffer))
                        ^
./config.h:909:27: note: expanded from macro 'Gconvert'
#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
                           ^
sv.c:13075:21: error: use of undeclared identifier 'gcvt'
                     SNPRINTF_G(fv, ebuf, sizeof(ebuf), precis)
                     ^
sv.c:48:24: note: expanded from macro 'SNPRINTF_G'
     PERL_UNUSED_RESULT(Gconvert((NV)(nv), (int)ndig, 0, buffer))
                        ^
./config.h:909:27: note: expanded from macro 'Gconvert'
#define Gconvert(x,n,t,b) gcvt((x),(n),(b))
                           ^
2 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/home/jkeenan/gitwork/perl
#####

I first noticed this in smoke-test reports filed by Carlos Guevara 
starting approximately 3 days ago.  See, e.g., 
http://perl5.test-smoke.org/report/93150.  However, I suspect that the 
clang++/uselongdouble combination was never tested on this OS until 
then.  Hence, I have no evidence that this is a regression whose 
diagnosis could be pinpointed by bisection.  Indeed, I checked out tags 
5.22.0 and 5.26.0, tried to build perl on the same platform with clang++ 
and -Duselongdouble -- and got the same or very similar build-time 
failures.  I've gotten the build-time failure with clang++/uselongdouble 
on both unthreaded and threaded builds.

By contrast, on this platform I *can* build perl 5 blead (a) with 
g++/uselongdouble (albeit with some warnings in the same patch of code 
as cited above); and with clang/uselongdouble.

Assuming this is not a regression, and given the obscurity of this 
complier/config_args combination, I'm not overly concerned about this. 
The "vendor perl" on FreeBSD is almost certainly built with clang -- not 
clang++.  I don't know enough about either clang++ or -Duselongdouble to 
comment usefully further.  But it would be good to at least diagnose the 
problem.

Thank you very much.
Jim Keenan

perl perl perl

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About