-
Notifications
You must be signed in to change notification settings - Fork 4
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 20.04 unable to install using cpan or cpanm #46
Comments
This is probably libgdal.so under Alien::gdal not finding its dependent dynamic lib files. Can you please run this command and report its results?
|
See also: shawnlaffan/perl-alien-gdal#22 |
Sure.perl -MAlien::gdal -E'say system ("ldd", Alien::gdal->dist_dir . "/lib/libgdal.so")' I see, Alien::gdal can not locate libproj.so.25 locate libproj.so.25 This worked: So I did this: Then I reinstalled Geo::GDAL::FFI and everything is good! |
That works around the issue, but linking a perl alien into your /lib dir is pretty risky and not future proof. Alien::gdal should be finding this file. Can you run this command?
If Alien::patchelf is not installed then it can be installed using cpanm, and its absence might be the reason for the original issue. |
Sure... locate Alien/patchelf Also installed Alien::gdal on another system I have (Ubuntu 18.04.6 LTS) and it also was not able to find libproj.so.25. It was in the same location and adding the path to LD_LIBRARY_PATH also worked on that system. |
It looks like you have multiple perls on your system, or the vestiges of an older perl (5.26). It's important not to mix perls as you can get weird interaction effects that are hard to diagnose. What do you get for these calls? perl -v
perl -MAlien::gdal -E'say Alien::gdal->dist_dir'
perl -MAlien::proj -E'say Alien::proj->dist_dir'
perl -MAlien::proj -E'say Alien::proj->install_type'
ls `perl -MAlien::proj -E'say Alien::proj->dist_dir'`/lib WRT the patchelf call, Alien::gdal should be using Alien::patchelf to adjust the rpath of the libgdal.so file so it can find the libproj.so file. The fact that it only includes paths for tiff and sqlite suggests it has not been done. What does the build log look like for Alien::gdal? cpanm --look Alien::gdal
perl -v
perl Makefile.PL
make test (Please make sure to embed the logs in the triple-backtick quotes so they are not treated as markdown. It would also help to put the build log inside a collapsible section - see https://codex.so/collapsed-block-for-github-markdown ). |
Sorry, there is only one version of perl. I just pasted the path from my Ubuntu 18.04 system (I mentioned that it also has the same issue). Ubuntu 18.04 has perl version 5.26.1. Ubuntu 20.04 has perl version 5.30.0. I should have posted this before: So false alarm there. I will post the logs you mentioned next. |
...actually, attaching the build log as a file will avoid all the formatting issues. |
@yelnats - have you had a chance to generate the logs? |
@yelnats - It looks like this was an issue with Alien::gdal where the rpath updates were overridden before installation. shawnlaffan/perl-alien-gdal@1d040bc That is now hopefully fixed in version 1.31 which has been released to CPAN. |
'''root@aler:/sg# cpanm Geo::GDAL::FFI
--> Working on Geo::GDAL::FFI
Fetching http://www.cpan.org/authors/id/A/AJ/AJOLMA/Geo-GDAL-FFI-0.09.tar.gz ... OK
==> Found dependencies: Alien::gdal
--> Working on Alien::gdal
Fetching http://www.cpan.org/authors/id/S/SL/SLAFFAN/Alien-gdal-1.30.tar.gz ... OK
Configuring Alien-gdal-1.30 ... OK
Building and testing Alien-gdal-1.30 ... OK
Successfully installed Alien-gdal-1.30
Configuring Geo-GDAL-FFI-0.09 ... OK
Building and testing Geo-GDAL-FFI-0.09 ... FAIL
'''! Installing Geo::GDAL::FFI failed. See /root/.cpanm/work/1653404421.416310/build.log for details. Retry with --force to force install it.
1 distribution installed
root@aler:/sg# vi /root/.cpanm/work/1653404421.416310/build.log'''
'''# Failed test 'use Geo::GDAL::FFI;'''
'''# at t/00.t line 11.
'''# Tried to use 'Geo::GDAL::FFI'.'''
'''# Error: Can't attach to GDAL methods. Does Alien::gdal provide GDAL dynamic libs? at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.'''
'''# BEGIN failed--compilation aborted at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.'''
'''# Compilation failed in require at t/00.t line 11.'''
'''# BEGIN failed--compilation aborted at t/00.t line 11.'''
Bareword "PopFinderLocation" not allowed while "strict subs" in use at t/00.t line 116.
Bareword "GetVersionInfo" not allowed while "strict subs" in use at t/00.t line 129.
Execution of t/00.t aborted due to compilation errors.
'''# Tests were run but no plan was declared and done_testing() was not seen.'''
'''# Looks like your test exited with 255 just after 1.'''
t/00.t .........
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests
Can't attach to GDAL methods. Does Alien::gdal provide GDAL dynamic libs? at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
BEGIN failed--compilation aborted at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
Compilation failed in require at t/geometry.t line 6.
BEGIN failed--compilation aborted at t/geometry.t line 6.
t/geometry.t ...
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Can't attach to GDAL methods. Does Alien::gdal provide GDAL dynamic libs? at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
BEGIN failed--compilation aborted at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
Compilation failed in require at t/pdl.t line 6.
BEGIN failed--compilation aborted at t/pdl.t line 6.
t/pdl.t ........
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Can't attach to GDAL methods. Does Alien::gdal provide GDAL dynamic libs? at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
BEGIN failed--compilation aborted at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
Compilation failed in require at t/sr.t line 6.
BEGIN failed--compilation aborted at t/sr.t line 6.
t/sr.t .........
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Can't attach to GDAL methods. Does Alien::gdal provide GDAL dynamic libs? at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
BEGIN failed--compilation aborted at /root/.cpanm/work/1653404421.416310/Geo-GDAL-FFI-0.09/blib/lib/Geo/GDAL/FFI.pm line 1659.
Compilation failed in require at t/vsistdout.t line 6.
BEGIN failed--compilation aborted at t/vsistdout.t line 6.
t/vsistdout.t ..
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
Test Summary Report
t/00.t (Wstat: 65280 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/geometry.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/pdl.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/sr.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t/vsistdout.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
Files=5, Tests=1, 3 wallclock secs ( 0.05 usr 0.01 sys + 2.19 cusr 0.43 csys = 2.68 CPU)
Result: FAIL
Failed 5/5 test programs. 1/1 subtests failed.
make: *** [Makefile:932: test_dynamic] Error 2
-> FAIL Installing Geo::GDAL::FFI failed. See /root/.cpanm/work/1653404421.416310/build.log for details. Retry with --force to force install it.
1 distribution installed'''
The text was updated successfully, but these errors were encountered: