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] remove distros from needing ppport.h in core #16477

Closed
p5pRT opened this issue Mar 24, 2018 · 8 comments
Closed

[PATCH] remove distros from needing ppport.h in core #16477

p5pRT opened this issue Mar 24, 2018 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Mar 24, 2018

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

Searchable as RT133024$

@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2018

From @bulk88

Created by @bulk88

See attached patch. This could be for 5.28, but doesn't have to be,
unless a new build process flow without mkppport as a dep on Win32 is
put in, but after this patch Win32API​::File is the only XS module left
on Win32 perl that needs ppport.h since SysV and DBFile dont build on
Win32. Tackling the last 3 ppport needing modules requires CPAN author
participation.

Perl Info

Flags:
            category=core
            severity=low

Site configuration information for perl 5.27.9:

Configured by Administrator at Tue Jan 30 20:34:30 2018.

Summary of my perl5 (revision 5 version 27 subversion 9) configuration:

          Platform:
            osname=MSWin32
            osvers=5.2.3790
            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
            default_inc_excludes_dot=define
            bincompat5005=undef
          Compiler:
            cc='cl'
            ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32
-D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY'
            optimize='-O1 -MD -Zi -DNDEBUG -GL'
            cppflags='-DWIN32'
            ccversion='15.00.30729.01'
            gccversion=''
            gccosandvers=''
            intsize=4
            longsize=4
            ptrsize=4
            doublesize=8
            byteorder=1234
            doublekind=3
            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 -ltcg
-libpath:"c:\perl\lib\CORE"        -machine:x86'
            libpth="C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\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=perl527.lib
            gnulibc_version=''
          Dynamic Linking:
            dlsrc=dl_win32.xs
            dlext=dll
            d_dlsymun=undef
            ccdlflags=' '
            cccdlflags=' '
            lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg
            -libpath:"c:\perl\lib\CORE"        -machine:x86'



@INC for perl 5.27.9:
            lib
            C:/p527/srcnew/lib


Environment for perl 5.27.9:
            CYGWIN=tty
            HOME (unset)
            LANG (unset)
            LANGUAGE (unset)
            LD_LIBRARY_PATH=/usr/lib/x86:/usr/X11R6/lib
            LOGDIR (unset)
            PATH=C:\WINDOWS\system32;C:\Program Files (x86)\Microsoft Visual
Studio 9.0\VC\BIN;C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin;C:\Perl\bin;C:\WINDOWS;C:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files
(x86)\Git\bin;C:\sp3220\c\bin;
            PERL_BADLANG (unset)
            SHELL (unset)











@p5pRT
Copy link
Author

p5pRT commented Mar 24, 2018

From @bulk88

0001-remove-distros-from-needing-ppport.h-in-core.patch
From db72a10528e9d90789bced4a7bfd01c74040595e Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Sat, 24 Mar 2018 19:45:51 -0400
Subject: [PATCH] remove distros from needing ppport.h in core

These changes are towards a goal of removing mkppport one day as part of
a optimization for parallel building (less deps needed before XS
extensions are built). This is a follow-on patch to the dummy ppport.h
trick in Perl #128438 ticket that had issues.

-for Time::HiRes the DEFINE() in Makefile.PL can't be be in sub init()
 because that sub isn't called on windows
-SLU has not needed ppport.h in core since commit 5e99e069f5
 aka 1.47 import from cpan
-Cwd used to be a no ppport.h since 3.25, in 3.30_02 the code (Cwd.xs) was
 deleted/broken under commit 9bc94e3dae, or changes file
 "Remove more special logic required for core perl.". Put back the Cwd.xs
 code and remove Cwd from the ppport.h list
---
 dist/PathTools/Cwd.pm       |    2 +-
 dist/PathTools/Cwd.xs       |   12 +++++++-----
 dist/Time-HiRes/HiRes.xs    |    4 +++-
 dist/Time-HiRes/Makefile.PL |    1 +
 mkppport.lst                |    3 ---
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index 58af935..16d5b11 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -3,7 +3,7 @@ use strict;
 use Exporter;
 
 
-our $VERSION = '3.74';
+our $VERSION = '3.75';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//d;
 
diff --git a/dist/PathTools/Cwd.xs b/dist/PathTools/Cwd.xs
index 2ca8acd..8662400 100644
--- a/dist/PathTools/Cwd.xs
+++ b/dist/PathTools/Cwd.xs
@@ -7,11 +7,13 @@
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
-#define NEED_croak_xs_usage
-#define NEED_sv_2pv_flags
-#define NEED_my_strlcpy
-#define NEED_my_strlcat
-#include "ppport.h"
+#ifndef NO_PPPORT_H
+#  define NEED_croak_xs_usage
+#  define NEED_sv_2pv_flags
+#  define NEED_my_strlcpy
+#  define NEED_my_strlcat
+#  include "ppport.h"
+#endif
 
 #ifdef I_UNISTD
 #   include <unistd.h>
diff --git a/dist/Time-HiRes/HiRes.xs b/dist/Time-HiRes/HiRes.xs
index 39ac3fd..f9acf2c 100644
--- a/dist/Time-HiRes/HiRes.xs
+++ b/dist/Time-HiRes/HiRes.xs
@@ -18,7 +18,9 @@ extern "C" {
 #include "EXTERN.h"
 #include "perl.h"
 #include "XSUB.h"
-#include "ppport.h"
+#ifdef USE_PPPORT_H
+#  include "ppport.h"
+#endif
 #if defined(__CYGWIN__) && defined(HAS_W32API_WINDOWS_H)
 # include <w32api/windows.h>
 # define CYGWIN_WITH_W32API
diff --git a/dist/Time-HiRes/Makefile.PL b/dist/Time-HiRes/Makefile.PL
index 8036fbf..c76c08a 100644
--- a/dist/Time-HiRes/Makefile.PL
+++ b/dist/Time-HiRes/Makefile.PL
@@ -899,6 +899,7 @@ sub doMakefile {
 	);
 	DEFINE('ATLEASTFIVEOHOHFIVE');
     }
+    DEFINE('USE_PPPORT_H') unless $ENV{PERL_CORE};
 
     push (@makefileopts,
 	'NAME'	=> 'Time::HiRes',
diff --git a/mkppport.lst b/mkppport.lst
index ef26eeb..d919206 100644
--- a/mkppport.lst
+++ b/mkppport.lst
@@ -7,7 +7,4 @@
 
 cpan/DB_File
 cpan/IPC-SysV
-cpan/Scalar-List-Utils
 cpan/Win32API-File
-dist/PathTools
-dist/Time-HiRes
-- 
1.7.9.msysgit.0

@p5pRT
Copy link
Author

p5pRT commented Jul 20, 2018

From @bulk88

On Sat, 24 Mar 2018 16​:51​:22 -0700, bulk88 wrote​:

This is a bug report for perl from bulk88@​hotmail.com,
generated with the help of perlbug 1.41 running under perl 5.27.9.

-----------------------------------------------------------------
[Please describe your issue here]

See attached patch. This could be for 5.28, but doesn't have to be,
unless a new build process flow without mkppport as a dep on Win32 is
put in, but after this patch Win32API​::File is the only XS module left
on Win32 perl that needs ppport.h since SysV and DBFile dont build on
Win32. Tackling the last 3 ppport needing modules requires CPAN author
participation.

Bump.

@p5pRT
Copy link
Author

p5pRT commented Jul 27, 2018

From @steve-m-hay

Thanks for the patch. Applied to blead in commit cbc1b41.

I had to bump Time​::HiRes's $VERSION in a follow-up commit.

Also note that mkppport.lst has grown slightly since you wrote this patch​: It now also includes IO and Storable.

@p5pRT
Copy link
Author

p5pRT commented Jul 27, 2018

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

@p5pRT
Copy link
Author

p5pRT commented Jul 27, 2018

@steve-m-hay - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 22, 2019

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.30.0, this and 160 other issues have been
resolved.

Perl 5.30.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.30.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT
Copy link
Author

p5pRT commented May 22, 2019

@khwilliamson - Status changed from 'pending release' 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