develooper Front page | perl.perl5.porters | Postings from May 2018

Re: [perl #132955] USE_CPLUSPLUS build broken in 5.27 blead and all5.26 stables

Thread Previous | Thread Next
From:
Steve Hay via perl5-porters
Date:
May 14, 2018 17:03
Subject:
Re: [perl #132955] USE_CPLUSPLUS build broken in 5.27 blead and all5.26 stables
Message ID:
CADED=K50aY_DXES4D+8JHO4p-VW8+GqjXWJEurO=H+pMYEthKw@mail.gmail.com
On 10 May 2018 at 14:01, Steve Hay <steve.m.hay@googlemail.com> wrote:
> On 10 May 2018 at 10:29, Dave Mitchell <davem@iabyn.com> wrote:
>> On Sat, Apr 28, 2018 at 03:12:58PM +0100, Steve Hay via perl5-porters wrote:
>>> Now in blead in commit 4bd4e9335ffc257cbe2bf1a42789f693f5797337.
>>>
>>> (Actually, I'm still confused why Socket failed given that Windows
>>> doesn't compile cpan/ differently to dist/ and ext/, but I've spent
>>> too long staring at this now...)
>>>
>>> That just leaves the GCC fixes from bulk88 to deal with on this
>>> ticket. I'll look at them soon if nobody else gets there first.
>>
>> Are tou likely to be able to look at these?
>>
>
> Yes, I will do. Sorry for the delay. Not even being able to build in
> normal C mode with recent mingw.org compilers (RT#128631) hasn't
> helped, but I will go back to mingw-w64 compilers for these fixes.

Finally tried this out, using MinGW-w64 compilers (6.3.0 and 7.1.0). I
tried x86 versions with and without USE_CPLUSPLUS and all is well. (I
thought MinGW 4.8.1 would work as well, but it has trouble with fstat
calls and is only happy in normal C mode - see perl #128631. I'm not
going to worry about that...)

I noticed that config_sh.PL corrects longdblsize (and uses it for
nvsize) - exactly as per the logic in the makefiles (for the miniperl
build) with this patch, which gives confidence that it's correct.

unless ($opt{cc} =~ /\bcl/) {
    if ($opt{WIN64} eq 'define') {
        $opt{longdblsize} = 16;
        $opt{longdblinfbytes} = '0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00';
        $opt{longdblnanbytes} = '0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00';
    }
    else {
        $opt{longdblsize} = 12;
        $opt{longdblinfbytes} = '0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0xff, 0x7f, 0x00, 0x00';
        $opt{longdblnanbytes} = '0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0xff, 0xff, 0x00, 0x00';
    }
}

One minor thing, though: config_sh.PL also adjusts longdblinfbytes and
longdblnanbytes (16- or 12- bytes versions). Is it worth also doing
this in the makefiles, or maybe it's not really relevant for miniperl
anyway since it's only really used to complete the build and nothing
else)?

The other thing I noticed is that lib/ExtUtils/t/Embed.t fails in the
C++ builds, but works fine in C builds.

However, when I tried the x64 compilers, it didn't go so well :-(

The build still fails in C++ mode (with both 6.3.0 and 7.1.0, both
from MinGW-w64):

gcc -c          -xc++ -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE
-DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-fwrapv -fno-strict-aliasing -mms-bitfields -s -O2
-DVERSION=\"3.40\"    -DXS_VERSION=\"3.40\"  "-I..\..\lib\CORE"
RealPPPort.c
In file included from RealPPPort.xs:31:0:
RealPPPort.xs: In function 'void
XS_Devel__PPPort_ptrtests(PerlInterpreter*, CV*)':
..\..\lib\CORE/perl.h:1739:33: error: cast from 'int*' to 'long
unsigned int' loses precision [-fpermissive]
 #  define INT2PTR(any,d) (any)(d)
                                 ^
..\..\lib\CORE/perl.h:1752:21: note: in expansion of macro 'INT2PTR'
 #  define PTR2ul(p) INT2PTR(unsigned long,p)
                     ^~~~~~~
RealPPPort.xs:1650:27: note: in expansion of macro 'PTR2ul'
                 RETVAL += PTR2ul(p) != 0UL      ?  2 : 0;
                           ^
dmake:  Error code 129, while making 'RealPPPort.o'
Unsuccessful make(dist/Devel-PPPort): code=65280 at ..\make_ext.pl line 570.
dmake:  Error code 130, while making 'Extensions'

Thread Previous | Thread Next


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