Front page | perl.perl5.porters |
Postings from October 2016
[perl #129766] [PATCH] Internal cleanup in numeric.c, no functionalchanges
Thread Next
From:
James E Keenan via RT
Date:
October 1, 2016 13:51
Subject:
[perl #129766] [PATCH] Internal cleanup in numeric.c, no functionalchanges
Message ID:
rt-4.0.24-31004-1475329903-1830.129766-15-0@perl.org
On Sat Oct 01 06:30:40 2016, jkeenan wrote:
> On Sat Oct 01 06:20:14 2016, jkeenan wrote:
> > On Fri Sep 30 12:50:17 2016, jkeenan wrote:
> > > On Fri Sep 30 10:20:48 2016, petdance wrote:
> > > > This is a bug report for perl from andy@petdance.com,
> > > > generated with the help of perlbug 1.40 running under perl
> > > > 5.24.0.
> > > >
> > > >
> > > > -----------------------------------------------------------------
> > > > [Please describe your issue here]
> > > >
> > > >
> > > > Minor internal cleanups in numeric.c
> > > >
> > > > * Simplified some variable instantiation in Perl_my_atof,
> > > > including
> > > > removing some unnecessary initialization.
> > > > * Removed some unnecessary casting in Perl_my_atof2.
> > > > * Added consts to three other internal vars.
> > > >
> > >
> > > Now available for smoke-testing in branch:
> > >
> > > smoke-me/jkeenan/petdance/129766-numeric-c
> >
> > The patch is failing to compile when you configure with '-Dcc=g++'.
> >
> > See smoke reports at http://perl.develop-help.com/?b=smoke-
> > me%2Fjkeenan%2Fpetdance%2F129766-numeric-c
> >
> > I have locally reproduced the same type of failures as reported by
> > George's g++ smoke runs at the above link. When I call 'make', I
> > very
> > quickly start to get warnings like these:
> >
> > #####
> > In file included from perl.c:37:0:
> > perl.h:6950:19: warning: anonymous type with no linkage used to
> > declare variable ‘c
> > onst<anonymous union> PL_inf’ with linkage
> > INFNAN_NV_U8_DECL PL_inf;
> > ^
> > perl.h:6951:19: warning: anonymous type with no linkage used to
> > declare variable ‘c
> > onst<anonymous union> PL_nan’ with linkage
> > INFNAN_NV_U8_DECL PL_nan;
> > ^
> > #####
> >
> > Eventually, 'make' collapses with output like this:
> >
> > #####
> > $ tail -30 petdance-numeric-c-gpp.transcript |cat
> > INFNAN_NV_U8_DECL PL_nan;
> > ^
> > rm -f ../../lib/auto/POSIX/POSIX.so
> > g++ -shared -O2 -L/usr/local/lib -fstack-protector-strong POSIX.o
> > -o
> > ../../lib/auto/POSIX/POSIX.so \
> > -lm \
> >
> > /usr/bin/ld: POSIX.o: relocation R_X86_64_PC32 against undefined
> > symbol `PL_nan' can not be used when making a shared object;
> > recompile
> > with -fPIC
> > /usr/bin/ld: final link failed: Bad value
> > collect2: error: ld returned 1 exit status
> > Makefile:478: recipe for target '../../lib/auto/POSIX/POSIX.so'
> > failed
> > make[1]: *** [../../lib/auto/POSIX/POSIX.so] Error 1
> > make[1]: Leaving directory '/home/jkeenan/gitwork/perl/ext/POSIX'
> > make[1]: Entering directory '/home/jkeenan/gitwork/perl/ext/POSIX'
> > /home/jkeenan/gitwork/perl/ext/POSIX/../../miniperl "-I../../lib"
> > -MExtUtils::Command::MM -e 'cp_nonempty' -- POSIX.bs
> > ../../lib/auto/POSIX/POSIX.bs 644
> > rm -f ../../lib/auto/POSIX/POSIX.so
> > g++ -shared -O2 -L/usr/local/lib -fstack-protector-strong POSIX.o
> > -o
> > ../../lib/auto/POSIX/POSIX.so \
> > -lm \
> >
> > /usr/bin/ld: POSIX.o: relocation R_X86_64_PC32 against undefined
> > symbol `PL_nan' can not be used when making a shared object;
> > recompile
> > with -fPIC
> > /usr/bin/ld: final link failed: Bad value
> > collect2: error: ld returned 1 exit status
> > Makefile:478: recipe for target '../../lib/auto/POSIX/POSIX.so'
> > failed
> > make[1]: *** [../../lib/auto/POSIX/POSIX.so] Error 1
> > make[1]: Leaving directory '/home/jkeenan/gitwork/perl/ext/POSIX'
> > Unsuccessful make(ext/POSIX): code=512 at make_ext.pl line 569.
> > makefile:600: recipe for target 'lib/auto/POSIX/POSIX.so' failed
> > make: *** [lib/auto/POSIX/POSIX.so] Error 25
> > #####
> >
> > Transcripts available upon request, but these are easily
> > reproducible.
> >
> > OTOH, on FreeBSD-10.3, where clang is the default cc, 'make' and
> > 'make
> > test_harness' completed successfully.
>
> Possible false alarm!
>
> To create a branch for smoke testing, I forked from blead at:
>
> #####
> commit afabfeb3299724b02541bbc9ebf0aeba14e9be17
> Author: Jarkko Hietaniemi <jhi@iki.fi>
> AuthorDate: Fri Sep 30 07:35:53 2016
> Commit: Jarkko Hietaniemi <jhi@iki.fi>
> CommitDate: Fri Sep 30 08:40:28 2016
>
> vax-netbsd: do not export inf/nan which we do not have
> #####
>
> blead is failing to compile where -Dcc=g++'. See, e.g.:
> http://perl.develop-help.com/raw/?id=195564
>
> So the real problem is probably in blead, not in this branch.
>
> Thank you very much.
Blead was broken in commit afabfeb3299724b02541bbc9ebf0aeba14e9be17,
but repaired by Jarkko here:
#####
commit 0879cd66ef3f00918ae26d9bb7ac555d3911c548
Author: Jarkko Hietaniemi <jhi@iki.fi>
AuthorDate: Fri Sep 30 17:18:16 2016
Commit: Jarkko Hietaniemi <jhi@iki.fi>
CommitDate: Sat Oct 1 09:00:15 2016
PL_inf/PL_nan need different export with C++
After the 9ee3aea9, the old way worked with C++ for building
the core, but then failed building the POSIX extension.
(This change is about building with C++ after the 9ee3aea9,
even though that change was about ordering perl.h into a more
logical order for vax-netbsd, or for any non-IEEE-754 platform.)
#####
So smoke-me/jkeenan/petdance/129766-numeric-c should now PASS when using '-Dcc=g++'. (I've confirmed that locally and hopefully smokers will confirm that as well.)
Thank you very much. We now return this RT to normal discussion.
--
James E Keenan (jkeenan@cpan.org)
---
via perlbug: queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=129766
Thread Next