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

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

Thread Previous | Thread Next
January 8, 2018 14:49
[perl #128627] Quadmath builds fail on Cygwin in ext/POSIX
Message ID:
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

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 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

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, 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

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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About