potree / PotreeConverter

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

compilation error #171

Closed sscheidt77 closed 8 years ago

sscheidt77 commented 8 years ago

I get a compilation error at the end. I'm almost there. Compilers correct? Boost version OK? What is happening at the end? Something about undefined reference to the boost file system? Here's the output from my work:

[sps@localhost build]$ cmake -DCMAKE_BUILD_TYPE=Release -DLASZIP_INCLUDE_DIRS=/home/sps/LAStools/LASzip/dll -DLASZIP_LIBRARY=/home/sps/LAStools/LASzip/build/src/liblaszip.so .. -- The C compiler identification is GNU 4.7.2 -- The CXX compiler identification is GNU 4.9.0 -- Check for working C compiler: /usr/lib64/ccache/cc -- Check for working C compiler: /usr/lib64/ccache/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/lib64/ccache/c++ -- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Boost version: 1.50.0 -- Found the following Boost libraries: -- system -- thread -- filesystem -- program_options -- regex -- Boost_INCLUDE_DIRS: /usr/include -- Boost_LIBRARY_DIRS: /usr/lib64 -- Configuring done -- Generating done -- Build files have been written to: /home/sps/PotreeConverter-1.3/build [sps@localhost build]$ make Scanning dependencies of target PotreeConverter [ 9%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/main.cpp.o [ 18%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/PotreeWriter.cpp.o [ 27%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/PotreeConverter.cpp.o [ 36%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/LASPointReader.cpp.o [ 45%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/GridCell.cpp.o [ 54%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/PTXPointReader.cpp.o [ 63%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/BINPointReader.cpp.o [ 72%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/SparseGrid.cpp.o [ 81%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/stuff.cpp.o [ 90%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/LASPointWriter.cpp.o [100%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/PointAttributes.cpp.o Linking CXX executable PotreeConverter CMakeFiles/PotreeConverter.dir/src/stuff.cpp.o: In function Potree::copyDir(boost::filesystem::path, boost::filesystem::path)': stuff.cpp:(.text+0x454): undefined reference toboost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::copy_option, boost::system::errorcode)' collect2: error: ld returned 1 exit status make[2]: _\ [PotreeConverter/PotreeConverter] Error 1 make[1]: * [PotreeConverter/CMakeFiles/PotreeConverter.dir/all] Error 2 make: * [all] Error 2

sscheidt77 commented 8 years ago

I was able to get PotreeConverter-1.0RC to build an executable. However, I still have not gotten any other branch / later version to compile. I would love to get a tip! Thanks!

m-schuetz commented 8 years ago

Your boost installation seems to miss the correct boost::filesystem::detail::copy_file definition. Which version of boost are you using? Try to upgrade to 1.58.

sscheidt77 commented 8 years ago

I have version 1.50., and I'm using Fedora 18. I think updating to a newer version of Fedora would make sense, but I had some trouble upgrading and I've been twitchy about attempting it again. I've been looking at the boost documentation for some time now, and I don't know if I feel comfortable trying to install the newest version of boost without breaking something else. I would be cool if I could built boost locally in my home directory, and then just point the compilation of PotreeConverter the right boost files. Do you (or anyone else) have a suggestion on how to do this? It might be a lot to ask, but it would be great to do this just until I have the space, time and resources to rebuild my Fedora installation.

sscheidt77 commented 8 years ago

So, I managed to compile PotreeConverter. My solution was pretty bad, and so in the interest of making sure no one follows me in my footsteps, I'll be vague. I built gcc 4.9 and boost 1.59 in my home directory. I then altered paths in CMakeLists.txt to various boost directories and libraries, and I altered paths in CMakeCache.txt to 4.9 c++ and cc compilers. This allowed the PotreeConverter binary to be compiled. Because I am still running Fedora 18, my libstdc++.so.6 in /lib64 was pointing to libstdc++.so.6.0.17. (PotreeConverter needed versions > 18. So I copied libstdc++.so.6.0.20, and linked it from libstdc++.so.6. PotreeConverter now runs. However, I haven't tried doing a conversion yet, so we'll see. I am well aware that I need to upgrade my kernel. Maybe after I meet some deliverables.