Closed p5pRT closed 6 years ago
link -out:..\..\lib\auto\Storable\Storable.dll -dll -nologo -nodefaultlib -debug -opt:ref\,icf -ltcg -libpath:"c :\perl\lib\CORE" -machine:AMD64 Storable.obj "..\..\lib\CORE\perl527.lib" oldnames.lib kernel32.lib user32.lib gdi32. lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib -def:Storable.def Creating library ..\..\lib\auto\Storable\Storable.lib and object ..\..\lib\auto\Storable\Storable.exp Storable.obj : error LNK2001: unresolved external symbol PL_sv_placeholder ..\..\lib\auto\Storable\Storable.dll : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin \HostX64\x64\link.EXE"' : return code '0x460' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.
This was a VS 2017 build for x64 bit target with BUILD_STATIC and ALL_STATIC set to 'define'.
On Wed\, 28 Mar 2018 11:47:17 -0700\, randir wrote:
This is a bug report for perl from sergey.aleynikov@gmail.com\, generated with the help of perlbug 1.41 running under perl 5.27.11.
----------------------------------------------------------------- [Please describe your issue here]
link -out:..\..\lib\auto\Storable\Storable.dll -dll -nologo -nodefaultlib -debug -opt:ref\,icf -ltcg -libpath:"c :\perl\lib\CORE" -machine:AMD64 Storable.obj "..\..\lib\CORE\perl527.lib" oldnames.lib kernel32.lib user32.lib gdi32. lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib -def:Storable.def Creating library ..\..\lib\auto\Storable\Storable.lib and object ..\..\lib\auto\Storable\Storable.exp Storable.obj : error LNK2001: unresolved external symbol PL_sv_placeholder ..\..\lib\auto\Storable\Storable.dll : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin \HostX64\x64\link.EXE"' : return code '0x460' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.
This was a VS 2017 build for x64 bit target with BUILD_STATIC and ALL_STATIC set to 'define'.
I have this problem also. So far AFAIK the problem is https://rt.perl.org/Public/Bug/Display.html?id=127743 work\, made
sub depend { + my $extra_deps = ""; + unless ($ENV{PERL_CORE}) { + # blib.pm needs arch/lib + $extra_deps = ' Storable.pm'; + } " -stacksize: Makefile \$(LINKEXT) +lib/Storable/Limit.pm : \$(INST_DYNAMIC)$extra_deps + \$(MKPATH) \$(INST_LIB) \$(PERLRUNINST) stacksize
https://perl5.git.perl.org/perl.git/commitdiff/c0e3b4b51cabf15ed8fc5f564dfeea31c25f5239
made Limit.pm depend on a Storable.so/Storable.dll file\, which is now being built while none of the other modules build .dlls\, they only build a "extralibs.ld" and "Foo.lib" file because this is a static perl\, not shared lib perl. Because of EUMM::MM_Win32.pm\, in the storable makefile\, EUMM adds -DPERLDLL to CCFLAGS/CC cmd line if its "static" perl\, but that causes the VC CC to assume all global data vars are INSIDE the same .dll\, and generate such machine code\, but we are building Storable as a DLL on static perl\, and because of Win32 PE/binary arch details\, global DATA vars have different machine code on if they are inside the same DLL (load register with data at abs constant pointer to inside same DLL aka var = *(int*)0x1234) vs an external DLL (load register with pointer from absolute pointer to inside same DLL (read import table)\, load register from pointer loaded in register aka var = **(int**)0x1234)\, so it doesn't link. Win32 C functions\, if they aren't aware the function call is outside the same DLL (no declspec dllimport prototype)\, the CC/linker will link them to to mini jump stub functions that leave the same DLL to another DLL. The jump stubs also allow const function pointers to exist to C functions from other DLL. THe CC takes addr of the jump stub inside the same DLL\, not the func ptr in the import table pointing to another DLL at a random other address in the process. If I remove the -DPERLDLL by hand from the storable makefile\, I can compile a storable.dll on static perl. Removing PERLDLL probably isn't the solution since then you will probably break compiling the static perl and the storable.a/storable.lib that goes inside the static perl binary.
-- bulk88 ~ bulk88 at hotmail.com
The RT System itself - Status changed from 'new' to 'open'
On Sun\, 01 Apr 2018 18:53:00 -0700\, bulk88 wrote:
I have this problem also. So far AFAIK the problem is https://rt.perl.org/Public/Bug/Display.html?id=127743
Does this patch fix the problem? It did for me when I reproduced the PL_sv_placeholder link failure.
-- bulk88 ~ bulk88 at hotmail.com
On Mon\, 02 Apr 2018 08:09:16 -0700\, bulk88 wrote:
Does this patch fix the problem? It did for me when I reproduced the PL_sv_placeholder link failure.
Yes\, it fixed it for me too.
On Mon\, 02 Apr 2018 08:09:16 -0700\, bulk88 wrote:
On Sun\, 01 Apr 2018 18:53:00 -0700\, bulk88 wrote:
I have this problem also. So far AFAIK the problem is https://rt.perl.org/Public/Bug/Display.html?id=127743
Does this patch fix the problem? It did for me when I reproduced the PL_sv_placeholder link failure.
Fixed it for me\, thanks\, applied as f4e3105bff156d2f16b5faabf081db7abf6310a5.
Tony
@tonycoz - Status changed from 'open' to 'pending release'
Some details I forgot to post\, for historical reasons.
BEFORE
Generating a gmake-style Makefile Writing Makefile for Storable gmake[1]: Entering directory 'C:/perl521/srcnew/dist/Storable' "..\..\miniperl.exe" "-I..\..\lib" Storable.pm.PL "..\..\miniperl.exe" "-I..\..\lib" "..\..\lib\ExtUtils/xsubpp" -typemap C:\perl 521\srcnew\lib\ExtUtils\typemap Storable.xs > Storable.xsc C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e mv -- Storab le.xsc Storable.c cl -c -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_R EGISTRY -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERLDLL -O1 -MD -Zi -DNDEBUG -GL -D VERSION=\"3.06\" -DXS_VERSION=\"3.06\" "-I..\..\lib\CORE" Storable.c Storable.c C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e rm_f -- "..\ ..\lib\auto\Storable\Storable.lib" lib -ltcg -out:..\..\lib\auto\Storable\Storable.lib Storable.obj Microsoft (R) Library Manager Version 7.10.6030 Copyright (C) Microsoft Corporation. All rights reserved.
C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e chmod -- 755 ..\..\lib\auto\Storable\Storable.lib gmake[1]: Leaving directory 'C:/perl521/srcnew/dist/Storable' gmake[1]: Entering directory 'C:/perl521/srcnew/ext/Sys-Hostname' gmake[1]: Leaving directory 'C:/perl521/srcnew/ext/Sys-Hostname' ***********CUT***more modules and static perl gets linked together*********** gmake -C ..\dist\Storable lib\Storable\Limit.pm gmake[1]: Entering directory 'C:/perl521/srcnew/dist/Storable' "..\..\miniperl.exe" "-I..\..\lib" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Storable\"\, 'DLBASE' => 'Storable'\, 'DL_FUNCS' => { }\, 'FUNCLIST' => []\, 'IMPORTS' => { }\, 'DL_VARS' => []);" link -out:..\..\lib\auto\Storable\Storable.dll -dll -nologo -nodefaultlib -debug -opt:ref\,icf -ltcg -libpath:"c:\perl\lib\CORE" -machine:x86 Storable.obj "..\ ..\lib\CORE\perl527.lib" oldnames.lib kernel32.lib user32.lib gdi32.lib winspool .lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib u uid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl3 2.lib msvcrt.lib -def:Storable.def Creating library ..\..\lib\auto\Storable\Storable.lib and object ..\..\lib\au to\Storable\Storable.exp Storable.obj : error LNK2001: unresolved external symbol _PL_sv_placeholder ..\..\lib\auto\Storable\Storable.dll : fatal error LNK1120: 1 unresolved externa ls makefile:486: recipe for target '..\..\lib\auto\Storable\Storable.dll' failed gmake[1]: *** [..\..\lib\auto\Storable\Storable.dll] Error 1120 gmake[1]: Leaving directory 'C:/perl521/srcnew/dist/Storable' GNUmakefile:1618: recipe for target '..\lib\Storable\Limit.pm' failed gmake: *** [..\lib\Storable\Limit.pm] Error 2
AFTER
Generating a gmake-style Makefile Writing Makefile for Storable gmake[1]: Entering directory 'C:/perl521/srcnew/dist/Storable' "..\..\miniperl.exe" "-I..\..\lib" Storable.pm.PL "..\..\miniperl.exe" "-I..\..\lib" "..\..\lib\ExtUtils/xsubpp" -typemap C:\perl 521\srcnew\lib\ExtUtils\typemap Storable.xs > Storable.xsc C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e mv -- Storab le.xsc Storable.c cl -c -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_R EGISTRY -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERLDLL -O1 -MD -Zi -DNDEBUG -GL -D VERSION=\"3.06\" -DXS_VERSION=\"3.06\" "-I..\..\lib\CORE" Storable.c Storable.c C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e rm_f -- "..\ ..\lib\auto\Storable\Storable.lib" lib -ltcg -out:..\..\lib\auto\Storable\Storable.lib Storable.obj Microsoft (R) Library Manager Version 7.10.6030 Copyright (C) Microsoft Corporation. All rights reserved.
C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e chmod -- 755 ..\..\lib\auto\Storable\Storable.lib gmake[1]: Leaving directory 'C:/perl521/srcnew/dist/Storable' gmake[1]: Entering directory 'C:/perl521/srcnew/ext/Sys-Hostname' gmake[1]: Leaving directory 'C:/perl521/srcnew/ext/Sys-Hostname' ***********CUT***more modules and static perl gets linked together*********** gmake -C ..\dist\Storable lib\Storable\Limit.pm gmake[1]: Entering directory 'C:/perl521/srcnew/dist/Storable' C:\perl521\srcnew\miniperl.exe "-I..\..\lib" -MExtUtils::Command -e mkpath -- .. \..\lib "..\..\perl.exe" "-I..\..\lib" "-I..\..\lib" stacksize --core probe for max. stack sizes... Storable: determining recursion limit: 65000 too big\, try less 32550 ... Storable: determining recursion limit: 32550 too big\, try less 16325 ... Storable: determining recursion limit: 16325 too big\, try less 8213 ... Storable: determining recursion limit: 8213 too big\, try less 4157 ... Storable: determining recursion limit: 4157 passed\, try more 6185 ... Storable: determining recursion limit: 6185 passed\, try more 7199 ... Storable: determining recursion limit: 7199 too big\, try less 6692 ... Storable: determining recursion limit: 6692 passed\, try more 6945 ... Storable: determining recursion limit: 6945 too big\, try less 6819 ... Storable: determining recursion limit: 6819 too big\, try less 6756 ... Storable: determining recursion limit: 6756 passed\, try more 6787 ... Storable: determining recursion limit: 6787 passed\, try more 6803 ... Storable: determining recursion limit: 6803 passed\, try more 6811 ... Storable: determining recursion limit: 6811 passed\, try more 6815 ... Storable: determining recursion limit: 6815 too big\, try less 6813 ... Storable: determining recursion limit: 6813 passed\, try more 6814 ... Storable: determining recursion limit: 6814 passed\, try more 6814 ... MAX_DEPTH = 6814 Storable: determining recursion limit: 3000 passed\, try more 3000 ... MAX_DEPTH_HASH = 3000 gmake[1]: Leaving directory 'C:/perl521/srcnew/dist/Storable' if not exist ..\lib\Storable mkdir ..\lib\Storable copy ..\dist\Storable\lib\Storable\Limit.pm ..\lib\Storable\Limit.pm 1 file(s) copied.
Thank you for filing this report. You have helped make Perl better.
With the release yesterday of Perl 5.28.0\, this and 185 other issues have been resolved.
Perl 5.28.0 may be downloaded via: https://metacpan.org/release/XSAWYERX/perl-5.28.0
If you find that the problem persists\, feel free to reopen this ticket.
@khwilliamson - Status changed from 'pending release' to 'resolved'
Migrated from rt.perl.org#133039 (status was 'resolved')
Searchable as RT133039$