Sample Header Ad - 728x90

CMake error: In the make step, compiler is unable to see header file that does exist. Exporting pasth to CPATH doesn't help

0 votes
1 answer
261 views
On Pop!_OS 22.04 LTS x86_64, I am trying to install libLAS-1.8.1 from source (downloaded as a targz2)(as a dependency of ESRI - 3DForests. I am following the official? tutorial but am stuck. **"Issue" 1:** Per the guide, I need to - $ cd liblas $ mkdir makefiles $ cd makefiles $ cmake -G "Unix Makefiles" However, this gives - > CMake Error: The source directory "/home/sd/myApps/libLAS-1.8.1/makefiles" does not appear to contain CMakeLists.txt. So I instead add the following, and it works (for now) - $ cmake -G "Unix Makefiles" -S "./.." **Issue 2:** (The actual issue) When I do make, the following error occurs: > /home/sd/myApps/libLAS-1.8.1/src/../include/liblas/detail/binary.hpp:28:10: fatal error: boost/detail/endian.hpp: No such file or directory I verify (using ls) that the file "/usr/include/boost/endian/endian.hpp" does indeed exist. Next I search around and it seems I need to add it to CMake path, for which I do - > export CPATH=/usr/include/boost This however does not help. And I keep getting the error. Any help as to why this is happening and how I can fix this is much appreciated. Also, I believe there are binaries for liblas on "DebianGIS's" repositories. Is there any way to get and install that on other debian based OSs'? **EDIT1:** Per a comment, tried deleting the directory and doing it again (after export CPATH). Didn't work. The following is the full error line, reading which again, makes me think that it was looking for the endian.hpp within the sourcefiles. > /home/sd/myApps/libLAS-1.8.1/src/../include/liblas/detail/binary.hpp:28:10: > fatal error: boost/detail/endian.hpp: No such file or directory Doing find, I see the file exists. sd@pop-os:~/myApps/libLAS-1.8.1$ find ~/myApps/libLAS-1.8.1 -type f -iname *endian.hpp /home/sd/myApps/libLAS-1.8.1/include/liblas/detail/endian.hpp sd@pop-os:~/myApps/libLAS-1.8.1$ **EDIT2:** Per suggestion of user @steeldriver , downloaded the source using git clone (was using the targz2 before). This fixed it.
Asked by ChiggyClaus (13 rep)
May 11, 2024, 10:57 AM
Last activity: May 11, 2024, 04:50 PM