Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] fix Win32 nmake cant rebuild DynaLoader.obj on Makefile regen bug #14206

Closed
p5pRT opened this issue Nov 4, 2014 · 9 comments
Closed

Comments

@p5pRT
Copy link

p5pRT commented Nov 4, 2014

Migrated from rt.perl.org#123123 (status was 'resolved')

Searchable as RT123123$

@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2014

From @bulk88

Created by @bulk88

Need #.

The problem
-----------------------------------------------------------------

C​:\perl521\srcnewb4opt\win32> ..\miniperl.exe -I..\lib
..\make_ext.pl "MA
KE=nmake -nologo" --dir=..\ext --dynaloader
running "C​:\perl521\srcnewb4opt\win32\..\miniperl.exe -I../../lib
Makefile.PL IN
STALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1
DynaLoader.c"

Generating a nmake-style Makefile
Writing Makefile for DynaLoader
running "nmake -nologo config PERL_CORE=1 DynaLoader.c"
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e rm_f -- DynaLoader.xs
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e cp -- dl_win32.xs DynaLoader.xs
  ..\..\miniperl.exe "-I..\..\lib" "-I..\..\lib"
..\..\lib\ExtUtils\xsubpp
  -noprototypes -typemap ..\..\lib\ExtUtils\typemap DynaLoader.xs >
DynaLoader.x
sc && C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUtils
:​:Command -e mv -- DynaLoader.xsc DynaLoader.c
running "nmake -nologo all PERL_CORE=1 DynaLoader.c"
  ..\..\miniperl.exe "-I..\..\lib" "-I..\..\lib" DynaLoader_pm.PL
DynaLoad
er.pm
  cl -c -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -G7 -GL -DWIN32
-D_CONSOLE
  -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME
-DNO_MATHOMS
  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-D_USE_32BIT_TIME_T -D
PERLDLL -O1 -MD -Zi -DNDEBUG -G7 -GL -DVERSION=\"1.27\"
-DXS_VERSION=\"1.27\
" "-I..\..\lib\CORE" -DLIBC="msvcrt.lib" DynaLoader.c
DynaLoader.c
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e rm_rf -- ..\..\DynaLoader.obj
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e cp -- DynaLoader.obj ..\..\DynaLoader.obj
'DynaLoader.c' is up-to-date

C​:\perl521\srcnewb4opt\win32>
##############FAKE A CORE HEADER CHANGE##################
C​:\perl521\srcnewb4opt\win32>attrib -r ..\lib\core\config.h &&
..\miniperl -I../
lib -MExtUtils​::Command -e touch ..\lib\core\config.h

C​:\perl521\srcnewb4opt\win32> ..\miniperl.exe -I..\lib
..\make_ext.pl "MA
KE=nmake -nologo" --dir=..\ext --dynaloader
running "nmake -nologo config PERL_CORE=1 DynaLoader.c"
Makefile out-of-date with respect to ..\..\lib\CORE\config.h
Cleaning current config before rebuilding Makefile...
  nmake -f Makefile.old clean > NUL

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

  ..\..\miniperl.exe "-I..\..\lib" "-I..\..\lib" Makefile.PL
"INSTALLDIRS=
perl" "INSTALLMAN1DIR=none" "INSTALLMAN3DIR=none" "PERL_CORE=1"
"DynaLoader.c"
Generating a nmake-style Makefile
Writing Makefile for DynaLoader
==> Your Makefile has been rebuilt. <==
==> Please rerun the nmake command. <==
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
  -e "exi
t 1" --
NMAKE : fatal error U1077​: 'C​:\perl521\srcnewb4opt\miniperl.exe' :
return code '
0x1'
Stop.
nmake -nologo config PERL_CORE=1 DynaLoader.c failed, continuing anyway...
running "nmake -nologo all PERL_CORE=1 DynaLoader.c"
  ..\..\miniperl.exe "-I..\..\lib" "-I..\..\lib" DynaLoader_pm.PL
DynaLoad
er.pm
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e rm_rf -- ..\..\DynaLoader.obj
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e cp -- DynaLoader.obj ..\..\DynaLoader.obj
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e rm_f -- DynaLoader.xs
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUti
ls​::Command -e cp -- dl_win32.xs DynaLoader.xs
  ..\..\miniperl.exe "-I..\..\lib" "-I..\..\lib"
..\..\lib\ExtUtils\xsubpp
  -noprototypes -typemap ..\..\lib\ExtUtils\typemap DynaLoader.xs >
DynaLoader.x
sc && C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" "-I..\..\lib"
-MExtUtils
:​:Command -e mv -- DynaLoader.xsc DynaLoader.c

C​:\perl521\srcnewb4opt\win32>

Writing Makefile for DynaLoader
==> Your Makefile has been rebuilt. <==
==> Please rerun the nmake command. <==
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" -e "exit 1" --
NMAKE : fatal error U1077​: 'C​:\perl521\srcnewb4opt\miniperl.exe' :
return code '
0x1'
Stop.
nmake -nologo config PERL_CORE=1 DynaLoader.c failed, continuing anyway...
running "nmake -nologo all PERL_CORE=1 DynaLoader.c"
  ..\..\miniperl.exe "-I..\..\lib" DynaLoader_pm.PL DynaLoader.pm
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  rm_rf -- ..\..\DynaLoader.obj
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  cp -- DynaLoader.obj ..\..\DynaLoader.obj
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  rm_f -- DynaLoader.xs
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  cp -- dl_win32.xs DynaLoader.xs
  ..\..\miniperl.exe "-I..\..\lib" ..\..\lib\ExtUtils\xsubpp
-noprototypes
  -typemap ..\..\lib\ExtUtils\typemap DynaLoader.xs > DynaLoader.xsc &&
C​:\perl5
21\srcnewb4opt\miniperl.exe "-I..\..\lib" -MExtUtils​::Command -e mv --
DynaLoade
r.xsc DynaLoader.c
########linking perl5**.dll fails because DynaLoader.obj in src root is
missing####
################AFTER##########################3
C​:\perl521\srcnewb4opt\win32> ..\miniperl.exe -I..\lib
..\make_ext.pl "MA
KE=nmake -nologo" --dir=..\ext --dynaloader
running "C​:\perl521\srcnewb4opt\win32\..\miniperl.exe -I../../lib
Makefile.PL IN
STALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1"
Generating a nmake-style Makefile
Writing Makefile for DynaLoader
running "nmake -nologo config PERL_CORE=1"
running "nmake -nologo all PERL_CORE=1"
  ..\..\miniperl.exe "-I..\..\lib" DynaLoader_pm.PL DynaLoader.pm
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  rm_f -- DynaLoader.xs
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  cp -- dl_win32.xs DynaLoader.xs
  ..\..\miniperl.exe "-I..\..\lib" ..\..\lib\ExtUtils\xsubpp
-noprototypes
  -typemap ..\..\lib\ExtUtils\typemap DynaLoader.xs > DynaLoader.xsc &&
C​:\perl5
21\srcnewb4opt\miniperl.exe "-I..\..\lib" -MExtUtils​::Command -e mv --
DynaLoade
r.xsc DynaLoader.c
  cl -c -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -G7 -GL -DWIN32
-D_CONSOLE
  -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME
-DNO_MATHOMS
  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-D_USE_32BIT_TIME_T -D
PERLDLL -O1 -MD -Zi -DNDEBUG -G7 -GL -DVERSION=\"1.27\"
-DXS_VERSION=\"1.27\
" "-I..\..\lib\CORE" -DLIBC="msvcrt.lib" DynaLoader.c
DynaLoader.c
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  rm_rf -- ..\..\DynaLoader.obj
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  cp -- DynaLoader.obj ..\..\DynaLoader.obj
##############FAKE A CORE HEADER CHANGE##################
C​:\perl521\srcnewb4opt\win32>attrib -r ..\lib\core\config.h &&
..\miniperl -I../
lib -MExtUtils​::Command -e touch ..\lib\core\config.h

C​:\perl521\srcnewb4opt\win32> ..\miniperl.exe -I..\lib
..\make_ext.pl "MA
KE=nmake -nologo" --dir=..\ext --dynaloader
running "nmake -nologo config PERL_CORE=1"
Makefile out-of-date with respect to ..\..\lib\CORE\config.h
Cleaning current config before rebuilding Makefile...
  nmake -f Makefile.old clean > NUL

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

  ..\..\miniperl.exe "-I..\..\lib" Makefile.PL "INSTALLDIRS=perl"
"INSTALL
MAN1DIR=none" "INSTALLMAN3DIR=none" "PERL_CORE=1"
Generating a nmake-style Makefile
Writing Makefile for DynaLoader
==> Your Makefile has been rebuilt. <==
==> Please rerun the nmake command. <==
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib" -e "exit 1" --
NMAKE : fatal error U1077​: 'C​:\perl521\srcnewb4opt\miniperl.exe' :
return code '
0x1'
Stop.
nmake -nologo config PERL_CORE=1 failed, continuing anyway...
running "nmake -nologo all PERL_CORE=1"
  ..\..\miniperl.exe "-I..\..\lib" DynaLoader_pm.PL DynaLoader.pm
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  rm_f -- DynaLoader.xs
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  cp -- dl_win32.xs DynaLoader.xs
  ..\..\miniperl.exe "-I..\..\lib" ..\..\lib\ExtUtils\xsubpp
-noprototypes
  -typemap ..\..\lib\ExtUtils\typemap DynaLoader.xs > DynaLoader.xsc &&
C​:\perl5
21\srcnewb4opt\miniperl.exe "-I..\..\lib" -MExtUtils​::Command -e mv --
DynaLoade
r.xsc DynaLoader.c
  cl -c -nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -G7 -GL -DWIN32
-D_CONSOLE
  -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPERL_HASH_FUNC_ONE_AT_A_TIME
-DNO_MATHOMS
  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-D_USE_32BIT_TIME_T -D
PERLDLL -O1 -MD -Zi -DNDEBUG -G7 -GL -DVERSION=\"1.27\"
-DXS_VERSION=\"1.27\
" "-I..\..\lib\CORE" -DLIBC="msvcrt.lib" DynaLoader.c
DynaLoader.c
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  rm_rf -- ..\..\DynaLoader.obj
  C​:\perl521\srcnewb4opt\miniperl.exe "-I..\..\lib"
-MExtUtils​::Command -e
  cp -- DynaLoader.obj ..\..\DynaLoader.obj

C​:\perl521\srcnewb4opt\win32>
------------------------------------------------------------------------------------------------

RT is swallowing my email without a trace. No emails back, nothing on
p5p ML, no ticket on RT at a Glance https://rt.perl.org/index.html . So
the gif goes in another email.

Perl Info

Flags:
                    category=core
                    severity=low

Site configuration information for perl 5.21.4:

Configured by Owner at Thu Sep 18 12:08:58 2014.

Summary of my perl5 (revision 5 version 21 subversion 4) configuration:
                  Derived from: 7d2b2edb94ab56333b9049a3e26d15ea18445512
                  Ancestor: 19be3be6968e2337bcdfe480693fff795ecd1304
                  Platform:
                    osname=MSWin32, osvers=5.1,
archname=MSWin32-x86-multi-thread
                    uname=''
                    config_args='undef'
                    hint=recommended, useposix=true, d_sigaction=undef
                    useithreads=define, usemultiplicity=define
                    use64bitint=undef, use64bitall=undef, 
uselongdouble=undef
                    usemymalloc=n, bincompat5005=undef
                  Compiler:
                    cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG
-DWIN32
-D_CONSOLE -DNO_STRICT  -DPERL_TEXTMODE_SCRIPTS
-DPERL_HASH_FUNC_ONE_AT_A_TIME -DPERL_IMPLICIT_CONTEXT
-DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T',
                    optimize='-O1 -MD -Zi -DNDEBUG',
                    cppflags='-DWIN32'
                    ccversion='12.00.8168', gccversion='', gccosandvers=''
                    intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=1234
                    d_longlong=undef, longlongsize=8, d_longdbl=define,
longdblsize=8,
longdblkind=0
                    ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='__int64',
lseeksize=8
                    alignbytes=8, prototype=define
                  Linker and Libraries:
                    ld='link', ldflags ='-nologo -nodefaultlib -debug
-opt:ref,icf
-libpath:"c:\perl521\lib\CORE"  -machine:x86'
                    libpth=C:\PROGRA~1\MIAF9D~1\VC98\lib
                    libs=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
                    perllibs=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
                    libc=msvcrt.lib, so=dll, useshrplib=true,
libperl=perl521.lib
                    gnulibc_version=''
                  Dynamic Linking:
                    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef,
ccdlflags=' '
                    cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib
-debug
-opt:ref,icf  -libpath:"c:\perl521\lib\CORE"  -machine:x86'

Locally applied patches:
                    uncommitted-changes
                    a0fe7a7e75de29e59f1da0d6822dc06e5be658fe
                    a261faffee83d0145642ab5d1d046c9f813bc497
                    6506ab86ad1602a9ca720fcd30446dce1461d23d
                    7d2b2edb94ab56333b9049a3e26d15ea18445512


@INC for perl 5.21.4:
                    lib
                    C:/perl521/srcnew/lib
                    .


Environment for perl 5.21.4:
                    HOME (unset)
                    LANG (unset)
                    LANGUAGE (unset)
                    LD_LIBRARY_PATH (unset)
                    LOGDIR (unset)
                    PATH=
                    PERL_BADLANG (unset)
                    PERL_JSON_BACKEND=Cpanel::JSON::XS
                    PERL_YAML_BACKEND=YAML
                    SHELL (unset)



















@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2014

From @bulk88

On Mon Nov 03 19​:34​:12 2014, bulk88 wrote​:

RT is swallowing my email without a trace. No emails back, nothing on
p5p ML, no ticket on RT at a Glance https://rt.perl.org/index.html .
So
the gif goes in another email.

Yep, RT/something in p5p's system was rejecting the email because of the gif. Gif attached.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2014

From @bulk88

makemakerdflt.GIF

@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2014

From @tonycoz

On Mon Nov 03 19​:34​:12 2014, bulk88 wrote​:

Need #.

The subject includes "[PATCH]", but I don't see one.

Should there be one?

Tony

@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2014

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2014

From @bulk88

On Mon Nov 03 21​:02​:36 2014, tonyc wrote​:

On Mon Nov 03 19​:34​:12 2014, bulk88 wrote​:

Need #.

The subject includes "[PATCH]", but I don't see one.

Should there be one?

Tony

Attached.

--
bulk88 ~ bulk88 at hotmail.com

@p5pRT
Copy link
Author

p5pRT commented Nov 4, 2014

From @bulk88

0001-fix-Win32-nmake-cant-rebuild-DynaLoader.obj-on-Makef.patch
From 35970193dfd79adc31b0fe59ba3795b7a89c22af Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Tue, 4 Nov 2014 01:14:04 -0500
Subject: [PATCH] fix Win32 nmake cant rebuild DynaLoader.obj on Makefile
 regen bug

See [perl #123123] for details.
---
 ext/DynaLoader/Makefile.PL |    3 ++-
 make_ext.pl                |    5 +----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/ext/DynaLoader/Makefile.PL b/ext/DynaLoader/Makefile.PL
index 76c3bc0..864af3e 100644
--- a/ext/DynaLoader/Makefile.PL
+++ b/ext/DynaLoader/Makefile.PL
@@ -14,7 +14,8 @@ WriteMakefile(
     VERSION_FROM => 'DynaLoader_pm.PL',
     PL_FILES	=> {'DynaLoader_pm.PL'=>'DynaLoader.pm'},
     PM		=> {'DynaLoader.pm' => '$(INST_LIBDIR)/DynaLoader.pm'},
-    depend      => {'DynaLoader$(OBJ_EXT)' => 'dlutils.c'},
+    depend      => {	'DynaLoader$(OBJ_EXT)' => 'dlutils.c',
+			'DynaLoader.c' => 'DynaLoader.xs'},
     clean	=> {FILES => 'DynaLoader.c DynaLoader.xs DynaLoader.pm'},
 );
 
diff --git a/make_ext.pl b/make_ext.pl
index 6e7955d..717d1b3 100644
--- a/make_ext.pl
+++ b/make_ext.pl
@@ -185,10 +185,7 @@ if ($is_Win32) {
 	    next;
 	}
 	push @extspec, $_;
-	if($_ eq 'DynaLoader' and $target !~ /clean$/) {
-	    # No, we don't know why nmake can't work out the dependency chain
-	    push @{$extra_passthrough{$_}}, 'DynaLoader.c';
-	} elsif(FindExt::is_static($_)) {
+	if($_ ne 'DynaLoader' && FindExt::is_static($_)) {
 	    push @{$extra_passthrough{$_}}, 'LINKTYPE=static';
 	}
     }
-- 
1.7.9.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Nov 5, 2014

From @cpansprout

On Mon Nov 03 22​:16​:02 2014, bulk88 wrote​:

On Mon Nov 03 21​:02​:36 2014, tonyc wrote​:

On Mon Nov 03 19​:34​:12 2014, bulk88 wrote​:

Need #.

Nice bug number. :-)

The subject includes "[PATCH]", but I don't see one.

Should there be one?

Tony

Attached.

Thank you. Applied as 1ea1c22.

--

Father Chrysostomos

@p5pRT p5pRT closed this as completed Nov 5, 2014
@p5pRT
Copy link
Author

p5pRT commented Nov 5, 2014

@cpansprout - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant