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

compiling treetools in conda environment #3

Open
tiagodc opened this issue Jul 20, 2024 · 1 comment
Open

compiling treetools in conda environment #3

tiagodc opened this issue Jul 20, 2024 · 1 comment

Comments

@tiagodc
Copy link

tiagodc commented Jul 20, 2024

Hi there. I just installed raycloudtools and treetools under a custom conda environment.

raycloudtools installed and tested fine after I compiled all necessary dependencies adding -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX to all cmake calls.

However, when trying to compile treetools I had issues linking to the PROJ and GeoTIFF libraries.

To solve the PROJ issue I just added a find_package(PROJ REQUIRED CONFIG) directive to the CMakeLists.txt

In the GeoTIFF case I had alter the raycloudtools-targets.cmake file manually after building raycloudtools, replacing geotiff_library by the full path to the libgeotiff.so file in the INTERFACE_LINK_LIBRARIES variable.

Those steps solved the issue and I'm able to run treetools inside my conda environment, but I couldn't track the source of the GeoTIFF issue to fix it. I checked the raycloudtools-targets.cmake in my local Docker image and the libgeotiff.so path was correctly listed in INTERFACE_LINK_LIBRARIES, so the issue seems to occur when building raycloudtools in a custom environment not using the system's default paths.

Any ideas on the origin of the GeoTIFF linking issue and how to solve it?

Best regards,
Tiago

@thomas-lowe
Copy link
Collaborator

Hi Tiago,
The Geotiff (and proj) libraries are only needed if you want to render a cloud or tree file to a geotiff, they are disabled by default as they have historically been a tricky dependancy to get right. So if you don't need to render to a geotiff image it should all compile and link fine as WITH_TIFF is off by default.

If you do want to render geotiffs then use the build option WITH_TIFF on both raycloudtools and on treetools. For the latter it then includes the line: find_package(PROJ REQUIRED COMPONENTS proj). Are you saying that you required the extra line "find_package(PROJ REQUIRED CONFIG)"?

The docker folder in raycloudtools (https://github.com/csiro-robotics/raycloudtools) contains a DockerFile which shows the linux commands for including the geotiff library if this helps.

Otherwise I am afraid I will not be much help as I'm not very well versed in the dependency part of cmake, such as the .cmake files and how FIND_PACKAGE operates etc. If you do manage to find a fix that also works outside of a conda environment then please do submit it as a pull request and others can benefit from your fix.

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