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] compile error after re-running Configure since AmigaOS merge #14923
Comments
From @dcollinsndcollins@nightshade:~/perl$ git clean -dxf > /dev/null Bisect points at one of the amigaos changes to allow ./Configure to use hints of d_procselfexe, without actually allowing it to use hints of procselfexe. As a result, if there are hints of (d_)?procselfexe, the above behavior is observed. It is trivial to move the line blanking procselfexe to inside the case statement, as in the attached trivial.patch. However, we never allowed d_procselfexe to hint before, we always checked since it is trivial to do so. Therefore, I propose the attached procselfexe.patch, which instead only accepts a hint of 'undef', and in any other case, exhibits the usual behavior of finding and checking the platform-specific exe for symbolic-link-ness. %% GIT BISECT %% (bisected on the return value of ./Configure -Dusedevel -des && ./Configure -Dusedevel -des; grep '/proc/self/exe' config.sh) 68b32a2 is the first bad commit amigaos4: Configure: allow hinting d_procselfexe :100755 100755 6eb478d7214816ced51aaee60438676996bcd888 d0ebb2eb35f5f017a6d61056c08585035d4778e5 M Configure |
From @dcollinsnprocselfexe.patchdiff --git a/Configure b/Configure
index e12c8bb..5fe2fe1 100755
--- a/Configure
+++ b/Configure
@@ -17160,12 +17160,13 @@ EOM
set readlink d_readlink
eval $inlibc
-: Check if exe is symlink to abs path of executing program
+: Check if exe is symlink to abs path of executing program, but only if we
+: don't have a hint telling us not to. AmigaOS will attempt to mount /proc if
+: /proc/self/exe is referenced, and AmigaOS doesn't have that
echo " "
procselfexe=''
val="$undef"
-case "$d_procselfexe" in
-'')
+if [ "$d_procselfexe" != "$undef" ]; then
case "$d_readlink" in
"$define")
: NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
@@ -17190,8 +17191,7 @@ esac
$rm -f reflect
set d_procselfexe
eval $setvar
-;;
-esac
+fi
: backward compatibility for d_hvfork
if test X$d_hvfork != X; then
|
From @dcollinsntrivial.patchdiff --git a/Configure b/Configure
index e12c8bb..ba1aaff 100755
--- a/Configure
+++ b/Configure
@@ -17162,10 +17162,10 @@ eval $inlibc
: Check if exe is symlink to abs path of executing program
echo " "
-procselfexe=''
val="$undef"
case "$d_procselfexe" in
'')
+procselfexe=''
case "$d_readlink" in
"$define")
: NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels |
From @jkeenanOn Wed Sep 23 20:00:08 2015, dcollinsn@gmail.com wrote:
Would it be possible for you to do a 'git checkout' of the commit immediately before the one that broke the build, configure and build perl, and then provide us with the output of 'perl -V'? That might help with diagnostics. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @dcollinsnJames, I can when I get back to my computer but maybe it would be easier to
|
From @jkeenanOn Thu Sep 24 16:49:39 2015, dcollinsn@gmail.com wrote:
It's not a question as to whether or not *I* understand your problem. We have long recommended that people include the output of 'perl -V' when filing a bug report; the 'perlbug' utility does this automatically. So we're only asking you to supply the same type of information as anybody else, and we do so to maximize the chance that someone reading the P5P list can help you or evaluate your patches. Thank you very much. -- |
From @dcollinsnHappy to provide: %% PERL -V %% dcollins@nightshade:~/perl$ ./perl -Ilib -V Characteristics of this binary (from libperl): On Thu, Sep 24, 2015 at 9:03 PM, James E Keenan via RT <
|
From @tonycozOn Wed Sep 23 20:00:08 2015, dcollinsn@gmail.com wrote:
I think I prefer the "trivial" patch. The more complex patch doesn't let a hints file include: d_procselfexe=define or even: ./Configure -Dd_procselfexe -Dprocselfexe=/some/strange/path ... Tony
|
From @dcollinsnOn Mon Oct 12 17:18:04 2015, tonyc wrote:
While I see your point, we've never allowed that before. That'd be a neat idea, but I think we need to do /something/ to fix this regression, because currently ./Configure; ./Configure doesn't work on any platform with a /proc/self/exe. If you'd like to allow that, then you want something like this patch. However, this presently doesn't work because the second if statement doesn't work, even when procselfexe is '', it isn't entered. I can't figure out why, Configure just crashes when I try to debug anything. |
From @dcollinsnprocselfexe.patchdiff --git a/Configure b/Configure
index e751dd9..2725d92 100755
--- a/Configure
+++ b/Configure
@@ -17100,12 +17100,17 @@ EOM
set readlink d_readlink
eval $inlibc
-: Check if exe is symlink to abs path of executing program
+: Check if exe is symlink to abs path of executing program. We will honor
+: hints of procselfexe, as well as hints of d_procselfexe=$undef, and will
+: search if we have no hints or if d_procselfexe=$define but
+: procselfexe=''. AmigaOS will attempt to mount /proc if /proc/self/exe
+: is referenced, and AmigaOS doesnt have that
echo " "
-procselfexe=''
val="$undef"
-case "$d_procselfexe" in
-'')
+if [ "$procselfexe" != '' && "$d_procselfexe" == '']; then
+ d_procselfexe = $define
+fi
+if [ "$procselfexe" == '' && "$d_procselfexe" != "$undef" ]; then
case "$d_readlink" in
"$define")
: NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
@@ -17130,8 +17135,7 @@ esac
$rm -f reflect
set d_procselfexe
eval $setvar
-;;
-esac
+fi
: backward compatibility for d_hvfork
if test X$d_hvfork != X; then
|
From @jhiHow would the attached patch work for you? |
From @jhi0001-rt.perl.org-126152-Configure-proc-issues.patchFrom 7fb5381d2121987ae02403bfcaa9d652c4daee1c Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Tue, 13 Oct 2015 08:49:32 -0400
Subject: [PATCH] rt.perl.org 126152 Configure /proc issues
---
Configure | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/Configure b/Configure
index e751dd9..56f777a 100755
--- a/Configure
+++ b/Configure
@@ -17100,17 +17100,26 @@ EOM
set readlink d_readlink
eval $inlibc
-: Check if exe is symlink to abs path of executing program
+: Check if exe is symlink to the abs path of executing program.
+: We will honor hints of procselfexe, as well as hints of
+: d_procselfexe=$undef, and will search if we have no hints or if
+: d_procselfexe=$define but procselfexe=''. Known problematic ones:
+: AmigaOS will attempt to mount proc: aka /proc, if /proc/... is
+: referenced, and AmigaOS does not have a proc filesystem anyway.
+: Similarly, /proc exists in IRIX, but it does not contain
+: a symlink to the executing program.
+
echo " "
-procselfexe=''
+case "$procselfexe" in
+''|' ') ;;
+*) d_procselfexe="$define" ;;
+esac
val="$undef"
-case "$d_procselfexe" in
-'')
-case "$d_readlink" in
- "$define")
- : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
- : more tidy to avoid an extra level of symlink
- set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
+case "$d_procselfexe:$d_readlink" in
+ "$define:$define")
+ : NetBSD first as /proc/self is a symlink to /proc/curproc,
+ : and it feels more tidy to avoid an extra level of symlink
+ set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
while test $# -gt 0; do
type=$1; try=$2
shift; shift
@@ -17130,8 +17139,6 @@ esac
$rm -f reflect
set d_procselfexe
eval $setvar
-;;
-esac
: backward compatibility for d_hvfork
if test X$d_hvfork != X; then
--
2.6.0
|
From [Unknown Contact. See original ticket]How would the attached patch work for you? |
From @dcollinsnOn Tue Oct 13 06:08:37 2015, jhi wrote:
I see what you fixed about my patch ($procselfexe might == ' ' not ''), but without running yours (sorry, on a locked down office PC) I don't think your logic is right. It looks like if you call that with $d_pse and $pse both '', then the first case will do nothing, and then the second case will do nothing. I think the ideal flow is: 1) Do we have a hinted $pse (I'm abbreviating procselfexe) but $d_pse is blank? If so, $d_pse = $define and do nothing else. I'm not clever enough to figure out what happens if we /don't/ have readlink, but it's probably a bad time. Anyway, if that's what the workflow is, then we'll combine the first two steps - which is actually easier if we do my step 3 first. So let me simplify that: A) Do we have a hinted $d_pse == $undef? If so, $pse = '' and do nothing else. So I'll attach that patch, with the caveat that I'm unable to test it until I get home. |
From @dcollinsnprocselfexe.patchdiff --git a/Configure b/Configure
index e751dd9..2725d92 100755
--- a/Configure
+++ b/Configure
@@ -17100,14 +17100,20 @@ EOM
set readlink d_readlink
eval $inlibc
-: Check if exe is symlink to abs path of executing program
+: Check if exe is symlink to abs path of executing program. We will honor
+: hints of procselfexe, as well as hints of d_procselfexe=$undef, and will
+: search if we have no hints or if d_procselfexe=$define but
+: procselfexe=''. Known problematic ones: AmigaOS will attempt to mount
+: proc: aka /proc, if /proc/... is referenced, and AmigaOS does not have a
+: proc filesystem anyway. Similarly, /proc exists in IRIX, but it does not
+: contain a symlink to the executing program.
echo " "
-procselfexe=''
val="$undef"
-case "$d_procselfexe" in
-'')
-case "$d_readlink" in
- "$define")
+if [ "$d_procselfexe" == "$undef" ]; then
+ procselfexe = ''
+elif [ "$procselfexe" != '' && "$procselfexe" != ' ' ]; then
+ d_procselfexe = $define
+elif [ "$d_readlink" == "$define" ]; then
: NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
: more tidy to avoid an extra level of symlink
set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
@@ -17125,13 +17131,10 @@ case "$d_readlink" in
fi
fi
done
- ;;
-esac
-$rm -f reflect
-set d_procselfexe
-eval $setvar
-;;
-esac
+ $rm -f reflect
+ set d_procselfexe
+ eval $setvar
+fi
: backward compatibility for d_hvfork
if test X$d_hvfork != X; then
|
From @jhiConfigure uses (well, tries to be consistent about) a particular (portable) shell dialect.
You want $test not []. if $test "X$d_pse" = "$undef"
The above, and ...
Now d_pse is set (to define or undef) only if the scan is done. I would check if it is possible that it may end up being not set at all (empty string). |
From [Unknown Contact. See original ticket]Configure uses (well, tries to be consistent about) a particular (portable) shell dialect.
You want $test not []. if $test "X$d_pse" = "$undef"
The above, and ...
Now d_pse is set (to define or undef) only if the scan is done. I would check if it is possible that it may end up being not set at all (empty string). |
From @jhi
Aargh. I of course meant: if $test "X$d_pse" = "X$undef" The X-prefix because of some broken shells, IIRC. |
From @jhiOn Wed Oct 14 07:22:50 2015, dcollinsn@gmail.com wrote:
Take two attached, please see how it fares. |
From @jhi0001-PATCH-rt.perl.org-126152-Configure-proc-issues.patchFrom 48c3928b00cf536c67e9da8afac821d0deab2e26 Mon Sep 17 00:00:00 2001
From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Thu, 15 Oct 2015 08:39:42 -0400
Subject: [PATCH] [PATCH] rt.perl.org 126152 Configure /proc issues
---
Configure | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/Configure b/Configure
index e751dd9..21f6dfd 100755
--- a/Configure
+++ b/Configure
@@ -17100,16 +17100,21 @@ EOM
set readlink d_readlink
eval $inlibc
-: Check if exe is symlink to abs path of executing program
+: Check if there is a /proc symlink to the abs path of
+: the executing program. We will honor hints of d_procselfexe=$undef
+: or procselfexe being non-empty, otherwise will try to determine both
+: if we have readlink.
+: AmigaOS will attempt to mount proc: aka /proc, if /proc/... is
+: referenced, and AmigaOS does not have a proc filesystem anyway.
echo " "
-procselfexe=''
val="$undef"
-case "$d_procselfexe" in
-'')
-case "$d_readlink" in
- "$define")
- : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
- : more tidy to avoid an extra level of symlink
+if $test "X$d_procselfexe" = Xundef; then
+ procselfexe=''
+elif $test "X$procselfexe" != X -a "X$procselfexe" != 'X '; then
+ val="$define"
+elif $test "X$d_readlink" = Xdefine; then
+ : NetBSD first as /proc/self is a symlink to /proc/curproc,
+ : and it feels more tidy to avoid an extra level of symlink
set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
while test $# -gt 0; do
type=$1; try=$2
@@ -17125,13 +17130,10 @@ case "$d_readlink" in
fi
fi
done
- ;;
-esac
+fi
$rm -f reflect
set d_procselfexe
eval $setvar
-;;
-esac
: backward compatibility for d_hvfork
if test X$d_hvfork != X; then
--
2.6.0
|
From @dcollinsnOn Thu Oct 15 05:45:48 2015, jhi wrote:
Works for me |
From @jhiOn Thu Oct 15 15:59:53 2015, dcollinsn@gmail.com wrote:
Thanks! I now went ahead and pushed this as b446945. |
@jhi - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126152 (status was 'resolved')
Searchable as RT126152$
The text was updated successfully, but these errors were encountered: