potree / PotreeConverter

Create multi res point cloud to use with potree
http://potree.org
BSD 2-Clause "Simplified" License
680 stars 424 forks source link

cannot build version 1.7 on ubuntu 20.04 #557

Open julienlau opened 2 years ago

julienlau commented 2 years ago

I think there may be an issue with compiler flags:

[ 91%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/main.cpp.o
In file included from /home/opt/PotreeConverter-1.7/PotreeConverter/include/BINPointReader.hpp:11,
                 from /home/opt/PotreeConverter-1.7/PotreeConverter/src/BINPointReader.cpp:8:
/home/opt/PotreeConverter-1.7/PotreeConverter/include/PointReader.h:11:21: error: ‘filesystem’ is not a namespace-name
   11 | namespace fs = std::filesystem;
      |                     ^~~~~~~~~~

I tried with gcc-9 and gcc-10

From what I understand the flag -lstdc++fs may be missing ?

It seems that this part is commented in CMakeLists.txt :

#if(UNIX)
#    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++17 -pthread -lstdc++ -lstdc++fs -lm")
#    SET(CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -lstdc++fs" )
#endif()

but if I uncomment it, there is a mix up of c++14 and c++17 in the flags build/PotreeConverter/CMakeFiles/PotreeConverter.dir/flags.make:CXX_FLAGS = -Wall -std=c++17 -pthread -lstdc++ -lstdc++fs -lm -Wall -std=c++14 -pthread -lstdc++ -lm -O3 -DNDEBUG

getabear commented 2 years ago

https://github.com/potree/PotreeConverter/pull/405/files

julienlau commented 2 years ago

Thanks ! @m-schuetz any chance to include this in a fix release 1.7.1 ?