develooper Front page | perl.perl5.porters | Postings from June 2012

[perl #113798] [mingw.org, gcc-4.5.2] perlglob.exe can't find libgcc_s_dw2-1.dll

Thread Previous
From:
Sisyphus
Date:
June 22, 2012 20:13
Subject:
[perl #113798] [mingw.org, gcc-4.5.2] perlglob.exe can't find libgcc_s_dw2-1.dll
Message ID:
rt-3.6.HEAD-5009-1340421197-1881.113798-75-0@perl.org
# New Ticket Created by  "Sisyphus" 
# Please include the string:  [perl #113798]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113798 >


Subject: [mingw.org, gcc-4.5.2] perlglob.exe can't find libgcc_s_dw2-1.dll
Message-Id: <5.16.0_820_1340415716@desktop2>
Reply-To: sisyphus1@optusnet.com.au
To: perlbug@perl.org
From: sisyphus1@optusnet.com.au


This is a bug report for perl from sisyphus1@optusnet.com.au,
generated with the help of perlbug 1.39 running under perl 5.16.0.


-----------------------------------------------------------------
[Please describe your issue here]

The following annoyance has been existent for quite some time. It was 
present for the later builds of 5.15.x and 5.16.0, and is still there in 
5.17.1. I think it might even have affected 5.14 (and maybe earlier !!).
AFAIK, it is only the mingw.org gcc-4.x.x compiler(s) that are affected - 
the gcc-4.x.x compilers provided by mingw64.sf are not affected.

I can't safely claim that *all* mingw.org gcc-4.x.x compilers are affected, 
but the one that I use (gcc-4.5.2) certainly is. I know Steve Hay 
encountered the same problem, but I don't know which version of MinGW he 
had.

When building perl from source, after a few minutes we reach the stage where 
the modules in the cpan folder get built.
The Makefile.PL (autogenerated by make_ext.pl) that gets run by miniperl 
contains 2 glob() calls.
Both of those glob() calls crash perlglob.exe because it can't find 
libgcc_s_dw2-1.dll, even though that file is in the path (in C:\MinGW\bin).
I modified make_ext.pl to generate a Makefile.PL that also printed out 
$ENV{PATH}, and it claims that C:\MinGW\bin is still in the path .... so I'm 
buggered if I know why perlglob.exe can't find that dll.

For a simple demo of the problem:
#################################
C:\comp\perl-5.16.0>C:\comp\perl-5.16.0\perlglob.exe *.SH
cflags.SH config.sh config_h.SH makedepend.SH Makefile.SH metaconfig.SH 
myconfig.SH Policy_sh.SH runtests.SH uconfig.sh uconfig64.sh
C:\comp\perl-5.16.0>C:\comp\perl-5.16.0\miniperl -le "print for 
glob('*.SH')"
[Crash - perlglob.exe won't run because libgcc_s_dw2-1.dll is not found]
C:\comp\perl-5.16.0>
################################

Does miniperl somehow clobber the path ? According to that output of my 
modified Makefile.PL, it doesn't.

There's a fairly simple fix, btw - just put a copy of libgcc_s_dw2-1.dll in 
the top level perl source folder (same folder as perlglob.exe), and all is 
fine.
I guess we could even alter the makefile.mk to do that for us ... but I've 
the feeling that would be deemed by most to be a second rate fix.

Any ideas why it's currently necessary to copy that dll from the MinGW/bin 
folder into the perl source ?

Cheers,
Rob

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=install
    severity=medium
---
Site configuration information for perl 5.16.0:

Configured by Rob at Mon May 28 14:31:11 2012.

Summary of my perl5 (revision 5 version 16 subversion 0) configuration:

  Platform:
    osname=MSWin32, osvers=6.0, archname=MSWin32-x86-multi-thread
    uname=''
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags 
=' -s -O2 -DWIN32  -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS 
 -fno-strict-aliasing -mms-bitfields',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='4.5.2', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', 
lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"c:\MinGW\perl516\lib\CORE" -L"C:\MinGW\lib"'
    libpth=C:\MinGW\lib C:\MinGW\msys\1.0\local\lib 
C:\MinGW\msys\1.0\local\ssl\lib
    libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 
 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion 
 -lodbc32 -lodbccp32 -lcomctl32
    perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 
 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion 
 -lodbc32 -lodbccp32 -lcomctl32
    libc=, so=dll, useshrplib=true, libperl=libperl516.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', 
lddlflags='-mdll -s -L"c:\MinGW\perl516\lib\CORE" -L"C:\MinGW\lib"'

Locally applied patches:


---
@INC for perl 5.16.0:
    C:/MinGW/perl516/site/lib
    C:/MinGW/perl516/lib
    .

---
Environment for perl 5.16.0:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files\Windows 
NT\Accessories;C:\MinGW\bin;C:\_32\dmake;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\batch;C:\_32\lzma;C:\MinGW\perl516\bin;C:\MinGW\msys\1.0\bin;C:\_32\Gnuplot\binary
    PERL_BADLANG (unset)
    SHELL (unset)


Thread Previous


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