PotreeConverter: MacOS Sierra: fatal error: 'experimental/filesystem' file not found

Hi all,

I appreciate your time in advance. I am really interested in the Potree; however, I have little experience by using the command line and CMake at MacOS Sierra version 10.12.6. I failed to install the PotreeConverter at the final step “make”. The error message picture is listed below

screen shot 2017-08-03 at 11 29 32 am I follow the steps in the the post to run the CMake in the command line(https://github.com/travis-ci/travis-ci/issues/2175)[CMake command not found in OSX build environment].

I installed the Homebrew then

I also have no idea what the binary working directory means. It would be appreciated if you all could tell me the directory location. The picture below is the folder structure in my Mac.

screen shot 2017-08-03 at 11 42 30 am

Let me know if you have any idea how to address the fatal error and show me the location of binary working directory.

Many thanks, Hank

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 23 (1 by maintainers)

Most upvoted comments

Works with gcc-6 as well:

brew install gcc@6 cd /ABSOLUTE/PATH/TO/PotreeConverter/build cmake -DCMAKE_BUILD_TYPE=Release -DLASZIP_INCLUDE_DIRS=/ABSOLUTE/PATH/TO/LASlib/LASzip/dll/ -DLASZIP_LIBRARY=/ABSOLUTE/PATH/TO/LASlib/LASzip/build/src/liblaszip.dylib -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc\@6/6.4.0_1/bin/gcc-6 -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc\@6/6.4.0_1/bin/g++-6 ..

I can confirm that I was able to work around this issue on High Sierra 10.13.1, using (homebrew) gcc 7.2.0 and g++ 7.20.

The extra steps were (as mentioned in linked stackoverflow posts here) to update the PATH in .profile with:
export PATH=/usr/local/Cellar/gcc/7.2.0/bin:$PATH
export LC_ALL=C; unset LANGUAGE

It was also necessary to symlink the homebrew-syntax ‘gcc-7’ and ‘g+±7’ in /usr/local/Cellar/gcc/7.2.0/bin to ‘gcc’ and ‘g++’

When running the PotreeConverter cmake script, it is necessary to add the DCMAKE_C_COMPILER and DCMAKE_CXX_COMPILER flags. My cmake script ended up looking like this:

cmake -DCMAKE_C_COMPILER=/usr/local/Cellar/gcc/7.2.0/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/Cellar/gcc/7.2.0/bin/g++ -DCMAKE_BUILD_TYPE=Release -DLASZIP_INCLUDE_DIRS=/Users/automator/Documents/dev/workspaces/lastools/master/LASzip/dll -DLASZIP_LIBRARY=/Users/automator/Documents/dev/workspaces/lastools/master/LASzip/build/src/liblaszip.dylib ..

I can confirm a similar (possibly same) issue on GNU/Linux (Manjaro). After building lastools, I receive the following error on the make step when building PotreeConverter as described in the README. Here is the error:

$ make [ 8%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/PotreeConverter.cpp.o In file included from /home/matt/dev/workspaces/PotreeConverter/master/PotreeConverter/src/PotreeConverter.cpp:14:0: /home/matt/dev/workspaces/PotreeConverter/master/PotreeConverter/include/PotreeWriter.h:78:21: error: ‘std::function’ has not been declared void traverse(std::function<void(PWNode*)> callback); ^~~~~~~~ /home/matt/dev/workspaces/PotreeConverter/master/PotreeConverter/include/PotreeWriter.h:78:29: error: expected ‘,’ or ‘...’ before ‘<’ token void traverse(std::function<void(PWNode*)> callback); ^ /home/matt/dev/workspaces/PotreeConverter/master/PotreeConverter/include/PotreeWriter.h:80:33: error: ‘std::function’ has not been declared void traverseBreadthFirst(std::function<void(PWNode*)> callback); ^~~~~~~~ /home/matt/dev/workspaces/PotreeConverter/master/PotreeConverter/include/PotreeWriter.h:80:41: error: expected ‘,’ or ‘...’ before ‘<’ token void traverseBreadthFirst(std::function<void(PWNode*)> callback); ^ /home/matt/dev/workspaces/PotreeConverter/master/PotreeConverter/src/PotreeConverter.cpp: In function ‘void Potree::writeSources(std::__cxx11::string, std::vector<std::__cxx11::basic_string<char> >, std::vector<int>, std::vector<Potree::AABB>, std::__cxx11::string)’: /home/matt/dev/workspaces/PotreeConverter/master/PotreeConverter/src/PotreeConverter.cpp:260:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 0; i < sourceFilenames.size(); i++){ ~~^~~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [PotreeConverter/CMakeFiles/PotreeConverter.dir/build.make:207: PotreeConverter/CMakeFiles/PotreeConverter.dir/src/PotreeConverter.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:86: PotreeConverter/CMakeFiles/PotreeConverter.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

Just researching this issue: experimental/filesystem is part of gcc since gcc 5.3: https://isocpp.org/files/papers/P0218r1.html and the version of gcc usually available on mac is 4.2.1. For a mac build we would need to replace all experimental/filesystem code with a different, cross platform, implementation. Any help or PR in that direction is welcome (though I am researching this atm. I will post any progress)

Could it be that /dev/workspaces/lastools/master/LASzip/dll and ~/dev/workspaces/lastools/master/LASzip/build/src/liblaszip.so are no longer compatible with PotreeConverter? Since the master branch of lastools may have changed?