hobuinc / silvimetric

Apache License 2.0
8 stars 4 forks source link

Running SilviMetric in Anaconda environment gives "libglog.so.2: cannot open shared object file" #80

Open danielrode opened 7 months ago

danielrode commented 7 months ago

I have installed Miniconda3-py312_24.1.2-0-Linux-x86_64.sh from https://repo.anaconda.com/miniconda/ (the latest version).

OS: OpenSUSE Tumbleweed (20240402)

After installing, I run the following:

eval "$(/home/daniel/miniconda3/bin/conda shell.bash hook)"

mkdir test && cd test
git clone https://github.com/hobuinc/silvimetric

conda env create -f silvimetric/environment.yml -n silvimetric
conda activate silvimetric
pip install silvimetric

silvimetric --database test.tdb initialize \
  --bounds '{"maxx":639003.73,"maxy":853536.21,"maxz":615.26,"minx":635579.2,"miny":848884.83,"minz":406.46}' \
  --crs EPSG:2992

and on that last command, I get a bunch of errors that are various repetitions of libglog.so.2: cannot open shared object file: No such file or directory:

(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory((PDALPDAL  ErrorError) ) Can't load library Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: : Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directoryFailed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory(PDAL Error) Can't load library /home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so: Failed to load "/home/daniel/miniconda3/envs/silvimetric/lib/libpdal_plugin_filter_trajectory.so": libglog.so.2: cannot open shared object file: No such file or directory

libglog.so.2 is a part of glog version 0.7. There may be some missing dependency definitions in the environment.yml. Running conda install glog installs glog-0.6, which provides "libglog.so.1" (an incompatible old version of the library). I only have the default channels, but maybe there is another Anaconda channel that provides version 0.7? If so, can this be specified in environment.yml? Would that make conda enable the needed repo and pull the newer glog version by default when running conda env create -f silvimetric/environment.yml?

Note that the silvimetric initialize command does create a database, but the images produced from it by the silvimetric extract command appear to be corrupted. This probably means that the Python code is running fine, but PDAL is having an issue in the background.

hobu commented 7 months ago

and on that last command, I get a bunch of errors that are various repetitions of libglog.so.2: cannot open shared object file: No such file or directory:

This is a Conda packaging issue and nothing you caused. I'll try to get this sorted, but you might have to endeavor to build it all yourself if you're motivated to get things going right now.