Giter VIP home page Giter VIP logo

Comments (10)

yelnats avatar yelnats commented on July 18, 2024 1

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:
locate libproj.so.25
/usr/lib/x86_64-linux-gnu/libproj.so.25
/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/share/dist/Alien-proj/lib/libproj.so.25
/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/share/dist/Alien-proj/lib/libproj.so.25.9.0.0

So false alarm there. I will post the logs you mentioned next.

from geo-gdal-ffi.

shawnlaffan avatar shawnlaffan commented on July 18, 2024

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?

perl -MAlien::gdal -E'say system ("ldd", Alien::gdal->dist_dir . "/lib/libgdal.so")'

from geo-gdal-ffi.

shawnlaffan avatar shawnlaffan commented on July 18, 2024

See also: shawnlaffan/perl-alien-gdal#22

from geo-gdal-ffi.

yelnats avatar yelnats commented on July 18, 2024

Sure.perl -MAlien::gdal -E'say system ("ldd", Alien::gdal->dist_dir . "/lib/libgdal.so")'
linux-vdso.so.1 (0x00007ffee2f36000)
libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f5091358000)
libgeos_c.so.1 => /lib/x86_64-linux-gnu/libgeos_c.so.1 (0x00007f509131d000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f50912ef000)
libnetcdf.so.15 => /lib/x86_64-linux-gnu/libnetcdf.so.15 (0x00007f50911ca000)
libhdf5_serial.so.103 => /lib/x86_64-linux-gnu/libhdf5_serial.so.103 (0x00007f5090e4d000)
libproj.so.25 => not found
libsqlite3.so.0 => /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/share/dist/Alien-sqlite/lib/libsqlite3.so.0 (0x00007f5090d2b000)
libtiff.so.5 => /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/share/dist/Alien-libtiff/lib/libtiff.so.5 (0x00007f5090cab000)
libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f5090c26000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f5090c0a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5090be7000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5090be1000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f5090b4f000)
libcurl-gnutls.so.4 => /lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f5090ac0000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f50908de000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f509078f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f509059d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5092a24000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5090582000)
libgeos-3.9.1.so => /lib/x86_64-linux-gnu/libgeos-3.9.1.so (0x00007f509038b000)
libhdf5_serial_hl.so.100 => /lib/x86_64-linux-gnu/libhdf5_serial_hl.so.100 (0x00007f5090364000)
libsz.so.2 => /lib/x86_64-linux-gnu/libsz.so.2 (0x00007f509035f000)
libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f5090336000)
libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f5090315000)
librtmp.so.1 => /lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f50902f3000)
libssh.so.4 => /lib/x86_64-linux-gnu/libssh.so.4 (0x00007f5090285000)
libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f5090272000)
libnettle.so.7 => /lib/x86_64-linux-gnu/libnettle.so.7 (0x00007f5090238000)
libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f5090062000)
libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f5090015000)
libldap_r-2.4.so.2 => /lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f508ffbd000)
liblber-2.4.so.2 => /lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f508ffac000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f508ff9e000)
libaec.so.0 => /lib/x86_64-linux-gnu/libaec.so.0 (0x00007f508ff95000)
libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f508fe13000)
libhogweed.so.5 => /lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007f508fdda000)
libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f508fd56000)
libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f508fc20000)
libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f508fc0a000)
libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f508fb2d000)
libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f508fafa000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f508faf3000)
libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f508fae4000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f508fac8000)
libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f508faab000)
libgssapi.so.3 => /lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f508fa66000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f508fa41000)
libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f508fa35000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f508fa2e000)
libheimntlm.so.0 => /lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f508fa22000)
libkrb5.so.26 => /lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f508f98f000)
libasn1.so.8 => /lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f508f8e6000)
libhcrypto.so.4 => /lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f508f8ae000)
libroken.so.18 => /lib/x86_64-linux-gnu/libroken.so.18 (0x00007f508f895000)
libwind.so.0 => /lib/x86_64-linux-gnu/libwind.so.0 (0x00007f508f86b000)
libheimbase.so.1 => /lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f508f859000)
libhx509.so.5 => /lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f508f80b000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f508f7ce000)
0

I see, Alien::gdal can not locate libproj.so.25

locate libproj.so.25
/usr/local/lib/x86_64-linux-gnu/perl/5.26.1/auto/share/dist/Alien-proj/lib/libproj.so.25

This worked:
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/local/lib/x86_64-linux-gnu/perl/5.26.1/auto/share/dist/Alien-proj/lib;sudo ldconfig

So I did this:
ln -s /usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/share/dist/Alien-proj/lib/libproj.so.25 /lib/x86_64-linux-gnu/libproj.so.25

Then I reinstalled Geo::GDAL::FFI and everything is good!
Thanks.

from geo-gdal-ffi.

shawnlaffan avatar shawnlaffan commented on July 18, 2024

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?

perl -MAlien::gdal -MAlien::patchelf -E'say Alien::patchelf->patchelf("--print-rpath", Alien::gdal->dist_dir . "/lib/libgdal.so")'

If Alien::patchelf is not installed then it can be installed using cpanm, and its absence might be the reason for the original issue.

from geo-gdal-ffi.

yelnats avatar yelnats commented on July 18, 2024

Sure...
perl -MAlien::gdal -MAlien::patchelf -E'say Alien::patchelf->patchelf("--print-rpath", Alien::gdal->dist_dir . "/lib/libgdal.so")'
/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/share/dist/Alien-sqlite/lib:/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/share/dist/Alien-libtiff/lib
0

locate Alien/patchelf
/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/Alien/patchelf.pm
/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/Alien/patchelf
/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/Alien/patchelf/.packlist
/usr/local/lib/x86_64-linux-gnu/perl/5.30.0/auto/Alien/patchelf/patchelf.txt

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.

from geo-gdal-ffi.

shawnlaffan avatar shawnlaffan commented on July 18, 2024

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 ).

from geo-gdal-ffi.

shawnlaffan avatar shawnlaffan commented on July 18, 2024

...actually, attaching the build log as a file will avoid all the formatting issues.

from geo-gdal-ffi.

shawnlaffan avatar shawnlaffan commented on July 18, 2024

@yelnats - have you had a chance to generate the logs?

from geo-gdal-ffi.

shawnlaffan avatar shawnlaffan commented on July 18, 2024

@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.

from geo-gdal-ffi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.