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

Re: dmake can't find config.h, and collector throws error when tryingto compile perl-static.exe (perl-5.18.0 / mingw / 32b)

Thread Previous | Thread Next
From:
Steve Hay
Date:
June 1, 2013 21:23
Subject:
Re: dmake can't find config.h, and collector throws error when tryingto compile perl-static.exe (perl-5.18.0 / mingw / 32b)
Message ID:
CADED=K4TAkZ-bPK3W2SP9kP9+Tdi-OwNTnfW2c+oT+J_JogDoA@mail.gmail.com
On 29 May 2013 08:35, Steve Hay <Steve.Hay@verosoftware.com> wrote:

> R. S. wrote on 2013-05-28:
> > Hello Jan,
> >
> > Tuesday, May 28, 2013, 12:33:11 AM, you wrote:
> >
> >> I have no idea what the issue with your compiler version is, but you
> >> may want to give this toolset a try:
> >>
> >>
> >>
> http://sourceforge.net/projects/perlmingw/files/Compiler%20for%2032%20
> >> bit%20Windows/
> >
> > No better results, all normal exes are ok but static one is not build,
> > the same error at the end:
> >   dmake:  Error code 129, while making '..\perl-static.exe'
> > full raw log: http://pastebin.com/raw.php?i=hLXaeH81
>
> Otherwise, I see the same problem in blead (with WIN64=undef, as Rob
> said). It also happens when just doing a BUILD_STATIC (as opposed to
> ALL_STATIC) build, this time, of course, ending with just an undefined
> reference to _boot_Win32CORE since that is the only extension linked
> statically in that case:
>
> ..\libperl519s.a(perllib.o):perllib.c:(.text+0x9c): undefined reference
> to `_boot_Win32CORE'
> collect2.exe: error: ld returned 1 exit status
> dmake:  Error code 129, while making '..\perl-static.exe'
>
> This is with MinGW's gcc-4.7.0.
>
> The build works fine with nmake/VC++ and with dmake/VC++, so it is
> definitely a problem with the gcc toolchain, rather than the dmake
> makefile.
>
> I will try to investigate more later. Sorry for not testing this before
> 5.18.0 was released. Static builds are not a configuration I generally
> have in mind.
>

Sorry for the delay in getting back on this.

I've now tried earlier versions of perl (the BUILD_STATIC option was added
in Nov 2006 by commits 4e036e4bbb and ed2eab3fc8 and first appeared in
5.9.5; the ALL_STATIC option was added in Sep 2007 by commit a1f2e71991 and
first appeared in 5.10.0) and an earlier version of www.mingw.org's gcc
(3.4.5), and even on an older version of Windows (XP SP3 rather than 7
SP1), but I have not found any combination which works -- the BUILD_STATIC
and ALL_STATIC configurations always seem to end with that same "undefined
reference to '_boot_*'" error.

I was a little surprised by this since I thought that I would surely have
tested this before committing the changes, but I have noticed in the course
of trying things out today that 5.9.5 (which BUILD_STATIC was first added
to) doesn't actually build with gcc anyway. It had issues with
generate_uudmap.exe and perlglob.exe both crashing. I was able to work
around that today by copying those executables from a build of a later
version of perl, but at the time BUILD_STATIC was added it may very well
not have been tested with gcc because of this. (I also note that the change
which added it (4e036e4bbb) only touched the nmake Makefile which is only
used for VC++ builds; I subsequently added the same changes to the dmake
makefile.mk in commit ed2eab3fc8 but would probably still only have tested
that with VC++ since the gcc build was broken.)

So it seems very likely that BUILD_STATIC and ALL_STATIC have never worked
with gcc since the time they were first added, regardless of which version
of gcc is being used.

I am CCing the author of the original BUILD_STATIC and ALL_STATIC patches
(Vadim) in case he has any input here, and also one of the StrawberryPerl
maintainers (kmx) in case he has encountered any such issue in the course
of working with gcc in StrawberryPerl.

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