-
Notifications
You must be signed in to change notification settings - Fork 69
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
Question: Versions of Perl newer than build.me #81
Comments
Yes - it is a bad idea. The main reason is because on FreeBSD, the Perl binaries don't reside in /usr/bin. The second reason is that the actual test for Perl should be conducted down at L469. This revised logic allows all Perl (including 5.28) to be properly detected and used on FreeBSD. How did the build fail? What was the message? |
Hi fsbruva. I haven't attempted to build it myself, my jail is at perl 5.26. Someone trying now on a jail on a higher freebsd base system is failing. That is freebsd 12.1. The lowest perl on packages for it is 5.28.3. |
Was this the same system that you said was 11.3 in your first comment (they upgraded to 12.1)? |
Hi. Hisf irst attempt was on an 11.3 jail. They since blew that jail to see if 12.1 would be more successful by building a new jail on 12.1. I'm going to reproduce myself. I've now built a jail for this. This jail is on 11.3: No perl installed yet. A pkg search brings: I'll install perl 5.30 and try to build lms, see how it goes for me. Edit: root@builder:/ # perl -v which would probably explain the failure to find a supported perl version. It is found here: Therefore it looks like I need to do a symlink to /usr/local/bin/perl5.30.3. Should I do it from /usr/bin ? |
I can confirm it builds correctly after a pair of symlinks are created to the perl binary from pkg. Should I create a new issue for it, to alter the perl test for freebsd? |
Thanks for your diagnostic efforts. However, unless @mherger disagrees, the behavior you have described is not an issue that necessitates modification of buildme.sh, because you are using a non-standard configuration. If it requires any change - it might be to the README within CPAN. Usually, FreeBSD automatically installs a symlink from /usr/local/bin/perl5.x.y to /usr/local/bin/perl, but only if you install the default perl. If you install from ports, you can specify However, you selected a non-default Perl version, and chose to install it in such a way (from pkg) that means NO perl script (with
If you want to test this - delete the symlinks, remove perl5.30 ( |
In case it wasn't clear - the script uses whatever gets returned from |
Thank you very much for the detailed explanation. I didn't realise that installing a package not by (pkg install perl5) even it listed in the available perl versions on (pkg search perl) wasn't standard.
Therefore unfortunately the symlink isn't created anymore. However I agree in your assesment and moving the burden to the build.me script feels too onerous. I think a note in the README within CPAN would take care of it. |
That UPDATING note serves to alert users that the symlink created in FreeBSD for ALL Perl versions 5.8 - 5.18 at /usr/bin/perl (and pointed to /usr/local/bin/perl5.x.y) isn't used anymore. Therefore, users should be aware that: 1. They may need to alter the shebang of their existing Perl scripts and 2. Porting a Perl script written for Linux will require modifying the shebang.
You are confusing two different symlinks. The symlink that isn't created anymore is the one at /usr/bin/perl. That's what the UPDATING note says. Since /usr/bin/ and /usr/local/bin are both in $PATH, the move out of /usr/bin was mostly semantic. FreeBSD stopped affording special treatment to one port in particular, ending the legacy of backwards compatibility to a time when Perl came bundled with the FreeBSD base.
This is educating users that if they put a path to perl in their shebang, it will only work if there is a file called, "perl" at that location. The FreeBSD ports/pkg maintainers tend to assume you know what you are doing. As such, they assumed you had a compelling reason for selecting a specific, non-default version of Perl (5.30), AND you didn't want pkg to take the steps to make it your system's default perl. As such, they assume you are capable of the necessary configuration changes to make the non-default perl functional for your purposes. The documentation about the /usr/local/bin/perl symlink is in the perl5.30 port's Makefile, and gets displayed when you build from the ports tree:
|
Understood. |
Hi, what is the etiquette on these? Should I convert it to an issue to track any action? |
I must admit that I didn't follow all of what you discussed. So if there's something actionable, then please provide a summary of what needs to be done. Or even better: submit a pull request ;-). |
I can submit a PR for this topic this week. This is lighting a fire under me to get back into contributing. |
Hi again.
Currently binary build fails when running build.me script.
This is on FreeBSD 11.3 which has only Perl from 5.28 onwards.
I think it is because the perl check only goes to 5.26:
From line # 453
Path to Perl 5.26
if [ -x "/usr/bin/perl5.26.0" ]; then
PERL_526=/usr/bin/perl5.26.0
fi
if [ $PERL_526 ]; then
PERL_BIN=$PERL_526
PERL_MINOR_VER=26
fi
Would it be a bad idea for me to add a new block for 5.28 so it passes the check and attempt to build for this version by adding:
Path to Perl 5.28
if [ -x "/usr/bin/perl5.28.0" ]; then
PERL_528=/usr/bin/perl5.28.0
fi
if [ $PERL_528 ]; then
PERL_BIN=$PERL_528
PERL_MINOR_VER=28
fi
The text was updated successfully, but these errors were encountered: