develooper Front page | perl.perl5.porters | Postings from July 2016

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

From:
Dan Collins
Date:
July 15, 2016 16:30
Subject:
[perl #128627] Quadmath builds fail on Cygwin in ext/POSIX
Message ID:
rt-4.0.18-26576-1468600166-1105.128627-75-0@perl.org
# New Ticket Created by  Dan Collins 
# Please include the string:  [perl #128627]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=128627 >


Hello,

Builds on Cygwin configured with:

./Configure -Dusedevel -des '-Doptimize=-O3 -g' -DDEBUGGING -Dusethreads -Dusequadmath

Fail in the stage of compiling ext/POSIX. The first failing command is the following:

g++  --shared  -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector-strong -o ../../lib/auto/POSIX/POSIX.dll  POSIX.o  ../../cygperl5_25_3.dll -lm   

Which fails to link against the quadmath symbols. Appending -lquadmath to the command causes it to work. Notably, all the other compilation steps do have correct libraries set. For example, miniperl is successfully linked with:

gcc -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/local/lib -o miniperl.exe opmini.o perlmini.o  gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquote.o time64.o cygwin.o miniperlmain.o  -lpthread -ldl -lquadmath 

Build log attached. After manually fixing that one command and running `make` again, I got the following perl -V:

$ ./perl -Ilib -V
Summary of my perl5 (revision 5 version 25 subversion 3) configuration:
  Local Commit: e94880707b4983968cb376474e3570790e71c109
  Ancestor: 6baaafe34b15a5bbc05abd45b1b00f684654bb25
  Platform:
    osname=cygwin
    osvers=2.5.2(0.29753)
    archname=cygwin-thread-multi-quadmath
    uname='cygwin_nt-10.0 desktop-duoi7f4 2.5.2(0.29753) 2016-06-23 14:29 x86_64 cygwin '
    config_args='-Dusedevel -des -Doptimize=-O3 -g -DDEBUGGING -Dusethreads -Dusequadmath'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2'
    optimize='-O3 -g'
    cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong'
    ccversion=''
    gccversion='5.4.0'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='__float128'
    nvsize=16
    Off_t='off_t'
    lseeksize=8
    alignbytes=16
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/lib /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../lib/../include/w32api /usr/local/lib /lib
    libs=-lpthread -ldl -lquadmath
    perllibs=-lpthread -ldl -lquadmath
    libc=/usr/lib/libc.a
    so=dll
    useshrplib=true
    libperl=cygperl5_25_3.dll
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags=' --shared  -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl):
  Compile-time options:
    DEBUGGING
    HAS_TIMES
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
    PERL_IMPLICIT_CONTEXT
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_TRACK_MEMPOOL
    PERL_USE_DEVEL
    PERL_USE_SAFE_PUTENV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_QUADMATH
    USE_REENTRANT_API
  Locally applied patches:
    6605cde46b63413ff147e00afeff1a4d66226243
    e94880707b4983968cb376474e3570790e71c109
  Built under cygwin
  Compiled at Jul 15 2016 08:54:47
  @INC:
    lib
    /usr/local/lib/perl5/site_perl/5.25.3/cygwin-thread-multi-quadmath
    /usr/local/lib/perl5/site_perl/5.25.3
    /usr/local/lib/perl5/5.25.3/cygwin-thread-multi-quadmath
    /usr/local/lib/perl5/5.25.3
    .

-- 
Respectfully,
Dan Collins


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