Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.9k stars 538 forks source link

Cygwin builds broken since 37611e66 #14223

Closed p5pRT closed 9 years ago

p5pRT commented 9 years ago

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

Searchable as RT123163$

p5pRT commented 9 years ago

From @bingos

Cygwin builds are failing during the static linking of Win32CORE into perlmain

Generating a Unix-style Makefile Writing Makefile for Win32CORE make[1]​: Entering directory '/home/Administrator/repos/perl.git/ext/Win32CORE' make[1]​: Leaving directory '/home/Administrator/repos/perl.git/ext/Win32CORE' make[1]​: Entering directory '/home/Administrator/repos/perl.git/ext/Win32CORE' gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fwrapv -fno-strict-aliasing -pipe -fstack-protector -D_FORTIFY_SOURCE=2 -DUSEIMPORTLIB -UUSEIMPORTLIB -O3 -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" "-I../.." Win32CORE.c rm -rf ../../lib/auto/Win32CORE/Win32CORE.a /usr/bin/ar cr ../../lib/auto/Win32CORE/Win32CORE.a Win32CORE.o && : ../../lib/auto/Win32CORE/Win32CORE.a chmod 755 ../../lib/auto/Win32CORE/Win32CORE.a make[1]​: Leaving directory '/home/Administrator/repos/perl.git/ext/Win32CORE' gcc -o perl -Wl\,--enable-auto-import -Wl\,--export-all-symbols -Wl\,--enable-auto-image-base -fstack-protector -L/usr/local/lib perlmain.o -L. -lperl lib/auto/Win32CORE/Win32CORE.a `cat ext.libs` -ldl -lcrypt lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x33)​: undefined reference to `Perl_newSVnv' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x33)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_newSVnv' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x4b)​: undefined reference to `Perl_newSVpvn' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x4b)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_newSVpvn' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x5e)​: undefined reference to `Perl_load_module' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x5e)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_load_module' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0xa4)​: undefined reference to `Perl_block_gimme' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0xa4)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_block_gimme' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x96)​: undefined reference to `Perl_call_pv' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x96)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_call_pv' collect2​: error​: ld returned 1 exit status GNUmakefile​:371​: recipe for target 'perl.exe' failed make​: *** [perl.exe] Error 1

Bisection found the offending commit to be​:

http​://perl5.git.perl.org/perl.git/commitdiff/37611e66dc90407e7e76c2b2d917ff2de6adcd43

And manually running changing the ordering comfirms that the ordering is significant​:

Administrator@​WALLOON ~/repos/perl.git $ gcc -o perl -Wl\,--enable-auto-import -Wl\,--export-all-symbols -Wl\,--enable-auto-image-base -fstack-protector -L/usr/local/lib perlmain.o -L. -lperl lib/auto/Win32CORE/Win32CORE.a `cat ext.libs` -ldl -lcrypt lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x33)​: undefined reference to `Perl_newSVnv' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x33)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_newSVnv' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x4b)​: undefined reference to `Perl_newSVpvn' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x4b)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_newSVpvn' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x5e)​: undefined reference to `Perl_load_module' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x5e)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_load_module' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0xa4)​: undefined reference to `Perl_block_gimme' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0xa4)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_block_gimme' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x96)​: undefined reference to `Perl_call_pv' lib/auto/Win32CORE/Win32CORE.a(Win32CORE.o)​:Win32CORE.c​:(.text+0x96)​: relocation truncated to fit​: R_X86_64_PC32 against undefined symbol `Perl_call_pv' collect2​: error​: ld returned 1 exit status

Administrator@​WALLOON ~/repos/perl.git $ gcc -o perl -Wl\,--enable-auto-import -Wl\,--export-all-symbols -Wl\,--enable-auto-image-base -fstack-protector -L/usr/local/lib perlmain.o -L. lib/auto/Win32CORE/Win32CORE.a -lperl `cat ext.libs` -ldl -lcrypt

Administrator@​WALLOON ~/repos/perl.git $

Many thanks\,

-- Chris Williams aka BinGOs PGP ID 0x4658671F http​://www.gumbynet.org.uk

p5pRT commented 9 years ago

From @tonycoz

On Sun Nov 09 11​:24​:19 2014\, chris@​bingosnet.co.uk wrote​:

Cygwin builds are failing during the static linking of Win32CORE into perlmain

The attached patch fixes cygwin linking for me.

It will need to be tested on os390 too.

Tony

p5pRT commented 9 years ago

From @tonycoz

0001-perl-123163-use-the-original-link-order-unless-on-os.patch ```diff From 209b2536e521936bb4bd344ff54655b370cc9ec1 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Wed, 12 Nov 2014 16:46:48 +1100 Subject: [PATCH] [perl #123163] use the original link order unless on os390 --- Makefile.SH | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Makefile.SH b/Makefile.SH index 5f630fa..f3fea9a 100755 --- a/Makefile.SH +++ b/Makefile.SH @@ -930,7 +930,20 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl $(PERL_EXE): $& perlmain$(OBJ_EXT) $(LIBPERL) $(static_ext) ext.libs $(PERLEXPORT) write_buildcustomize.pl -@rm -f miniperl.xok +!NO!SUBS! + + case $osname in + os390) $spitshell >>$Makefile <<'!NO!SUBS!' $(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(LLIBPERL) $(static_ext) `cat ext.libs` $(libs) +!NO!SUBS! + ;; + *) $spitshell >>$Makefile <<'!NO!SUBS!' + $(SHRPENV) $(CC) -o perl $(CLDFLAGS) $(CCDLFLAGS) perlmain$(OBJ_EXT) $(static_ext) $(LLIBPERL) `cat ext.libs` $(libs) +!NO!SUBS! + ;; + esac + + $spitshell >>$Makefile <<'!NO!SUBS!' # Microperl. This is just a convenience thing if one happens to # build also the full Perl and therefore the real big Makefile: -- 1.7.10.4 ```
p5pRT commented 9 years ago

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

p5pRT commented 9 years ago

From @tonycoz

On Tue Nov 11 21​:57​:52 2014\, tonyc wrote​:

On Sun Nov 09 11​:24​:19 2014\, chris@​bingosnet.co.uk wrote​:

Cygwin builds are failing during the static linking of Win32CORE into perlmain

The attached patch fixes cygwin linking for me.

Applied as 6711cb4f90cfacd285b7fabbb5337493678fc628.

It will need to be tested on os390 too.

Discussed this with khw\, and he said it will get tested the next time he rebases.

Tony

p5pRT commented 9 years ago

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