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 perl build problems on Stratus VOS #10678
Comments
From @paulg1973Gentle Perl5 Porters, The attached text files contain patches to correct build problems on the Makefile.SH: This patch removes the "miniperl" dependency of the "all" ext/Socket/Socket.xs: Sadly, OpenVOS does not yet support IPv6. I edited The attached patches apply cleanly as of today. These patches were prepared using "diff -u"; I have not completed the These patches by themselves do not get perl5 to run all of the test <<perl-current.patch.txt>> <<perl-5.10.x.patch.txt>> |
From @paulg1973Inline Patch--- perl-current/Makefile.SH~ 2010-09-05 10:39:10.000000000 -0400
+++ perl-current/Makefile.SH 2010-09-14 00:49:48.000000000 -0400
@@ -555,7 +555,7 @@
.c.s:
$(CCCMDSRC) -S $*.c
-all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) miniperl $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
+all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
@echo " ";
@echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
--- perl-current/ext/Socket/Socket.xs~ 2010-04-24 16:58:10.000000000 -0400
+++ perl-current/ext/Socket/Socket.xs 2010-09-13 17:07:15.000000000 -0400
@@ -465,22 +465,34 @@
CODE:
#ifdef HAS_INETNTOP
STRLEN addrlen, struct_size;
+#ifdef AF_INET6
struct in6_addr addr;
char str[INET6_ADDRSTRLEN];
+#else
+ struct in_addr addr;
+ char str[INET_ADDRSTRLEN];
+#endif
char *ip_address = SvPV(ip_address_sv, addrlen);
- if(af == AF_INET) {
- struct_size = sizeof(struct in_addr);
- } else if(af == AF_INET6) {
- struct_size = sizeof(struct in6_addr);
- } else {
- croak("Bad address family for %s, got %d, should be either AF_INET or AF_INET6",
+ struct_size = sizeof(addr);
+
+ if(af != AF_INET
+#ifdef AF_INET6
+ && af != AF_INET6
+#endif
+ ) {
+ croak("Bad address family for %s, got %d, should be"
+#ifdef AF_INET6
+ " either AF_INET or AF_INET6",
+#else
+ " AF_INET",
+#endif
"Socket::inet_ntop",
af);
}
Copy( ip_address, &addr, sizeof addr, char );
- inet_ntop(af, &addr, str, INET6_ADDRSTRLEN);
+ inet_ntop(af, &addr, str, sizeof str);
ST(0) = newSVpvn_flags(str, strlen(str), SVs_TEMP);
#else
@@ -494,9 +506,23 @@
CODE:
#ifdef HAS_INETPTON
int ok;
- struct in6_addr ip_address;
- if(af != AF_INET && af != AF_INET6) {
- croak("Bad address family for %s, got %d, should be either AF_INET or AF_INET6",
+#ifdef AF_INET6
+ struct in6_addr ip_address;
+#else
+ struct in_addr ip_address;
+#endif
+
+ if(af != AF_INET
+#ifdef AF_INET6
+ && af != AF_INET6
+#endif
+ ) {
+ croak("Bad address family for %s, got %d, should be"
+#ifdef AF_INET6
+ " either AF_INET or AF_INET6",
+#else
+ " AF_INET",
+#endif
"Socket::inet_pton",
af);
}
@@ -504,8 +530,7 @@
ST(0) = sv_newmortal();
if (ok) {
- sv_setpvn( ST(0), (char *)&ip_address,
- af == AF_INET6 ? sizeof(ip_address) : sizeof(struct in_addr) );
+ sv_setpvn( ST(0), (char *)&ip_address, sizeof(ip_address) );
}
#else
ST(0) = (SV *)not_here("inet_pton"); |
From @paulg1973Inline Patch--- perl-5.10.x/Makefile.SH~ 2009-08-23 12:24:05.000000000 -0400
+++ perl-5.10.x/Makefile.SH 2010-09-14 11:53:19.000000000 -0400
@@ -537,7 +537,7 @@
.c.s:
$(CCCMDSRC) -S $*.c
-all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) miniperl $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
+all: $(FIRSTMAKEFILE) miniperl$(EXE_EXT) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
@echo " ";
@echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
|
From @paulg1973Inline Patch--- perl-5.12.x/Makefile.SH~ 2010-08-21 01:01:06.000000000 -0400
+++ perl-5.12.x/Makefile.SH 2010-09-14 11:57:50.000000000 -0400
@@ -553,7 +553,7 @@
.c.s:
$(CCCMDSRC) -S $*.c
-all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) miniperl $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
+all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make
@echo " ";
@echo " Everything is up to date. Type '$(MAKE) test' to run test suite."
--- perl-current/ext/Socket/Socket.xs~ 2010-04-24 16:58:10.000000000 -0400
+++ perl-current/ext/Socket/Socket.xs 2010-09-13 17:07:15.000000000 -0400
@@ -465,21 +465,34 @@
CODE:
#ifdef HAS_INETNTOP
STRLEN addrlen, struct_size;
+#ifdef AF_INET6
struct in6_addr addr;
char str[INET6_ADDRSTRLEN];
+#else
+ struct in_addr addr;
+ char str[INET_ADDRSTRLEN];
+#endif
char *ip_address = SvPV(ip_address_sv, addrlen);
- if(af == AF_INET) {
- struct_size = sizeof(struct in_addr);
- } else if(af == AF_INET6) {
- struct_size = sizeof(struct in6_addr);
- } else {
- croak("Bad address family for Socket::inet_ntop, got %d, should be either AF_INET or AF_INET6",
+ struct_size = sizeof(addr);
+
+ if(af != AF_INET
+#ifdef AF_INET6
+ && af != AF_INET6
+#endif
+ ) {
+ croak("Bad address family for %s, got %d, should be"
+#ifdef AF_INET6
+ " either AF_INET or AF_INET6",
+#else
+ " AF_INET",
+#endif
+ "Socket::inet_ntop",
af);
}
Copy( ip_address, &addr, sizeof addr, char );
- inet_ntop(af, &addr, str, INET6_ADDRSTRLEN);
+ inet_ntop(af, &addr, str, sizeof str);
ST(0) = newSVpvn_flags(str, strlen(str), SVs_TEMP);
#else
@@ -493,9 +506,23 @@
CODE:
#ifdef HAS_INETPTON
int ok;
- struct in6_addr ip_address;
- if(af != AF_INET && af != AF_INET6) {
- croak("Bad address family for %s, got %d, should be either AF_INET or AF_INET6",
+#ifdef AF_INET6
+ struct in6_addr ip_address;
+#else
+ struct in_addr ip_address;
+#endif
+
+ if(af != AF_INET
+#ifdef AF_INET6
+ && af != AF_INET6
+#endif
+ ) {
+ croak("Bad address family for %s, got %d, should be"
+#ifdef AF_INET6
+ " either AF_INET or AF_INET6",
+#else
+ " AF_INET",
+#endif
"Socket::inet_pton",
af);
}
@@ -503,8 +530,7 @@
ST(0) = sv_newmortal();
if (ok) {
- sv_setpvn( ST(0), (char *)&ip_address,
- af == AF_INET6 ? sizeof(ip_address) : sizeof(struct in_addr) );
+ sv_setpvn( ST(0), (char *)&ip_address, sizeof(ip_address) );
}
#else
ST(0) = (SV *)not_here("inet_pton"); |
From @paulg1973I don't know what happened to mess up this letter. There were 3 enclosures. One of the enclosures seems to have become the body of the letter. The body of the letter got turned into an enclosure. The other two enclosures seem to be ok. Here is the original letter again. If anybody has any questions about these proposed changes, please let me know. Gentle Perl5 Porters, The attached text files contain patches to correct build problems on the Makefile.SH: This patch removes the "miniperl" dependency of the "all" ext/Socket/Socket.xs: Sadly, OpenVOS does not yet support IPv6. I edited The attached patches apply cleanly as of today. These patches were prepared using "diff -u"; I have not completed the These patches by themselves do not get perl5 to run all of the test <<perl-current.patch.txt>> <<perl-5.10.x.patch.txt>> Thanks |
From @cpansproutOn Fri Oct 01 13:48:32 2010, paulg wrote:
Thank you. I’ve just applied perl-current.patch.txt as a5addb1. I’m unsure as to the current policy with regard to maintenance patches. I’ll let someone else take over. |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Fri Oct 01 13:48:32 2010, paulg wrote:
Is this deserving of a mention in perldelta? |
From @rafl"Father Chrysostomos via RT" <perlbug-followup@perl.org> writes:
Yes, I think so. In the section for platform-specific notes. |
From @cpansproutOn Sun Oct 03 14:28:06 2010, rafl@debian.org wrote:
Added in 810f3b7. |
From [Unknown Contact. See original ticket]On Sun Oct 03 14:28:06 2010, rafl@debian.org wrote:
Added in 810f3b7. |
From @obraOn Sun 3.Oct'10 at 14:22:19 -0700, Father Chrysostomos via RT wrote:
It's docced in perlpolicy.pod - this looks like a big enough chnage that -J
|
From @craigberryOn Sun, Oct 3, 2010 at 8:02 PM, Jesse Vincent <jesse@fsck.com> wrote:
It looked like two fairly small changes to me, both in the category of The one change to Socket.xs restores buildability anywhere AF_INET6 is The change to Makefile.SH, while smaller, seems a bit more dangerous. |
From @paulg1973Craig A. Berry [mailto:craig.a.berry@gmail.com] wrote:
Feel free to ignore the files that gave the exact patch for the back-releases, but you may have to fiddle the edits a little if you back-port from blead. I submitted patches that need no fiddling.
I would hope they can be back-ported. They are pretty simple changes (but see below).
Thanks, Craig.
Correct.
Agreed. Comment: According to Configure, the only platforms that require an executable suffix are Stratus VOS, DJGPP, OS/2, and Cygwin. On every other platform (clearly the majority of them), this change is a no-op. I was not paying attention when this change went in, or I would have noticed that it broke our build way back when. On the 4 platforms that require an executable suffix, the effect of my patch is to retain "miniperl.pm" (VOS) or "miniperl.exe" (DJGPP, OS/2, Cygwin) as a target, while removing "miniperl" as a target. I only see one reference to a bare "miniperl" that remains in Makefile.SH, in the os/2 section (~line 694). It doesn't use an executable suffix, despite the setting of the _exe variable for OS/2 in configure. This seems inconsistent to me, and I suspect that it is either evidence that the OS/2 port has not been built in a while, or that OS/2 doesn't really care whether the suffix is used or not. I would have expected line 694 to also reference $(MINIPERL_EXE) not miniperl. I'd be grateful if the maintainer(s) of the DJGPP, OS/2 and Cygwin ports would build perl with this patch in place and report on its effect. I do not think it will have any effect on them, but life is complicated and a simple Configure/Build/Test cycle would prove or disprove my proposed change. At the very least, it would indicate whether perl still builds on those platforms, with or without these changes. If these ports are no longer maintained, then the question is moot. Thanks |
From @doughera88On Mon, 4 Oct 2010, Craig A. Berry wrote:
That's a good, sensible, and safe first pass assessment. But, as Craig sensibly points out, upon more careful examination, this is
Anyone fluent with git care to enlighten me how to do that efficiently? -- |
From ben@morrow.me.ukQuoth doughera@lafayette.edu (Andy Dougherty):
Personally I use a modified version of rgs' githistorybrowser.vim The duplicated 'miniperl$(EXE_EXT) miniperl' (as it was then) was added commit dcff826 eliminate .patchnum and related infrastrcuture from *nix based build process Rename the old "unpushed.h" to "git_version.h" and make it hold the defines and it looks to me like an oversight. Ben |
From @obra
Consider my concern withdrawn. Best, |
From @avarOn Mon, Oct 4, 2010 at 17:15, Ben Morrow <ben@morrow.me.uk> wrote:
Newer versions (as in ones released ~1 month ago) have support for -G, git log --reverse -p -G 'EXE_EXT[^\n]+miniperl' -- Makefile.SH Which in this case is the second commit displayed, but --oneline finds cd4d8a9 Update for OS/2 support: variable file extensions, invoke So often you might have to go through a lot of things, especially if |
From @doughera88On Mon, 4 Oct 2010, Jesse Vincent wrote:
I think this one should go into maint-5.12. I have "Requested" it with -- |
From @cpansproutOn Wed Oct 06 11:27:18 2010, doughera wrote:
a5addb1 has been marked as cherry-picked in cherrymaint. But I do not |
From @doughera88On Sun, 24 Oct 2010, Father Chrysostomos via RT wrote:
Yes, that's my fault. I picked "Requested", but later hit the down arrow In any case, don't worry about it too much since the cherry-picked -- |
From @jkeenanOn Sun Oct 24 13:42:51 2010, doughera wrote:
Should we still be considering any of the patches submitted in this Thank you very much. |
From @paulg1973I am reviewing it now. PG -----Original Message----- On Sun Oct 24 13:42:51 2010, doughera wrote:
Should we still be considering any of the patches submitted in this ticket, or are they too stale? Thank you very much. |
From @paulg1973blead: According to previous entries in this report, these patches were applied by sprout on 2010-10-03 (a5addb1). Updated perldelta in 810f3b7. perl-5.12: These changes are present in today's copy of perl-5.12. I don't know exactly when this happened. perl-5.10: I only proposed to change one file, which is Makefile.SH. These changes were not applied, and they are still valid. I don't know if perl-5.10 is still maintained, but whether or not it is still maintained, I don't think you need to apply this patch. Let sleeping dogs lie, I say. You can close this bug report. PG |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#78132 (status was 'resolved')
Searchable as RT78132$
The text was updated successfully, but these errors were encountered: