develooper Front page | perl.perl5.porters | Postings from January 2021

USE_QUADMATH build of perl on Win32

Thread Next
From:
sisyphus
Date:
January 1, 2021 03:40
Subject:
USE_QUADMATH build of perl on Win32
Message ID:
CADZSBj1ewE_vorWpa9yZDeZaHBHXdiE3X8+EnD7PBXWeTOU2Yg@mail.gmail.com
Hi,
I'm in the process of hacking up a quadmath build of current blead on
(native) Windows 7.

By patching only win32/GNUmakefile, I've got to the stage where miniperl
has been successfully built without issuing any warnings.
(Actually there's some warnings issued re win32.c, but I'm ignoring them
for the moment as they're also present on double and long double builds.)

As a rough check that miniperl is in fact a quadmath build I can run:
C:\comp\perl-5.33.6-q\win32>..\miniperl.exe -le "print sqrt(2.0);"
1.4142135623730950488016887242097

That's the same output as I get on Ubuntu -Dusequadmath builds ... so all
looks good to that extent.

The problem I'm facing is with the very next step in the build process:
..\miniperl.exe -I..\lib -f ..\write_buildcustomize.pl ..
Invalid version format (negative version number) at dist/constant/lib/
constant.pm line 2.
BEGIN failed--compilation aborted at dist/constant/lib/constant.pm line 2.
Compilation failed in require at dist/PathTools/lib/File/Spec/Unix.pm line
115.
BEGIN failed--compilation aborted at dist/PathTools/lib/File/Spec/Unix.pm
line 115.
Compilation failed in require at dist/PathTools/lib/File/Spec/Win32.pm line
6.
Compilation failed in require at dist/PathTools/lib/File/Spec.pm line 21.
Compilation failed in require at dist/PathTools/lib/File/Spec/Functions.pm
line3.
BEGIN failed--compilation aborted at
dist/PathTools/lib/File/Spec/Functions.pm line 3.
Compilation failed in require at ..\write_buildcustomize.pl line 59.

Line 2 of constant pm is merely "use 5.008;" and the error message comes
from vutil.c.

Apparently miniperl's use() is somehow managing to interpret 5.008 as a -ve
number:
C:\comp\perl-5.33.6-q\win32>..\miniperl.exe -le "use 5.008"
Invalid version format (negative version number) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

If I try to use 5.001 instead, I get a different error (this time from
util.c):
C:\comp\perl-5.33.6-q\win32>..\miniperl.exe -le "use 5.001"
panic: my_snprintf buffer overflow at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

If I try to use() 5, or 5.0, or 5.00, then there's no problem.

On a -Dusequadmath build on Ubuntu I can generate the "negative version
number" error with:
$ perl -le 'require (-5.008);'
Invalid version format (negative version number) at -e line 1.

From that, I deduce that vutil.c is *not* meant to be "out of bounds" for
quadmath builds.

Any ideas on what I need to do next ?
I'll probably work it out eventually, but it could take me a while ;-)
Any hints or thoughts are most welcome.

Cheers,
Rob

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