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

Mac Xcode 7.0 build warnings and error (missing laszip header) on homebrew environment #163

Closed sanak closed 9 years ago

sanak commented 9 years ago

The warnings and error are as follows.

MBP2012:build sanak$ cmake ../
-- The C compiler identification is AppleClang 7.0.0.7000072
-- The CXX compiler identification is AppleClang 7.0.0.7000072
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   program_options
--   regex
-- Boost_INCLUDE_DIRS: /usr/local/include
-- Boost_LIBRARY_DIRS: /usr/local/lib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/sanak/Projects/mms-browser/git-thirdparty/PotreeConverter/build
MBP2012:build sanak$ make
Scanning dependencies of target PotreeConverter
[  8%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/BINPointReader.cpp.o
clang: warning: -Z-reserved-lib-stdc++: 'linker' input unused
clang: warning: -lm: 'linker' input unused
/Users/sanak/Projects/mms-browser/git-thirdparty/PotreeConverter/PotreeConverter/src/BINPointReader.cpp:147:22: warning: 
      using integer absolute value function 'abs' when argument is of floating point type
      [-Wabsolute-value]
                                float z = 1.0f - abs(u) - abs(v);
                                                 ^
/Users/sanak/Projects/mms-browser/git-thirdparty/PotreeConverter/PotreeConverter/src/BINPointReader.cpp:147:22: note: 
      use function 'std::abs' instead
                                float z = 1.0f - abs(u) - abs(v);
                                                 ^~~
                                                 std::abs
/Users/sanak/Projects/mms-browser/git-thirdparty/PotreeConverter/PotreeConverter/src/BINPointReader.cpp:147:31: warning: 
      using integer absolute value function 'abs' when argument is of floating point type
      [-Wabsolute-value]
                                float z = 1.0f - abs(u) - abs(v);
                                                          ^
/Users/sanak/Projects/mms-browser/git-thirdparty/PotreeConverter/PotreeConverter/src/BINPointReader.cpp:147:31: note: 
      use function 'std::abs' instead
                                float z = 1.0f - abs(u) - abs(v);
                                                          ^~~
                                                          std::abs
2 warnings generated.
[ 16%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/GridCell.cpp.o
clang: warning: -Z-reserved-lib-stdc++: 'linker' input unused
clang: warning: -lm: 'linker' input unused
[ 25%] Building CXX object PotreeConverter/CMakeFiles/PotreeConverter.dir/src/LASPointReader.cpp.o
clang: warning: -Z-reserved-lib-stdc++: 'linker' input unused
clang: warning: -lm: 'linker' input unused
/Users/sanak/Projects/mms-browser/git-thirdparty/PotreeConverter/PotreeConverter/src/LASPointReader.cpp:9:10: fatal error: 
      'laszip_dll.h' file not found
#include "laszip_dll.h"
         ^
1 error generated.
make[2]: *** [PotreeConverter/CMakeFiles/PotreeConverter.dir/src/LASPointReader.cpp.o] Error 1
make[1]: *** [PotreeConverter/CMakeFiles/PotreeConverter.dir/all] Error 2
make: *** [all] Error 2

And here is homebrew laszip package information.

$ brew list laszip
/usr/local/Cellar/laszip/2.2.0/bin/laszip-config
/usr/local/Cellar/laszip/2.2.0/bin/laszippertest
/usr/local/Cellar/laszip/2.2.0/include/laszip/ (4 files)
/usr/local/Cellar/laszip/2.2.0/lib/liblaszip.6.0.0.dylib
/usr/local/Cellar/laszip/2.2.0/lib/liblaszip.dylib
$ ls /usr/local/Cellar/laszip/2.2.0/include/laszip/
lasunzipper.hpp     laszipexport.hpp
laszip.hpp      laszipper.hpp
sanak commented 9 years ago

@m-schuetz laszip_dll.h file seems to be only for Windows environment. Is it possible to replace those logic to use only "include/laszip/*.hpp" files ? Also, "cmake/FindLASzip.cmake" file seems not to be pushed to the Git repository.

sanak commented 9 years ago

I missed the following latest installation documentj, and there was no problem about Mac OSX build. https://github.com/potree/PotreeConverter/blob/master/README.md

thanhmvu commented 9 years ago

Hi, I'm kind of new so please excuse me if I'm not supposed to comment my question here. I'm trying to install PotreeConverter, but I could not find any Unix executable file after running the cmake command :

cmake -DCMAKE_BUILD_TYPE=Release -DLASZIP_INCLUDE_DIRS=~/MyDirectory/dev/lastools/master/LASzip/dll -DLASZIP_LIBRARY=~/MyDirectory/dev/lastools/master/LASzip/build/src/liblaszip.dylib ..

I modified the command to MyDirectory. And I put liblaszip.dylib since I could not find the liblaszip.so file. I'm sorry if this is really dumb to do but I have tried both lines and the results seem to be the same. I supposed the output in the terminal meant it was built. But then I could not find any Unix executable file in my master folder to run PotreeConverter. The output of cmake is below

-- Boost version: 1.58.0 -- Found the following Boost libraries: -- system -- thread -- filesystem -- program_options -- regex -- Boost_INCLUDE_DIRS: /usr/local/include -- Boost_LIBRARY_DIRS: /usr/local/lib -- Configuring done -- Generating done -- Build files have been written to: /MyDirectory/dev/PotreeConverter/master/build

Do you know what is the problem? I really need to set PotreeConverter up Thank you very much!

potree commented 9 years ago

Hi,

cmake generates the make build files for you so after calling cmake, you also have to call make Not sure about dylib, probably the mac equivalent of so files.

Hope this helps.

thanhmvu commented 8 years ago

Hi,

cmake generates the make build files for you so after calling cmake, you also have to call make Not sure about dylib, probably the mac equivalent of so files.

Hope this helps.

Thanks a lot for the respond, potree! It helped. I got it

rchav commented 8 years ago

hey @githmith , how did you figure out your issue? I'm running into the same problem, and I've tried replacing the .so file ext with .dylib, then running make after with no luck. Thanks!!

thanhmvu commented 8 years ago

Hi @rchav, my problem before were that I had the directories wrong and I did not call make after running cmake. So I found my relative directories for the dll folder and the liblaszip.dylib, corrected the paths and ran make. If these do not work, could you specify the error message that cmake prints out so that me or other people can help you?