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
Steve Hay
June 1, 2013 21:23
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:
On 29 May 2013 08:35, Steve Hay <> 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:
> >>
> >>
> >>
> >> 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:
> 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'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 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About