Potree Converter Install


Reliable Hardware – Trained Staff
You are here:  Service / Technical Blog
By    -   CEO, Technical Director

Recently a client came to me with a custom dedicated server requirement to run a piece of software called Potree (www.potree.org) for rending 3D point clouds on the web for users to access and view data.

This is a great piece of software however in trying to compile on CentOS Linux I came across the below error. The most important line being “unrecognized command line option ‘-std=c++14’”. In the interest of keeping this short and more on point on how to correct the error it simply means that the version of GCC that ships on CentOS is not a new enough version compare to what the software was built in and doesn’t support C++




Using a blank install of CentOS below are the exact steps that I took to rectify this and compile LASZip and Potree Converter.

  1. yum install libmpc-devel mpfr-devel gmp-devel gcc gcc-c++ git cmake boost-devel
  2. cd /usr/local/src
  3. wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.gz
  4. tar -xvzf gcc-4.9.2.tar.gz
  5. rm -rf gcc-4.9.2.tar.gz
  6. cd gcc-4.9.2
  7. mkdir build
  8. ./configure –enable-languages=c,c++ –disable-multilib –prefix=/usr/local/src/gcc-4.9.2/build
  9. make
  10. make install
  11. cd /usr/local/src
  12. mkdir lastools
  13. cd lastools
  14. git clone https://github.com/m-schuetz/LAStools.git master
  15. cd master/LASzip/
  16. mkdir build
  17. cd build
  18. cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/usr/local/src/gcc-4.9.2/build/bin/g++ -DCMAKE_CC_COMPILER=/usr/local/src/gcc-4.9.2/build/bin/gcc ..


At this point you should receive the output below instead of the previous error and you can then run on to running make.



  1. make




LASZip has now been built and we will move on to running similar steps to compile PotreeConverter.

  1. cd /usr/local/src
  2. mkdir PortreeConverter
  3. cd PortreeConverter
  4. git clone https://github.com/potree/PotreeConverter.git master
  5. cd master
  6. mkdir build
  7. cd build
  8. cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/usr/local/src/gcc-4.9.2/build/bin/g++ -DCMAKE_CC_COMPILER=/usr/local/src/gcc-4.9.2/build/bin/gcc -DLASZIP_INCLUDE_DIRS=/usr/local/src/lastools/master/LASzip/dll -DLASZIP_LIBRARY=/usr/local/src/lastools/master/LASzip/build/src/liblaszip.so ..
  9. make




PotreeConverter has now been built and we can move it into one of the system binary locations so that we can use it from any directory we are working in later on.

  1. cp PotreeConverter/PotreeConverter /usr/bin/


If you try and run PotreeConverter now you will likely see the below error message which requires a quick fix.

PotreeConverter: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20′ not found (required by PotreeConverter)


  1. rm -rf /lib64/libstdc++.so.6
  2. cp /usr/local/src/gcc-4.9.2/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.20 /lib64/
  3. ln -s /lib64/libstdc++.so.6.0.20 /lib64/libstdc++.so.6


If you now try and run PotreeConverter again you should receive the help information from the binary back similar to the below.



This should be all the steps you need however if you have any problems or any errors different to mine please comment below and I will do my best to help.

Comments

  • Artur Freitas says:

    God bless you my boy! You saved my life! Many many many thanks! Greetings from Brazil!


  • Got Something To Say:

    Your email address will not be published. Required fields are marked *

    *


    Authors

    Categories

    Recent Posts

    Review Us

    Are you a VooServers customer? We would love to hear what you say!

    Review us
    Back to top
    
    © VooServers Ltd 2016 - All Rights Reserved
    Company No. 05598165