Skip to content
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

import pdal: Library not loaded. #160

Open
GinaStavropoulou opened this issue Jan 25, 2024 · 5 comments
Open

import pdal: Library not loaded. #160

GinaStavropoulou opened this issue Jan 25, 2024 · 5 comments

Comments

@GinaStavropoulou
Copy link

Hello!
I have installed PDAL from source using these instructions
Here is the output:
image

I have verified that the relevant libraries are in /usr/loca/lib:
image

I then install pdal with pip:
image

But when I try to import the library I get a "Library not loaded error".
image

It seems that the python pdal is not linked to the pdal installation. Is there a way to fix this?

@hobu
Copy link
Member

hobu commented Jan 26, 2024

Hmm... It looks like your libpdalpython.cpython-312-darwin.so has an RPATH that resolves to /Users/gina/.pyenv/versions/3.12.0/lib but your PDAL library is installed in /usr/local/lib

You can hammer this by setting DYLD_LIBRARY_PATH of course.

Is there any way to get more logging from when the PDAL Python extension was built? It's just using scikit-build to slurp up the PDAL library locations, but something must be getting confused.

@GinaStavropoulou
Copy link
Author

I don't have the logging but I can try reinstalling it.

@GinaStavropoulou
Copy link
Author

Cmake ourput:

-- The CXX compiler identification is AppleClang 15.0.0.15000100
-- The C compiler identification is AppleClang 15.0.0.15000100
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found LIBEXECINFO: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include
-- Found LIBUNWIND: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/include
-- Found Proj: /opt/homebrew/lib/libproj.dylib version 9 (9.3.1)
-- Found GDAL: /opt/homebrew/Cellar/gdal/3.8.3_1/lib/libgdal.dylib (found suitable version "3.8.3", minimum required is "3.4")
-- Found GeoTIFF: /opt/homebrew/lib/libgeotiff.dylib
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/libxml2.tbd (found version "2.9.13")
-- Found CURL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/libcurl.tbd (found version "8.4.0")
-- Found OpenSSL: /opt/homebrew/Cellar/openssl@3/3.2.0_1/lib/libcrypto.dylib (found suitable version "3.2.0", minimum required is "1.1")
-- Found PostgreSQL: /opt/homebrew/lib/postgresql@14/libpq.dylib (found version "14.10")
-- Found Python: /opt/homebrew/Frameworks/Python.framework/Versions/3.12/bin/python3.12 (found version "3.12.1") found components: Interpreter
-- The following features have been enabled:

  • PostgreSQL PointCloud plugin, read/write PostgreSQL PointCloud objects
  • Unit tests, PDAL unit tests
  • Backtrace, build with backtrace (Libunwind/Libexecinfo) support

-- The following OPTIONAL packages have been found:

  • Libexecinfo
  • Libunwind
  • ZSTD
    General compression support
  • LibXml2
  • PkgConfig
  • OpenSSL (required version >= 1.1)
  • Python

-- The following REQUIRED packages have been found:

  • GDAL (required version >= 3.4)
    Provides general purpose raster, vector, and reference system support
  • GeoTIFF
  • ZLIB
    Compression support in BPF
  • CURL
  • PostgreSQL
  • Threads, The thread library of the system

-- The following features have been disabled:

  • Bash completion, completion for PDAL command line
  • CPD plugin, Coherent Point Drift (CPD) computes rigid or nonrigid transformations between point sets
  • Draco plugin, Read data in the draco format
  • Icebridge plugin, read data in the Icebridge format
  • HDF plugin, read data in the HDF format
  • Matlab plugin, write data to a .mat file
  • NITF plugin, read/write LAS data wrapped in NITF
  • OpenSceneGraph plugin, read/write OpenSceneGraph objects
  • RiVLib plugin, read data in the RXP format
  • rdblib plugin, read data in the RDB format
  • MBIO plugin, add features that depend on MBIO
  • FBX plugin, add features that depend on FBX
  • TEASER++ plugin, TEASER++ computes transformations between point sets
  • TileDB plugin, read/write data from TileDB
  • Trajectory plugin, Compute trajectory from LAS input
  • E57 plugin, read/write data to and from e57 format
  • Abseil debugging support , unit tests

-- Configuring done (2.4s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/gina/PDAL/build

@GinaStavropoulou
Copy link
Author

Exporiting DYLD_LIBRARY_PATH did not work for me. I have created a sym link between the 2 locations for now.

@hobu
Copy link
Member

hobu commented Jan 30, 2024

I have created a sym link between the 2 locations for now.

ok.

I was asking for the logging of python-pdal bindings build. I didn't see anything interesting in your PDAL build log, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants