-
Notifications
You must be signed in to change notification settings - Fork 10
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
Ubuntu 22, default Perl, library setup #1291
Comments
Thanks for reporting this. Let me get a Ubuntu docker image spun up later today / tomorrow and I'll figure out what's wrong and update the docs / scripts. |
Apologies to github user @inc, but he must get spam on every Perl issue |
possibly the best fix:: is add some optional installs before the TK install so the TK installer thinks it has more options? I set the cpan to the "local" option, which I needed to set at the start of the install process |
Here's what I've found so far. I have some questions about how we should approach the docs and then will open a PR.
If you install If we want to build Perk::Tk we need the So that boils down to: # Building latest Perl::Tk from source with current install_cpan_modules.pl:
apt install cpanminus libx11-dev gcc
perl src/install_cpan_modules.pl or # Using Ubuntu perl-tk package
apt install cpanminus gcc perl-tk
# Manually remove "Tk" package in install_cpan_modules.pl
perl src/install_cpan_modules.pl Note that So as a Linux GG user, would you prefer to be using the latest Perk::Tk or the Ubuntu version? That will influence how I update the docs (although I will mention the other path). |
I ran this on a second machine, again not used for Perl
User steps which work on machine 2: |
The first machine I used, has |
Can you provide more details on what you did the second time? I'm unclear what you're doing with
What thing specifically reported this? |
Ah yes, local::lib. I'll play with this and present some instructions for installing as non-root too. |
Detail added to previous comment, with notes in better english. |
Thanks for that update. I've done more testing within an Ubuntu docker container and have updated the docs in #1292 -- feedback welcome! |
Your solution is better annotated than this issue. I would follow it in future. |
@owenBeresford, sounds good. Really appreciate you raising the issue and finding a workable solution. Feels like we're in a much better place to help Linux users in the future! |
As ever with OSS, thanks for your work.
Describe the bug
I think this is a DOCS bug.
I haven't done any Perl development on this machine, but it is a dev machine. The Perl setup will be factory defaults.
perl -v This is perl 5, version 34, subversion 0 (v5.34.0) built for x86_64-linux-gnu-thread-multi (with 60 registered patches, see perl -V for more detail)
I was following "other install" notes in the github README.md.
Three small issues, but probably config derived
a) the first install script bails
perl src/install_cpan_modules.pl \n Failed trying to install File::HomeDir
<< no technical detailb) File::HomeDir installs without effort via a
cpan
shell.So I manually try
cpan install Tk
which crashed out, as belowThe current configuration of allow_installing_outdated_dists is 'ask/no', but for this option we would need 'CPAN::DistnameInfo' installed. Please install 'CPAN::DistnameInfo' as soon as possible. As long as we are not equipped with 'CPAN::DistnameInfo' this option does not take effect Running make test for ASB/Tk-ToolBar-0.12.tar.gz PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/pod.t ... skipped: Test::Pod 1.14 required for testing POD t/test.t .. Can't locate Tk/Frame.pm in @INC (you may need to install the Tk::Frame module) (@INC contains: ~/.cpan/build/Tk-ToolBar-0.12-0/blib/lib ~/.cpan/build/Tk-ToolBar-0.12-0/blib/arch ~/perl5/lib/perl5/5.34.0/x86_64-linux-gnu-thread-multi ~/perl5/lib/perl5/5.34.0/x86_64-linux-gnu-thread-multi ~/perl5/lib/perl5/5.34.0 ~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi ~/perl5/lib/perl5/5.34.0/x86_64-linux-gnu-thread-multi ~/perl5/lib/perl5/5.34.0 ~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi ~/perl5/lib/perl5 ~/perl5/lib/perl5/5.34.0/x86_64-linux-gnu-thread-multi ~/perl5/lib/perl5/5.34.0 ~/perl5/lib/perl5/x86_64-linux-gnu-thread-multi ~/perl5/lib/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl .) at ~/.cpan/build/Tk-ToolBar-0.12-0/blib/lib/Tk/ToolBar.pm line 5. BEGIN failed--compilation aborted at ~/.cpan/build/Tk-ToolBar-0.12-0/blib/lib/Tk/ToolBar.pm line 5. Compilation failed in require at t/test.t line 10. BEGIN failed--compilation aborted at t/test.t line 10. t/test.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 1/1 subtests
(I edited the text to hide my userdir location)
c) So I
sudo apt install perl-tk
, then the pathing doesn't work with guigutsThe source includes a list of dir, with "/usr/lib/x86_64-linux-gnu/perl/5.34/"
My local install, adding Perl via
apt
put Tk in "/usr/lib/x86_64-linux-gnu/perl5/5.34/"Maybe this final point shouldn't be copied, but I made @inc include that directory version.
To Reproduce
Please repeat steps above.
As soon as I have all the libraries installed, and patched the @inc the editor works fine.
Expected behaviour
Either cpan to work via your script, or cpan to work via the cpan subshell.
**I am raising this on this project, as I do not know target version numbers in cpan, **
In other languages, I would try again with
blah@latest
version lockEnvironment
Screenshots
I included relevant console output in fault desc above, as text
Additional context
UID = EUID = 1000, but this shouldn't make any difference.
cat test.pl use warnings; use Tk; print( "Tk version ", Tk->VERSION, "\n");
outputs
Tk version 804.035
Is this version acceptable to the editor?
The text was updated successfully, but these errors were encountered: