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
Strange bug with -Dprefix=/usr and -Dversiononly #15377
Comments
From @cpansproutI have tried installing perl 5.24.0 on an old PPC machine, with the configuration below, but it installed the perl binary and the scripts in /bin, even though I specified a prefix of /usr. I don’t know exactly which option is responsible for the bug, but I do find it really strange. This is what is *really* unhelpful: $ which cpan5.24.0 So the #! line is correct in using /usr/bin/, which is what I asked for, but every got plopped in /bin instead, so nothing5.24.0 works. I have to use perl5.24.0 -S whatever5.24.0. Grrr!!! More info follows. Also attached are config.sh and Policy.sh. $ which perl5.24.0 Characteristics of this binary (from libperl): -- Father Chrysostomos |
From @cpansprout |
From @cpansprout |
From @jkeenanOn Mon May 30 14:30:17 2016, sprout wrote:
In Porting/Glossary, I find: ##### If you reconfigure without '-Dversiononly', do you get better results? That being said, when I configured perl-5.24.0 on an even older Darwin/PPC with the exact same arguments as you, I got entries in config.sh like: ##### All of which is similar to your undesired results. Thank you very much. -- |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Mon May 30 16:27:34 2016, jkeenan wrote:
And, in installperl, I see that the '-v' option is described thus: ##### -- |
From @jkeenanOn Mon May 30 16:32:47 2016, jkeenan wrote:
But, on still *more* investigation, it seems that if I configure *with* '-Dprefix=/usr' but *without* '-Dversionly', I reproduce the same puzzling values in the '^install*' section of config.sh as you got. See attachment. |
From @tonycozOn Mon May 30 14:30:17 2016, sprout wrote:
I think it's caused by the hints on darwin, from hints/darwin.sh: case "$prefix" in That said, replacing your system perl is probably dangerous (OS X 10.11 doesn't allow it AFAIK.) Tony |
From @cpansproutOn Mon May 30 17:19:13 2016, tonyc wrote:
People always say that, though I’ve done it numerous times with impunity. In any case, I’m *not* trying to replace the system perl here (-Dversiononly), and I’ve used this incantation before. A bisect points to v5.23.4-46-g41d7307: $ ../perl.git/porting/bisect.pl -Dprefix=/usr --target config.sh --end v5.24.0 --match installbin=\'/usr config.sh Make -O behaviour the default I can’t see how that commit causes that. -- Father Chrysostomos |
From @arcFather Chrysostomos via RT <perlbug-followup@perl.org> wrote:
This looks like a Very Bad Idea, imho. AFAICT, hints/darwin.sh has overridden the user's configured paths
At the very least, hints/darwin.sh must avoid overriding the user's But I honestly can't see a good argument against simply jettisoning If I don't hear a counterargument, I'll make that change in the next few days.
I share your puzzlement; I see signs of the same brokenness under -- |
From @doughera88On Tue, May 31, 2016 at 09:04:32PM +0100, Aaron Crane wrote:
Yes, I agree. If the user specified -Dprefix=/usr, changing it to / ./Configure -des -Dopenbsd_distribution
I agree with the sentiment, but I'd suggest wrapping it up in an
What happened is that Father C specified -Dprefix=/usr, the hints Having the -O switch as the default also makes Configure behave I'm now wondering what else -O might break. -- |
From @cpansproutOn Wed Jun 01 20:47:48 2016, doughera wrote:
BTW, I honestly couldn’t care whether the modules get installed in /usr or in /Library. It does seem to me that -O is problematic, and that things are happening the wrong order. Changing the darwin hints may just paper over the problem.
It seems that -O/optdef.sh is happening too late. It should probably happen *before* hints files are read, should it not? -- Father Chrysostomos |
From @doughera88On Wed, Jun 01, 2016 at 09:42:17PM -0700, Father Chrysostomos via RT wrote:
It actually gets run twice -- once before the hints are read (that's as -- |
From @tonycozOn Wed Jun 01 21:42:16 2016, sprout wrote:
The hints are still pretty strange, the attached makes the special hints require a special option. Apple appear to do their own thing, appending specific settings to hints/darwin.sh to do all the things we have the hints doing, but they're still using perl 5.18.2. Tony |
From @tonycoz0001-perl-128295-don-t-treat-Dprefix-usr-as-special.patchFrom 227846bdf8a9d954258dffd1580e353feeed3ecd Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Wed, 15 Jun 2016 15:02:48 +1000
Subject: (perl #128295) don't treat -Dprefix=/usr as special
but instead require an extra option -Ddarwin_distribution to produce
the same results.
---
hints/darwin.sh | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/hints/darwin.sh b/hints/darwin.sh
index e1cd91b..ef2e106 100644
--- a/hints/darwin.sh
+++ b/hints/darwin.sh
@@ -35,15 +35,10 @@ esac
# but that caused too much grief.
# vendorlib="/System/Library/Perl/${version}"; # Apple-supplied modules
-# BSD paths
-case "$prefix" in
-'') # Default install; use non-system directories
- prefix='/usr/local';
- siteprefix='/usr/local';
- ;;
-'/usr') # We are building/replacing the built-in perl
- prefix='/';
- installprefix='/';
+case "$darwin_distribution" in
+$define) # We are building/replacing the built-in perl
+ prefix='/usr';
+ installprefix='/usr';
bin='/usr/bin';
siteprefix='/usr/local';
# We don't want /usr/bin/HEAD issues.
@@ -68,8 +63,6 @@ case "$prefix" in
siteman1dir='/usr/local/share/man/man1';
siteman3dir='/usr/local/share/man/man3';
;;
- *) # Anything else; use non-system directories, use Configure defaults
- ;;
esac
##
--
2.7.4 (Apple Git-66)
|
From @arcTony Cook via RT <perlbug-followup@perl.org> wrote:
Sorry for the long delay in following up on this, but that patch makes -- |
@arc - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#128295 (status was 'resolved')
Searchable as RT128295$
The text was updated successfully, but these errors were encountered: