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

[perl #128627] Quadmath builds fail on Cygwin in ext/POSIX

Thread Previous | Thread Next
From:
perlbug-followup
Date:
January 8, 2018 14:49
Subject:
[perl #128627] Quadmath builds fail on Cygwin in ext/POSIX
Message ID:
rt-4.0.24-27086-1515422967-1178.128627-15-0@perl.org
Sun, 07 Jan 2018 05:51:12 -0800 skrev LeonT:
>
> Could you look up where the quadmath.dll is for your compiler, and if
> it is in any of the paths in libpth (perl -V:libpth)?

I don't know whether this is a Cygwin problem or a Perl problem, or
both, so here is an explanation of what I did, including the information
you requested regardding libpth:

First attempt at building Perl
==============================

I installed Cygwin's gcc (version 6.4.0) and libquadmath packages. Then
I unpacked the Perl distribution, and ran Configure with

    export PATH=/usr/bin:/bin
    sh ../perl-5.27.7/Configure -de -Dmksymlinks -Uinstallusrbinperl \
        -Dcc=gcc -Dld=g++ -Dusethreads -Dusemultiplicity -Duse64bitall \
        -Dusequadmath -Dusedevel -Dprefix=/usr/site/perl-5.27.7

but that failed with the following output

    (...)
    <quadmath.h> found.

    Choosing the C types to be used for Perl's internal types...

    *** You requested the use of the quadmath library, but you
    *** do not seem to have the quadmath library installed.
    *** Cannot continue, aborting.

Here is where the "quadmath"-related stuff is located:

    $ find /usr | egrep -i quadmath
    /usr/bin/cygquadmath-0.dll
    /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/include/quadmath.h
    /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/include/quadmath_weak.h
    /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/libquadmath.a
    /usr/lib/gcc/x86_64-pc-cygwin/6.4.0/libquadmath.dll.a
    /usr/share/info/libquadmath.info.gz

Second attempt at building Perl
===============================

I decided to build the same version of gcc (version 6.4.0) from source
into /usr/site/gcc-6.4.0. That worked fine. Then I ran Perl's Configure
again with the same options as last time, but now with "my" newly built
compiler prepended to PATH:

    export PATH=/usr/site/gcc-6.4.0/bin:/usr/bin:/bin sh
    ../perl-5.27.7/Configure (...)

That succeeded:

    (...)
    Finding dependencies for perlmini.o
    Updating GNUmakefile...
    Now you must run 'make'.

    If you compile perl5 on a different machine or from a different object
    directory, copy the Policy.sh file from this object directory to the
    new one before you run Configure -- this will help you with most of
    the policy defaults.

Here is where the "quadmath"-related stuff is located:

    $ find /usr/site/gcc-6.4.0/ | egrep -i quadmath
    /usr/site/gcc-6.4.0/bin/cygquadmath-0.dll
    /usr/site/gcc-6.4.0/lib/gcc/x86_64-pc-cygwin/6.4.0/include/quadmath.h
    /usr/site/gcc-6.4.0/lib/gcc/x86_64-pc-cygwin/6.4.0/include/quadmath_weak.h
    /usr/site/gcc-6.4.0/lib/libquadmath.a
    /usr/site/gcc-6.4.0/lib/libquadmath.dll.a
    /usr/site/gcc-6.4.0/lib/libquadmath.la
    /usr/site/gcc-6.4.0/share/info/libquadmath.info

As you can see, the location of the quadmath-related files, relative to
/usr and /usr/site/gcc-6.4.0, are somewhat different in the two cases.
The compiler I build myself also has libquadmath.la, which the Cygwin
package seems to be missing.

Anyway, Configure succeede, so then I ran make, but it fails with the
error that is mentioned at the top of this ticket.

If I include the patch I suggested above, I am finally able to build
Perl with quadmath support.

As for the the paths in libpth. For perl that is installed with Cygwin,
I get

    $ perl -V:libpth
    libpth='/usr/lib';

for the perl I compiled myself (with quadmath support), I get

    $ /usr/site/perl-5.27.7/bin/perl -V:libpth
    libpth='/usr/site/gcc-7.2.0/lib /usr/site/gcc-7.2.0/lib/gcc/x86_64-unknown-cygwin/7.2.0/include-fixed /usr/lib /usr/lib/../lib/../include/w32api /usr/local/lib /lib';

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=128627

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