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

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

Thread Previous | Thread Next
From:
Steve Hay
Date:
June 4, 2013 08:15
Subject:
RE: dmake can't find config.h, and collector throws error when trying to compile perl-static.exe (perl-5.18.0 / mingw / 32b)
Message ID:
67B2BB40A61BE846B65EF4793B863D6CB5C6A7@ukmail02.planit.group
Tony Cook wrote on 2013-06-04:
> On Mon, Jun 03, 2013 at 08:59:15AM +0100, Steve Hay wrote:
>> Yes, reading the docs for GNU ar I see that it does indeed, and it
>   looks like there is no other way to do this than to extract the
>   object files from each extension's archive and then archive all the
>   extracted object files into the perl static library. I will look at
>   doing this soon unless anyone would like to do it sooner.
> Rather than trying to combine the libraries, would it be better to
> simply make it behave more like the Makefile.SH Makefiles - treat all
> of the extensions as static so their .lib/.a files are linked into
> perl itself.
> 
> This skips the creation of the separate perl518s.lib.
> 

Interestingly, the perl-static.exe target's recipe already links all the
static extensions directly into perl-static.exe, so it doesn't seem to
need to link in (the currently broken) perl519s.lib/libperl519s.a as
well anyway!

Thus, I thought that simply removing the creation of that static library
rather than trying to fix it (together with linking in the core perl
objects, which are the other thing being picked up from the static
library) would solve the problem. (See patch attached.)

However, this doesn't work either: with the BUILD_STATIC=define option I
get the exact same ld/collect error as before regarding _boot_Win32CORE.
So I'm now thinking that something else is amiss here, i.e. it was
incidental that the static library wrongly contained other libraries
instead of the intended objects because all the other libraries are
linked in anyway. Something else is the real cause of the problem here,
but I don't know what yet.

The end of the output from the patched makefile.mk (which includes a
little debug output) is:

Extensions_static=
..\lib\auto\Win32CORE\Win32CORE.a
Objects=
..\av.o ..\deb.o ..\doio.o ..\doop.o ..\dump.o ..\globals.o ..\gv.o
..\mro.o ..\
hv.o ..\locale.o ..\keywords.o ..\mathoms.o ..\mg.o ..\numeric.o ..\op.o
..\pad.
o ..\perl.o ..\perlapi.o ..\perly.o ..\pp.o ..\pp_ctl.o ..\pp_hot.o
..\pp_pack.o
 ..\pp_sort.o ..\pp_sys.o ..\reentr.o ..\regcomp.o ..\regexec.o ..\run.o
..\scop
e.o ..\sv.o ..\taint.o ..\toke.o ..\universal.o ..\utf8.o ..\util.o
perllib.o ..
\perlio.o .\win32.o .\win32sck.o .\win32thread.o .\fcrypt.o .\win32io.o
..\DynaL
oader.o                   -lmoldname -lkernel32 -luser32 -lgdi32
  -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32
-loleaut32 -ln
etapi32 -luuid -lws2_32 -lmpr             -lwinmm -lversion -lodbc32
-lodbccp32
-lcomctl32 perlmainst.o .\perlexe.res
g++ -mconsole -o ..\perl-static.exe  -s -L"c:\perl\lib\CORE"
-L"C:\Dev\Software\
MinGW\lib" \
            C:\Users\shay\AppData\Local\Temp\mk9
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'

I don't know why it isn't finding _boot_Win32CORE. It's surely in
..\lib\auto\Win32CORE\Win32CORE.a (right?), and that file does indeed
exist in that location.

I will continue digging later.

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