LASzip / LASzip

http://laszip.org
Apache License 2.0
185 stars 87 forks source link

3x can't be build with certain FLAGS #40

Closed tigerfoot closed 6 years ago

tigerfoot commented 6 years ago

Hi, during the refresh of openSUSE package, I'm facing build error (in linking). If I build it locally without any flags, the build finished correctly, but I'm not allowed to remove all the flags used by default on the distribution (or at least I need a solid explanation, not hurting also security guys ;-)

Here the process, flags used and the failing

cmake         -DCMAKE_INSTALL_PREFIX:PATH=/usr         -DINCLUDE_INSTALL_DIR:PATH=/usr/include         -DLIB_INSTALL_DIR:PATH=/usr/lib64         -DSYSCONF_INSTALL_DIR:PATH=/etc         -DSHARE_INSTALL_PREFIX:PATH=/usr/share         -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64         -DCMAKE_BUILD_TYPE=RelWithDebInfo         -DCMAKE_C_FLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG"         -DCMAKE_CXX_FLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG"         -DCMAKE_Fortran_FLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG"         -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now"         -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed"         -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" -DLIB_SUFFIX=64         -DCMAKE_SKIP_RPATH:BOOL=ON         -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON         -DBUILD_SHARED_LIBS:BOOL=ON         -DBUILD_STATIC_LIBS:BOOL=OFF         -DCMAKE_COLOR_MAKEFILE:BOOL=OFF         -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF         -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules ../
-- The CXX compiler identification is GNU 7.2.1
-- The C compiler identification is GNU 7.2.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for C++ include unordered_map
-- Looking for C++ include unordered_map - found
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_STATIC_LIBS
    CMAKE_Fortran_FLAGS
    CMAKE_INSTALL_DO_STRIP
    CMAKE_MODULES_INSTALL_DIR
    INCLUDE_INSTALL_DIR
    LIB_INSTALL_DIR
    LIB_SUFFIX
    SHARE_INSTALL_PREFIX
    SYSCONF_INSTALL_DIR

-- Build files have been written to: /tmp/b/build
bruno@qt-kt:/tmp/b/build$ make V=1 -j1
/usr/bin/cmake -H/tmp/b -B/tmp/b/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /tmp/b/build/CMakeFiles /tmp/b/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/tmp/b/build'
make -f src/CMakeFiles/laszip.dir/build.make src/CMakeFiles/laszip.dir/depend
make[2]: Entering directory '/tmp/b/build'
cd /tmp/b/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/b /tmp/b/src /tmp/b/build /tmp/b/build/src /tmp/b/build/src/CMakeFiles/laszip.dir/DependInfo.cmake --color=
Scanning dependencies of target laszip
make[2]: Leaving directory '/tmp/b/build'
make -f src/CMakeFiles/laszip.dir/build.make src/CMakeFiles/laszip.dir/build
make[2]: Entering directory '/tmp/b/build'
[  5%] Building CXX object src/CMakeFiles/laszip.dir/arithmeticdecoder.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/arithmeticdecoder.cpp.o -c /tmp/b/src/arithmeticdecoder.cpp
In file included from /tmp/b/src/arithmeticdecoder.hpp:40:0,
                 from /tmp/b/src/arithmeticdecoder.cpp:70:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
[ 10%] Building CXX object src/CMakeFiles/laszip.dir/arithmeticencoder.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/arithmeticencoder.cpp.o -c /tmp/b/src/arithmeticencoder.cpp
In file included from /tmp/b/src/arithmeticencoder.hpp:39:0,
                 from /tmp/b/src/arithmeticencoder.cpp:70:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
[ 15%] Building CXX object src/CMakeFiles/laszip.dir/arithmeticmodel.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/arithmeticmodel.cpp.o -c /tmp/b/src/arithmeticmodel.cpp
In file included from /tmp/b/src/arithmeticmodel.hpp:40:0,
                 from /tmp/b/src/arithmeticmodel.cpp:70:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
[ 20%] Building CXX object src/CMakeFiles/laszip.dir/integercompressor.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/integercompressor.cpp.o -c /tmp/b/src/integercompressor.cpp
In file included from /tmp/b/src/arithmeticencoder.hpp:39:0,
                 from /tmp/b/src/integercompressor.hpp:51,
                 from /tmp/b/src/integercompressor.cpp:31:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
[ 25%] Building CXX object src/CMakeFiles/laszip.dir/lasindex.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/lasindex.cpp.o -c /tmp/b/src/lasindex.cpp
In file included from /tmp/b/src/lasindex.hpp:43:0,
                 from /tmp/b/src/lasindex.cpp:31:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/lasindex.cpp: In member function ‘BOOL LASindex::write(ByteStreamOut*) const’:
/tmp/b/src/lasindex.cpp:593:30: warning: cast from type ‘const char*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->putBytes((U8*)"LASX", 4))
                              ^~~~~~
[ 30%] Building CXX object src/CMakeFiles/laszip.dir/lasinterval.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/lasinterval.cpp.o -c /tmp/b/src/lasinterval.cpp
In file included from /tmp/b/src/lasinterval.hpp:35:0,
                 from /tmp/b/src/lasinterval.cpp:31:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/lasinterval.cpp: In member function ‘BOOL LASinterval::write(ByteStreamOut*) const’:
/tmp/b/src/lasinterval.cpp:662:30: warning: cast from type ‘const char*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->putBytes((U8*)"LASV", 4))
                              ^~~~~~
[ 35%] Building CXX object src/CMakeFiles/laszip.dir/lasquadtree.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/lasquadtree.cpp.o -c /tmp/b/src/lasquadtree.cpp
In file included from /tmp/b/src/lasquadtree.hpp:38:0,
                 from /tmp/b/src/lasquadtree.cpp:31:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/lasquadtree.cpp: In member function ‘BOOL LASquadtree::coarsen(I32, I32*, U32*, I32**) const’:
/tmp/b/src/lasquadtree.cpp:419:29: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘I32* {aka int*}’ casts away qualifiers [-Wcast-qual]
     (*cell_indices) = (I32*)coarser_indices;
                             ^~~~~~~~~~~~~~~
/tmp/b/src/lasquadtree.cpp: In member function ‘BOOL LASquadtree::write(ByteStreamOut*) const’:
/tmp/b/src/lasquadtree.cpp:683:30: warning: cast from type ‘const char*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->putBytes((U8*)"LASS", 4))
                              ^~~~~~
/tmp/b/src/lasquadtree.cpp:696:30: warning: cast from type ‘const char*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->putBytes((U8*)"LASQ", 4))
                              ^~~~~~
/tmp/b/src/lasquadtree.cpp:709:34: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->put32bitsLE((U8*)&levels))
                                  ^~~~~~
/tmp/b/src/lasquadtree.cpp:726:34: warning: cast from type ‘const F32* {aka const float*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->put32bitsLE((U8*)&min_x))
                                  ^~~~~
/tmp/b/src/lasquadtree.cpp:731:34: warning: cast from type ‘const F32* {aka const float*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->put32bitsLE((U8*)&max_x))
                                  ^~~~~
/tmp/b/src/lasquadtree.cpp:736:34: warning: cast from type ‘const F32* {aka const float*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->put32bitsLE((U8*)&min_y))
                                  ^~~~~
/tmp/b/src/lasquadtree.cpp:741:34: warning: cast from type ‘const F32* {aka const float*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   if (!stream->put32bitsLE((U8*)&max_y))
                                  ^~~~~
[ 40%] Building CXX object src/CMakeFiles/laszip.dir/lasreaditemcompressed_v1.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/lasreaditemcompressed_v1.cpp.o -c /tmp/b/src/lasreaditemcompressed_v1.cpp
In file included from /tmp/b/src/lasreaditem.hpp:37:0,
                 from /tmp/b/src/lasreaditemcompressed_v1.hpp:37,
                 from /tmp/b/src/lasreaditemcompressed_v1.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/lasreaditemcompressed_v1.cpp: In member function ‘virtual BOOL LASreadItemCompressed_GPSTIME11_v1::init(const U8*, U32&)’:
/tmp/b/src/lasreaditemcompressed_v1.cpp:291:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U64* {aka long long unsigned int*}’ casts away qualifiers [-Wcast-qual]
   last_gpstime.u64 = *((U64*)item);
                              ^~~~
[ 45%] Building CXX object src/CMakeFiles/laszip.dir/lasreaditemcompressed_v2.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/lasreaditemcompressed_v2.cpp.o -c /tmp/b/src/lasreaditemcompressed_v2.cpp
In file included from /tmp/b/src/lasreaditem.hpp:37:0,
                 from /tmp/b/src/lasreaditemcompressed_v2.hpp:36,
                 from /tmp/b/src/lasreaditemcompressed_v2.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/lasreaditemcompressed_v2.cpp: In member function ‘virtual BOOL LASreadItemCompressed_GPSTIME11_v2::init(const U8*, U32&)’:
/tmp/b/src/lasreaditemcompressed_v2.cpp:290:33: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U64* {aka long long unsigned int*}’ casts away qualifiers [-Wcast-qual]
   last_gpstime[0].u64 = *((U64*)item);
                                 ^~~~
[ 50%] Building CXX object src/CMakeFiles/laszip.dir/lasreaditemcompressed_v3.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/lasreaditemcompressed_v3.cpp.o -c /tmp/b/src/lasreaditemcompressed_v3.cpp
In file included from /tmp/b/src/lasreaditem.hpp:37:0,
                 from /tmp/b/src/lasreaditemcompressed_v3.hpp:36,
                 from /tmp/b/src/lasreaditemcompressed_v3.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
In file included from /tmp/b/src/lasreaditemcompressed_v3.hpp:39:0,
                 from /tmp/b/src/lasreaditemcompressed_v3.cpp:32:
/tmp/b/src/bytestreamin_array.hpp: In member function ‘virtual void ByteStreamInArray::getBytes(U8*, U32)’:
/tmp/b/src/bytestreamin_array.hpp:154:41: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘void*’ casts away qualifiers [-Wcast-qual]
   memcpy((void*)bytes, (void*)(data+curr), num_bytes);
                                         ^
/tmp/b/src/lasreaditemcompressed_v3.cpp: In member function ‘BOOL LASreadItemCompressed_POINT14_v3::createAndInitModelsAndDecompressors(U32, const U8*)’:
/tmp/b/src/lasreaditemcompressed_v3.cpp:318:49: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
     contexts[context].last_Z[i] = ((LASpoint14*)item)->Z;
                                                 ^~~~
/tmp/b/src/lasreaditemcompressed_v3.cpp:337:57: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
     contexts[context].last_intensity[i] = ((LASpoint14*)item)->intensity;
                                                         ^~~~
/tmp/b/src/lasreaditemcompressed_v3.cpp:362:57: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   contexts[context].last_gpstime[0].f64 = ((LASpoint14*)item)->gps_time;
                                                         ^~~~
/tmp/b/src/lasreaditemcompressed_v3.cpp: In member function ‘virtual BOOL LASreadItemCompressed_POINT14_v3::init(const U8*, U32&)’:
/tmp/b/src/lasreaditemcompressed_v3.cpp:690:35: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   current_context = ((LASpoint14*)item)->scanner_channel;
                                   ^~~~
[ 55%] Building CXX object src/CMakeFiles/laszip.dir/lasreadpoint.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/lasreadpoint.cpp.o -c /tmp/b/src/lasreadpoint.cpp
In file included from /tmp/b/src/lasreadpoint.hpp:47:0,
                 from /tmp/b/src/lasreadpoint.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
In file included from /tmp/b/src/lasreaditemcompressed_v3.hpp:39:0,
                 from /tmp/b/src/lasreadpoint.cpp:38:
/tmp/b/src/bytestreamin_array.hpp: In member function ‘virtual void ByteStreamInArray::getBytes(U8*, U32)’:
/tmp/b/src/bytestreamin_array.hpp:154:41: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘void*’ casts away qualifiers [-Wcast-qual]
   memcpy((void*)bytes, (void*)(data+curr), num_bytes);
                                         ^
/tmp/b/src/lasreadpoint.cpp: In member function ‘BOOL LASreadPoint::setup(U32, const LASitem*, const LASzip*)’:
/tmp/b/src/lasreadpoint.cpp:132:7: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
       else
       ^~~~
/tmp/b/src/lasreadpoint.cpp:134:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
         break;
         ^~~~~
[ 60%] Building CXX object src/CMakeFiles/laszip.dir/laswriteitemcompressed_v1.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/laswriteitemcompressed_v1.cpp.o -c /tmp/b/src/laswriteitemcompressed_v1.cpp
In file included from /tmp/b/src/laswriteitem.hpp:37:0,
                 from /tmp/b/src/laswriteitemcompressed_v1.hpp:37,
                 from /tmp/b/src/laswriteitemcompressed_v1.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/laswriteitemcompressed_v1.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_POINT10_v1::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v1.cpp:176:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   I32 x_diff = ((LASpoint10*)item)->x - ((LASpoint10*)last_item)->x;
                              ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:177:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   I32 y_diff = ((LASpoint10*)item)->y - ((LASpoint10*)last_item)->y;
                              ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:184:61: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   ic_z->compress(((LASpoint10*)last_item)->z, ((LASpoint10*)item)->z, (k_bits < 19 ? k_bits : 19));
                                                             ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:187:79: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   I32 changed_values = ((((LASpoint10*)last_item)->intensity != ((LASpoint10*)item)->intensity) << 5) |
                                                                               ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:192:85: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
                        ((((LASpoint10*)last_item)->point_source_ID != ((LASpoint10*)item)->point_source_ID));
                                                                                     ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:199:79: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
     ic_intensity->compress(((LASpoint10*)last_item)->intensity, ((LASpoint10*)item)->intensity);
                                                                               ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:244:91: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
     ic_point_source_ID->compress(((LASpoint10*)last_item)->point_source_ID, ((LASpoint10*)item)->point_source_ID);
                                                                                           ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_GPSTIME11_v1::init(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v1.cpp:296:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U64* {aka long long unsigned int*}’ casts away qualifiers [-Wcast-qual]
   last_gpstime.u64 = *((U64*)item);
                              ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_GPSTIME11_v1::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v1.cpp:303:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘I64* {aka long long int*}’ casts away qualifiers [-Wcast-qual]
   this_gpstime.i64 = *((I64*)item);
                              ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_RGB12_v1::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v1.cpp:456:55: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   U32 sym = ((((U16*)last_item)[0]&0x00FF) != (((U16*)item)[0]&0x00FF)) << 0;
                                                       ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:457:52: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((((U16*)last_item)[0]&0xFF00) != (((U16*)item)[0]&0xFF00)) << 1;
                                                    ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:458:52: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((((U16*)last_item)[1]&0x00FF) != (((U16*)item)[1]&0x00FF)) << 2;
                                                    ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:459:52: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((((U16*)last_item)[1]&0xFF00) != (((U16*)item)[1]&0xFF00)) << 3;
                                                    ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:460:52: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((((U16*)last_item)[2]&0x00FF) != (((U16*)item)[2]&0x00FF)) << 4;
                                                    ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:461:52: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((((U16*)last_item)[2]&0xFF00) != (((U16*)item)[2]&0xFF00)) << 5;
                                                    ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:463:72: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   if (sym & (1 << 0)) ic_rgb->compress(((U16*)last_item)[0]&255,((U16*)item)[0]&255, 0);
                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:464:71: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   if (sym & (1 << 1)) ic_rgb->compress(((U16*)last_item)[0]>>8,((U16*)item)[0]>>8, 1);
                                                                       ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:465:72: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   if (sym & (1 << 2)) ic_rgb->compress(((U16*)last_item)[1]&255,((U16*)item)[1]&255, 2);
                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:466:71: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   if (sym & (1 << 3)) ic_rgb->compress(((U16*)last_item)[1]>>8,((U16*)item)[1]>>8, 3);
                                                                       ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:467:72: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   if (sym & (1 << 4)) ic_rgb->compress(((U16*)last_item)[2]&255,((U16*)item)[2]&255, 4);
                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v1.cpp:468:71: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   if (sym & (1 << 5)) ic_rgb->compress(((U16*)last_item)[2]>>8,((U16*)item)[2]>>8, 5);
                                                                       ^~~~
[ 65%] Building CXX object src/CMakeFiles/laszip.dir/laswriteitemcompressed_v2.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/laswriteitemcompressed_v2.cpp.o -c /tmp/b/src/laswriteitemcompressed_v2.cpp
In file included from /tmp/b/src/laswriteitem.hpp:37:0,
                 from /tmp/b/src/laswriteitemcompressed_v2.hpp:36,
                 from /tmp/b/src/laswriteitemcompressed_v2.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/laswriteitemcompressed_v2.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_POINT10_v2::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v2.cpp:141:25: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   U32 r = ((LASpoint10*)item)->return_number;
                         ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:142:25: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   U32 n = ((LASpoint10*)item)->number_of_returns_of_given_pulse;
                         ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:150:62: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
                         ((last_intensity[m] != ((LASpoint10*)item)->intensity) << 4) |
                                                              ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:154:85: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
                         (((LASpoint10*)last_item)->point_source_ID != ((LASpoint10*)item)->point_source_ID));
                                                                                     ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:172:61: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
     ic_intensity->compress(last_intensity[m], ((LASpoint10*)item)->intensity, (m < 3 ? m : 3));
                                                             ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:173:39: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
     last_intensity[m] = ((LASpoint10*)item)->intensity;
                                       ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:190:55: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
     enc->encodeSymbol(m_scan_angle_rank[((LASpoint10*)item)->scan_direction_flag], U8_FOLD(item[16]-last_item[16]));
                                                       ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:207:91: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
     ic_point_source_ID->compress(((LASpoint10*)last_item)->point_source_ID, ((LASpoint10*)item)->point_source_ID);
                                                                                           ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:212:24: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   diff = ((LASpoint10*)item)->x - ((LASpoint10*)last_item)->x;
                        ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:219:24: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   diff = ((LASpoint10*)item)->y - ((LASpoint10*)last_item)->y;
                        ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:225:48: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   ic_z->compress(last_height[l], ((LASpoint10*)item)->z, (n==1) + (k_bits < 18 ? U32_ZERO_BIT_0(k_bits) : 18));
                                                ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:226:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint10*’ casts away qualifiers [-Wcast-qual]
   last_height[l] = ((LASpoint10*)item)->z;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_GPSTIME11_v2::init(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v2.cpp:283:33: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U64* {aka long long unsigned int*}’ casts away qualifiers [-Wcast-qual]
   last_gpstime[0].u64 = *((U64*)item);
                                 ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_GPSTIME11_v2::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v2.cpp:293:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘I64* {aka long long int*}’ casts away qualifiers [-Wcast-qual]
   this_gpstime.i64 = *((I64*)item);
                              ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_RGB12_v2::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v2.cpp:508:47: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   U32 sym = ((last_item[0]&0x00FF) != (((U16*)item)[0]&0x00FF)) << 0;
                                               ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:509:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[0]&0xFF00) != (((U16*)item)[0]&0xFF00)) << 1;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:510:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[1]&0x00FF) != (((U16*)item)[1]&0x00FF)) << 2;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:511:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[1]&0xFF00) != (((U16*)item)[1]&0xFF00)) << 3;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:512:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[2]&0x00FF) != (((U16*)item)[2]&0x00FF)) << 4;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:513:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[2]&0xFF00) != (((U16*)item)[2]&0xFF00)) << 5;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:20: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                    ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:48: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:78: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                              ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:106: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                          ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:136: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:164: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:194: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:514:222: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:518:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_l = ((int)(((U16*)item)[0]&255)) - (last_item[0]&255);
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:523:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_h = ((int)(((U16*)item)[0]>>8)) - (last_item[0]>>8);
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:530:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[1]&255)) - U8_CLAMP(diff_l + (last_item[1]&255));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:535:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       diff_l = (diff_l + (((U16*)item)[1]&255) - (last_item[1]&255)) / 2;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:536:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[2]&255)) - U8_CLAMP(diff_l + (last_item[2]&255));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:541:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[1]>>8)) - U8_CLAMP(diff_h + (last_item[1]>>8));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:546:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       diff_h = (diff_h + (((U16*)item)[1]>>8) - (last_item[1]>>8)) / 2;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v2.cpp:547:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[2]>>8)) - U8_CLAMP(diff_h + (last_item[2]>>8));
                            ^~~~
[ 70%] Building CXX object src/CMakeFiles/laszip.dir/laswriteitemcompressed_v3.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/laswriteitemcompressed_v3.cpp.o -c /tmp/b/src/laswriteitemcompressed_v3.cpp
In file included from /tmp/b/src/laswriteitem.hpp:37:0,
                 from /tmp/b/src/laswriteitemcompressed_v3.hpp:36,
                 from /tmp/b/src/laswriteitemcompressed_v3.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/laswriteitemcompressed_v3.cpp: In member function ‘BOOL LASwriteItemCompressed_POINT14_v3::createAndInitModelsAndCompressors(U32, const U8*)’:
/tmp/b/src/laswriteitemcompressed_v3.cpp:304:49: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
     contexts[context].last_Z[i] = ((LASpoint14*)item)->Z;
                                                 ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:323:57: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
     contexts[context].last_intensity[i] = ((LASpoint14*)item)->intensity;
                                                         ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:348:57: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   contexts[context].last_gpstime[0].f64 = ((LASpoint14*)item)->gps_time;
                                                         ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_POINT14_v3::init(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v3.cpp:453:35: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   current_context = ((LASpoint14*)item)->scanner_channel;
                                   ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_POINT14_v3::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v3.cpp:484:39: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   U32 scanner_channel = ((LASpoint14*)item)->scanner_channel;
                                       ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:498:45: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   BOOL point_source_change = (((LASpoint14*)item)->point_source_ID != ((LASpoint14*)last_item)->point_source_ID);
                                             ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:499:41: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   BOOL gps_time_change = (((LASpoint14*)item)->gps_time != ((LASpoint14*)last_item)->gps_time);
                                         ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:500:43: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   BOOL scan_angle_change = (((LASpoint14*)item)->scan_angle != ((LASpoint14*)last_item)->scan_angle);
                                           ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:507:25: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   U32 n = ((LASpoint14*)item)->number_of_returns;
                         ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:508:25: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   U32 r = ((LASpoint14*)item)->return_number;
                         ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:620:24: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   diff = ((LASpoint14*)item)->X - ((LASpoint14*)last_item)->X;
                        ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:627:24: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   diff = ((LASpoint14*)item)->Y - ((LASpoint14*)last_item)->Y;
                        ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:636:95: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   contexts[current_context].ic_Z->compress(contexts[current_context].last_Z[l], ((LASpoint14*)item)->Z, (n==1) + (k_bits < 18 ? U32_ZERO_BIT_0(k_bits) : 18));
                                                                                               ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:637:55: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   contexts[current_context].last_Z[l] = ((LASpoint14*)item)->Z;
                                                       ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:644:38: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   U32 classification = ((LASpoint14*)item)->classification;
                                      ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:664:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   U32 flags = (((LASpoint14*)item)->edge_of_flight_line << 5) | (((LASpoint14*)item)->scan_direction_flag << 4) | ((LASpoint14*)item)->classification_flags;
                              ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:664:80: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   U32 flags = (((LASpoint14*)item)->edge_of_flight_line << 5) | (((LASpoint14*)item)->scan_direction_flag << 4) | ((LASpoint14*)item)->classification_flags;
                                                                                ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:664:129: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   U32 flags = (((LASpoint14*)item)->edge_of_flight_line << 5) | (((LASpoint14*)item)->scan_direction_flag << 4) | ((LASpoint14*)item)->classification_flags;
                                                                                                                                 ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:682:21: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   if (((LASpoint14*)item)->intensity != ((LASpoint14*)last_item)->intensity)
                     ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:686:136: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   contexts[current_context].ic_intensity->compress(contexts[current_context].last_intensity[(cpr<<1) | gps_time_change], ((LASpoint14*)item)->intensity, cpr);
                                                                                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:687:88: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   contexts[current_context].last_intensity[(cpr<<1) | gps_time_change] = ((LASpoint14*)item)->intensity;
                                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:696:107: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
     contexts[current_context].ic_scan_angle->compress(((LASpoint14*)last_item)->scan_angle, ((LASpoint14*)item)->scan_angle, gps_time_change); // if the GPS time has changed
                                                                                                           ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:703:21: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   if (((LASpoint14*)item)->user_data != ((LASpoint14*)last_item)->user_data)
                     ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:712:123: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
   enc_user_data->encodeSymbol(contexts[current_context].m_user_data[((LASpoint14*)last_item)->user_data/4], ((LASpoint14*)item)->user_data);
                                                                                                                           ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:721:117: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
     contexts[current_context].ic_point_source_ID->compress(((LASpoint14*)last_item)->point_source_ID, ((LASpoint14*)item)->point_source_ID);
                                                                                                                     ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:733:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LASpoint14*’ casts away qualifiers [-Wcast-qual]
     gps_time.f64 = ((LASpoint14*)item)->gps_time;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_RGB14_v3::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v3.cpp:1285:47: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   U32 sym = ((last_item[0]&0x00FF) != (((U16*)item)[0]&0x00FF)) << 0;
                                               ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1286:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[0]&0xFF00) != (((U16*)item)[0]&0xFF00)) << 1;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1287:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[1]&0x00FF) != (((U16*)item)[1]&0x00FF)) << 2;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1288:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[1]&0xFF00) != (((U16*)item)[1]&0xFF00)) << 3;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1289:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[2]&0x00FF) != (((U16*)item)[2]&0x00FF)) << 4;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1290:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[2]&0xFF00) != (((U16*)item)[2]&0xFF00)) << 5;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:20: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                    ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:48: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:78: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                              ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:106: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                          ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:136: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:164: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:194: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1291:222: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1295:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_l = ((int)(((U16*)item)[0]&255)) - (last_item[0]&255);
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1300:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_h = ((int)(((U16*)item)[0]>>8)) - (last_item[0]>>8);
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1307:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[1]&255)) - U8_CLAMP(diff_l + (last_item[1]&255));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1312:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       diff_l = (diff_l + (((U16*)item)[1]&255) - (last_item[1]&255)) / 2;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1313:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[2]&255)) - U8_CLAMP(diff_l + (last_item[2]&255));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1318:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[1]>>8)) - U8_CLAMP(diff_h + (last_item[1]>>8));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1323:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       diff_h = (diff_h + (((U16*)item)[1]>>8) - (last_item[1]>>8)) / 2;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1324:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[2]>>8)) - U8_CLAMP(diff_h + (last_item[2]>>8));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp: In member function ‘virtual BOOL LASwriteItemCompressed_RGBNIR14_v3::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemcompressed_v3.cpp:1582:47: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   U32 sym = ((last_item[0]&0x00FF) != (((U16*)item)[0]&0x00FF)) << 0;
                                               ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1583:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[0]&0xFF00) != (((U16*)item)[0]&0xFF00)) << 1;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1584:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[1]&0x00FF) != (((U16*)item)[1]&0x00FF)) << 2;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1585:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[1]&0xFF00) != (((U16*)item)[1]&0xFF00)) << 3;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1586:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[2]&0x00FF) != (((U16*)item)[2]&0x00FF)) << 4;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1587:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[2]&0xFF00) != (((U16*)item)[2]&0xFF00)) << 5;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:20: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                    ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:48: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:78: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                              ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:106: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                          ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:136: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                        ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:164: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:194: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1588:222: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
 FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
                                                                                                                                                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1592:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_l = ((int)(((U16*)item)[0]&255)) - (last_item[0]&255);
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1597:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_h = ((int)(((U16*)item)[0]>>8)) - (last_item[0]>>8);
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1604:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[1]&255)) - U8_CLAMP(diff_l + (last_item[1]&255));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1609:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       diff_l = (diff_l + (((U16*)item)[1]&255) - (last_item[1]&255)) / 2;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1610:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[2]&255)) - U8_CLAMP(diff_l + (last_item[2]&255));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1615:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[1]>>8)) - U8_CLAMP(diff_h + (last_item[1]>>8));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1620:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       diff_h = (diff_h + (((U16*)item)[1]>>8) - (last_item[1]>>8)) / 2;
                                  ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1621:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
       corr = ((int)(((U16*)item)[2]>>8)) - U8_CLAMP(diff_h + (last_item[2]>>8));
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1630:43: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym = ((last_item[3]&0x00FF) != (((U16*)item)[3]&0x00FF)) << 0;
                                           ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1631:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   sym |= ((last_item[3]&0xFF00) != (((U16*)item)[3]&0xFF00)) << 1;
                                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1635:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_l = ((int)(((U16*)item)[3]&255)) - (last_item[3]&255);
                            ^~~~
/tmp/b/src/laswriteitemcompressed_v3.cpp:1640:28: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     diff_h = ((int)(((U16*)item)[3]>>8)) - (last_item[3]>>8);
                            ^~~~
[ 75%] Building CXX object src/CMakeFiles/laszip.dir/laswritepoint.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/laswritepoint.cpp.o -c /tmp/b/src/laswritepoint.cpp
In file included from /tmp/b/src/laswritepoint.hpp:44:0,
                 from /tmp/b/src/laswritepoint.cpp:32:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
In file included from /tmp/b/src/laswritepoint.cpp:35:0:
/tmp/b/src/laswriteitemraw.hpp: In member function ‘virtual BOOL LASwriteItemRaw_POINT10_BE::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemraw.hpp:61:45: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U32* {aka unsigned int*}’ casts away qualifiers [-Wcast-qual]
     *((U32*)&swapped[14]) = *((U32*)&item[14]); // bitfield, classification, scan_angle_rank, user_data
                                             ^
/tmp/b/src/laswriteitemraw.hpp: In member function ‘virtual BOOL LASwriteItemRaw_POINT14_LE::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemraw.hpp:220:64: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->X = ((LAStempWritePoint10*)item)->X;
                                                                ^~~~
/tmp/b/src/laswriteitemraw.hpp:221:64: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->Y = ((LAStempWritePoint10*)item)->Y;
                                                                ^~~~
/tmp/b/src/laswriteitemraw.hpp:222:64: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->Z = ((LAStempWritePoint10*)item)->Z;
                                                                ^~~~
/tmp/b/src/laswriteitemraw.hpp:223:72: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->intensity = ((LAStempWritePoint10*)item)->intensity;
                                                                        ^~~~
/tmp/b/src/laswriteitemraw.hpp:224:82: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->scan_direction_flag = ((LAStempWritePoint10*)item)->scan_direction_flag;
                                                                                  ^~~~
/tmp/b/src/laswriteitemraw.hpp:225:82: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->edge_of_flight_line = ((LAStempWritePoint10*)item)->edge_of_flight_line;
                                                                                  ^~~~
/tmp/b/src/laswriteitemraw.hpp:226:78: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->classification = (((LAStempWritePoint10*)item)->classification & 31);
                                                                              ^~~~
/tmp/b/src/laswriteitemraw.hpp:227:72: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->user_data = ((LAStempWritePoint10*)item)->user_data;
                                                                        ^~~~
/tmp/b/src/laswriteitemraw.hpp:228:78: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)buffer)->point_source_ID = ((LAStempWritePoint10*)item)->point_source_ID;
                                                                              ^~~~
/tmp/b/src/laswriteitemraw.hpp:230:32: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     if (((LAStempWritePoint10*)item)->extended_point_type)
                                ^~~~
/tmp/b/src/laswriteitemraw.hpp:232:86: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->classification_flags = (((LAStempWritePoint10*)item)->extended_classification_flags & 8) | (((LAStempWritePoint10*)item)->classification >> 5);
                                                                                      ^~~~
In file included from /tmp/b/src/laswritepoint.cpp:35:0:
/tmp/b/src/laswriteitemraw.hpp:232:154: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->classification_flags = (((LAStempWritePoint10*)item)->extended_classification_flags & 8) | (((LAStempWritePoint10*)item)->classification >> 5);
                                                                                                                                                          ^~~~
/tmp/b/src/laswriteitemraw.hpp:233:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       if (((LAStempWritePoint10*)item)->extended_classification > 31) ((LAStempWritePoint14*)buffer)->classification = ((LAStempWritePoint10*)item)->extended_classification;
                                  ^~~~
/tmp/b/src/laswriteitemraw.hpp:233:143: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       if (((LAStempWritePoint10*)item)->extended_classification > 31) ((LAStempWritePoint14*)buffer)->classification = ((LAStempWritePoint10*)item)->extended_classification;
                                                                                                                                               ^~~~
/tmp/b/src/laswriteitemraw.hpp:234:80: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->scanner_channel = ((LAStempWritePoint10*)item)->extended_scanner_channel;
                                                                                ^~~~
/tmp/b/src/laswriteitemraw.hpp:235:78: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->return_number = ((LAStempWritePoint10*)item)->extended_return_number;
                                                                              ^~~~
/tmp/b/src/laswriteitemraw.hpp:236:82: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->number_of_returns = ((LAStempWritePoint10*)item)->extended_number_of_returns;
                                                                                  ^~~~
/tmp/b/src/laswriteitemraw.hpp:237:75: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->scan_angle = ((LAStempWritePoint10*)item)->extended_scan_angle;
                                                                           ^~~~
/tmp/b/src/laswriteitemraw.hpp:241:86: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->classification_flags = (((LAStempWritePoint10*)item)->classification >> 5);
                                                                                      ^~~~
/tmp/b/src/laswriteitemraw.hpp:243:78: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->return_number = ((LAStempWritePoint10*)item)->return_number;
                                                                              ^~~~
/tmp/b/src/laswriteitemraw.hpp:244:82: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->number_of_returns = ((LAStempWritePoint10*)item)->number_of_returns;
                                                                                  ^~~~
In file included from /tmp/b/src/laswritepoint.hpp:44:0,
                 from /tmp/b/src/laswritepoint.cpp:32:
/tmp/b/src/laswriteitemraw.hpp:245:88: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->scan_angle = I16_QUANTIZE(((LAStempWritePoint10*)item)->scan_angle_rank/0.006f);
                                                                                        ^
/tmp/b/src/mydefs.hpp:129:28: note: in definition of macro ‘I16_QUANTIZE’
 #define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5f) : (I16)((n)-0.5f))
                            ^
/tmp/b/src/laswriteitemraw.hpp:245:88: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->scan_angle = I16_QUANTIZE(((LAStempWritePoint10*)item)->scan_angle_rank/0.006f);
                                                                                        ^
/tmp/b/src/mydefs.hpp:129:46: note: in definition of macro ‘I16_QUANTIZE’
 #define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5f) : (I16)((n)-0.5f))
                                              ^
/tmp/b/src/laswriteitemraw.hpp:245:88: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)buffer)->scan_angle = I16_QUANTIZE(((LAStempWritePoint10*)item)->scan_angle_rank/0.006f);
                                                                                        ^
/tmp/b/src/mydefs.hpp:129:64: note: in definition of macro ‘I16_QUANTIZE’
 #define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5f) : (I16)((n)-0.5f))
                                                                ^
In file included from /tmp/b/src/laswritepoint.cpp:35:0:
/tmp/b/src/laswriteitemraw.hpp:248:51: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     *((F64*)&buffer[22]) = ((LAStempWritePoint10*)item)->gps_time;
                                                   ^~~~
/tmp/b/src/laswriteitemraw.hpp: In member function ‘virtual BOOL LASwriteItemRaw_POINT14_BE::write(const U8*, U32&)’:
/tmp/b/src/laswriteitemraw.hpp:265:83: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)swapped)->scan_direction_flag = ((LAStempWritePoint10*)item)->scan_direction_flag;
                                                                                   ^~~~
/tmp/b/src/laswriteitemraw.hpp:266:83: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)swapped)->edge_of_flight_line = ((LAStempWritePoint10*)item)->edge_of_flight_line;
                                                                                   ^~~~
/tmp/b/src/laswriteitemraw.hpp:267:79: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)swapped)->classification = (((LAStempWritePoint10*)item)->classification & 31);
                                                                               ^~~~
/tmp/b/src/laswriteitemraw.hpp:268:73: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ((LAStempWritePoint14*)swapped)->user_data = ((LAStempWritePoint10*)item)->user_data;
                                                                         ^~~~
/tmp/b/src/laswriteitemraw.hpp:271:32: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     if (((LAStempWritePoint10*)item)->extended_point_type)
                                ^~~~
/tmp/b/src/laswriteitemraw.hpp:273:87: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->classification_flags = (((LAStempWritePoint10*)item)->extended_classification_flags & 8) | (((LAStempWritePoint10*)item)->classification >> 5);
                                                                                       ^~~~
/tmp/b/src/laswriteitemraw.hpp:273:155: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->classification_flags = (((LAStempWritePoint10*)item)->extended_classification_flags & 8) | (((LAStempWritePoint10*)item)->classification >> 5);
                                                                                                                                                           ^~~~
/tmp/b/src/laswriteitemraw.hpp:274:34: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       if (((LAStempWritePoint10*)item)->extended_classification > 31) ((LAStempWritePoint14*)swapped)->classification = ((LAStempWritePoint10*)item)->extended_classification;
                                  ^~~~
/tmp/b/src/laswriteitemraw.hpp:274:144: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       if (((LAStempWritePoint10*)item)->extended_classification > 31) ((LAStempWritePoint14*)swapped)->classification = ((LAStempWritePoint10*)item)->extended_classification;
                                                                                                                                                ^~~~
/tmp/b/src/laswriteitemraw.hpp:275:81: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->scanner_channel = ((LAStempWritePoint10*)item)->extended_scanner_channel;
                                                                                 ^~~~
/tmp/b/src/laswriteitemraw.hpp:276:79: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->return_number = ((LAStempWritePoint10*)item)->extended_return_number;
                                                                               ^~~~
/tmp/b/src/laswriteitemraw.hpp:277:83: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->number_of_returns = ((LAStempWritePoint10*)item)->extended_number_of_returns;
                                                                                   ^~~~
/tmp/b/src/laswriteitemraw.hpp:282:87: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->classification_flags = (((LAStempWritePoint10*)item)->classification >> 5);
                                                                                       ^~~~
/tmp/b/src/laswriteitemraw.hpp:284:79: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->return_number = ((LAStempWritePoint10*)item)->return_number;
                                                                               ^~~~
/tmp/b/src/laswriteitemraw.hpp:285:83: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       ((LAStempWritePoint14*)swapped)->number_of_returns = ((LAStempWritePoint10*)item)->number_of_returns;
                                                                                   ^~~~
In file included from /tmp/b/src/laswritepoint.hpp:44:0,
                 from /tmp/b/src/laswritepoint.cpp:32:
/tmp/b/src/laswriteitemraw.hpp:286:60: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       I16 scan_angle = I16_QUANTIZE(((LAStempWritePoint10*)item)->scan_angle_rank/0.006f);
                                                            ^
/tmp/b/src/mydefs.hpp:129:28: note: in definition of macro ‘I16_QUANTIZE’
 #define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5f) : (I16)((n)-0.5f))
                            ^
/tmp/b/src/laswriteitemraw.hpp:286:60: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       I16 scan_angle = I16_QUANTIZE(((LAStempWritePoint10*)item)->scan_angle_rank/0.006f);
                                                            ^
/tmp/b/src/mydefs.hpp:129:46: note: in definition of macro ‘I16_QUANTIZE’
 #define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5f) : (I16)((n)-0.5f))
                                              ^
/tmp/b/src/laswriteitemraw.hpp:286:60: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
       I16 scan_angle = I16_QUANTIZE(((LAStempWritePoint10*)item)->scan_angle_rank/0.006f);
                                                            ^
/tmp/b/src/mydefs.hpp:129:64: note: in definition of macro ‘I16_QUANTIZE’
 #define I16_QUANTIZE(n) (((n) >= 0) ? (I16)((n)+0.5f) : (I16)((n)-0.5f))
                                                                ^
In file included from /tmp/b/src/laswritepoint.cpp:35:0:
/tmp/b/src/laswriteitemraw.hpp:289:50: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘LAStempWritePoint10*’ casts away qualifiers [-Wcast-qual]
     ENDIAN_SWAP_64((U8*)&(((LAStempWritePoint10*)item)->gps_time), &swapped[22]);
                                                  ^~~~
[ 80%] Building CXX object src/CMakeFiles/laszip.dir/laszip.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/laszip.cpp.o -c /tmp/b/src/laszip.cpp
In file included from /tmp/b/src/laszip.cpp:32:0:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
/tmp/b/src/laszip.cpp: In member function ‘bool LASzip::unpack(const U8*, I32)’:
/tmp/b/src/laszip.cpp:95:24: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   compressor = *((U16*)b);
                        ^
/tmp/b/src/laszip.cpp:97:19: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   coder = *((U16*)b);
                   ^
/tmp/b/src/laszip.cpp:99:26: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   version_major = *((U8*)b);
                          ^
/tmp/b/src/laszip.cpp:101:26: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   version_minor = *((U8*)b);
                          ^
/tmp/b/src/laszip.cpp:103:30: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   version_revision = *((U16*)b);
                              ^
/tmp/b/src/laszip.cpp:105:21: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U32* {aka unsigned int*}’ casts away qualifiers [-Wcast-qual]
   options = *((U32*)b);
                     ^
/tmp/b/src/laszip.cpp:107:24: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U32* {aka unsigned int*}’ casts away qualifiers [-Wcast-qual]
   chunk_size = *((U32*)b);
                        ^
/tmp/b/src/laszip.cpp:109:37: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘I64* {aka long long int*}’ casts away qualifiers [-Wcast-qual]
   number_of_special_evlrs = *((I64*)b);
                                     ^
/tmp/b/src/laszip.cpp:111:37: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘I64* {aka long long int*}’ casts away qualifiers [-Wcast-qual]
   offset_to_special_evlrs = *((I64*)b);
                                     ^
/tmp/b/src/laszip.cpp:113:23: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
   num_items = *((U16*)b);
                       ^
/tmp/b/src/laszip.cpp:117:44: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     items[i].type = (LASitem::Type)*((U16*)b);
                                            ^
/tmp/b/src/laszip.cpp:119:29: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     items[i].size = *((U16*)b);
                             ^
/tmp/b/src/laszip.cpp:121:32: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘U16* {aka short unsigned int*}’ casts away qualifiers [-Wcast-qual]
     items[i].version = *((U16*)b);
                                ^
/tmp/b/src/laszip.cpp: In member function ‘bool LASzip::check_items(U16, const LASitem*, U16)’:
/tmp/b/src/laszip.cpp:274:6: warning: ‘ bytes’ directive writing 6 bytes into a region of size between 5 and 18 [-Wformat-overflow=]
 bool LASzip::check_items(const U16 num_items, const LASitem* items, const U16 point_size)
      ^~~~~~
/tmp/b/src/laszip.cpp:288:12: note: ‘sprintf’ output between 53 and 66 bytes into a destination of size 64
     sprintf(temp, "point has size of %d but items only add up to %d bytes", point_size, size);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 85%] Building CXX object src/CMakeFiles/laszip.dir/laszip_dll.cpp.o
cd /tmp/b/build/src && /usr/bin/c++  -DHAVE_UNORDERED_MAP=1 -DLASZIPDLL_EXPORTS -DUNORDERED -Dlaszip_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip.dir/laszip_dll.cpp.o -c /tmp/b/src/laszip_dll.cpp
In file included from /tmp/b/src/lasattributer.hpp:35:0,
                 from /tmp/b/src/laszip_dll.cpp:49:
/tmp/b/src/mydefs.hpp: In function ‘BOOL IS_LITTLE_ENDIAN()’:
/tmp/b/src/mydefs.hpp:174:19: warning: cast from type ‘const U32* {aka const unsigned int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   return (*((U8*)&i) == 1);
                   ^
In file included from /tmp/b/src/laszip_dll.cpp:53:0:
/tmp/b/src/bytestreamin_array.hpp: In member function ‘virtual void ByteStreamInArray::getBytes(U8*, U32)’:
/tmp/b/src/bytestreamin_array.hpp:154:41: warning: cast from type ‘const U8* {aka const unsigned char*}’ to type ‘void*’ casts away qualifiers [-Wcast-qual]
   memcpy((void*)bytes, (void*)(data+curr), num_bytes);
                                         ^
/tmp/b/src/laszip_dll.cpp: In function ‘laszip_I32 laszip_set_geodouble_params(laszip_POINTER, laszip_U32, const laszip_F64*)’:
/tmp/b/src/laszip_dll.cpp:1150:87: warning: cast from type ‘const laszip_F64* {aka const double*}’ to type ‘laszip_U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
     if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34736, number*8, 0, (laszip_U8*)geodouble_params))
                                                                                       ^~~~~~~~~~~~~~~~
/tmp/b/src/laszip_dll.cpp: In function ‘laszip_I32 laszip_set_geoascii_params(laszip_POINTER, laszip_U32, const laszip_CHAR*)’:
/tmp/b/src/laszip_dll.cpp:1205:85: warning: cast from type ‘const laszip_CHAR* {aka const char*}’ to type ‘laszip_U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
     if (laszip_add_vlr(laszip_dll, "LASF_Projection", 34737, number, 0, (laszip_U8*)geoascii_params))
                                                                                     ^~~~~~~~~~~~~~~
/tmp/b/src/laszip_dll.cpp: In function ‘I32 laszip_prepare_header_for_write(laszip_dll_struct*)’:
/tmp/b/src/laszip_dll.cpp:1734:216: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘laszip_U64 {aka long unsigned int}’ [-Wformat=]
 ent number_of_point_records %u and extended_number_of_point_records %llu", laszip_dll->header.number_of_point_records, laszip_dll->header.extended_number_of_point_records);
                                                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/tmp/b/src/laszip_dll.cpp:1752:250: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 6 has type ‘laszip_U64 {aka long unsigned int}’ [-Wformat=]
 u] %u and extended_number_of_points_by_return[%u] %llu", i, laszip_dll->header.number_of_points_by_return[i], i, laszip_dll->header.extended_number_of_points_by_return[i]);
                                                                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/tmp/b/src/laszip_dll.cpp: In function ‘I32 laszip_prepare_point_for_write(laszip_dll_struct*, laszip_BOOL)’:
/tmp/b/src/laszip_dll.cpp:1792:185: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘laszip_U64 {aka long unsigned int}’ [-Wformat=]
 f(laszip_dll->error, "extended_number_of_point_records of %llu is too much for 32-bit counters of compatibility mode", laszip_dll->header.extended_number_of_point_records);
                                                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/tmp/b/src/laszip_dll.cpp: In function ‘I32 write_laszip_vlr_payload(laszip_dll_struct*, const LASzip*, ByteStreamOut*)’:
/tmp/b/src/laszip_dll.cpp:2174:51: warning: cast from type ‘const short unsigned int*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put16bitsLE((U8*)&(laszip->compressor)); } catch(...)
                                                   ^
/tmp/b/src/laszip_dll.cpp:2179:46: warning: cast from type ‘const short unsigned int*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put16bitsLE((U8*)&(laszip->coder)); } catch(...)
                                              ^
/tmp/b/src/laszip_dll.cpp:2184:51: warning: cast from type ‘const unsigned char*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->putBytes((U8*)&(laszip->version_major), 1); } catch(...)
                                                   ^
/tmp/b/src/laszip_dll.cpp:2189:51: warning: cast from type ‘const unsigned char*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->putBytes((U8*)&(laszip->version_minor), 1); } catch(...)
                                                   ^
/tmp/b/src/laszip_dll.cpp:2194:57: warning: cast from type ‘const short unsigned int*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put16bitsLE((U8*)&(laszip->version_revision)); } catch(...)
                                                         ^
/tmp/b/src/laszip_dll.cpp:2199:48: warning: cast from type ‘const unsigned int*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put32bitsLE((U8*)&(laszip->options)); } catch(...)
                                                ^
/tmp/b/src/laszip_dll.cpp:2204:51: warning: cast from type ‘const unsigned int*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put32bitsLE((U8*)&(laszip->chunk_size)); } catch(...)
                                                   ^
/tmp/b/src/laszip_dll.cpp:2209:64: warning: cast from type ‘const SIGNED_INT64* {aka const long long int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put64bitsLE((U8*)&(laszip->number_of_special_evlrs)); } catch(...)
                                                                ^
/tmp/b/src/laszip_dll.cpp:2214:64: warning: cast from type ‘const SIGNED_INT64* {aka const long long int*}’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put64bitsLE((U8*)&(laszip->offset_to_special_evlrs)); } catch(...)
                                                                ^
/tmp/b/src/laszip_dll.cpp:2219:50: warning: cast from type ‘const short unsigned int*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { out->put16bitsLE((U8*)&(laszip->num_items)); } catch(...)
                                                  ^
/tmp/b/src/laszip_dll.cpp: In function ‘I32 laszip_write_header(laszip_dll_struct*, const LASzip*, laszip_BOOL)’:
/tmp/b/src/laszip_dll.cpp:2258:46: warning: cast from type ‘const char*’ to type ‘U8* {aka unsigned char*}’ casts away qualifiers [-Wcast-qual]
   try { laszip_dll->streamout->putBytes((U8*)"LASF", 4); } catch(...)
                                              ^~~~~~
/tmp/b/src/laszip_dll.cpp:2460:168: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘laszip_U64 {aka long unsigned int}’ [-Wformat=]
         sprintf(laszip_dll->warning, "header.start_of_waveform_data_packet_record is %llu. writing 0 instead.", laszip_dll->header.start_of_waveform_data_packet_record);
                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/tmp/b/src/laszip_dll.cpp: In function ‘laszip_I32 laszip_seek_point(laszip_POINTER, laszip_I64)’:
/tmp/b/src/laszip_dll.cpp:4373:148: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘laszip_I64 {aka long int}’ [-Wformat=]
       sprintf(laszip_dll->error, "seeking from index %lld to index %lld for file with %lld points", laszip_dll->p_count, index, laszip_dll->npoints);
                                                                                                                                                    ^
/tmp/b/src/laszip_dll.cpp: In function ‘I32 laszip_prepare_point_for_write(laszip_dll_struct*, laszip_BOOL)’:
/tmp/b/src/laszip_dll.cpp:1769:1: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 8 [-Wformat-overflow=]
 laszip_prepare_point_for_write(
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/b/src/laszip_dll.cpp:1769:1: note: directive argument in the range [-32768, 2147483646]
/tmp/b/src/laszip_dll.cpp:1970:20: note: ‘sprintf’ output between 10 and 19 bytes into a destination of size 16
             sprintf(unknown_name, "unknown %d", i);
             ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 90%] Linking CXX shared library ../usr/lib64/liblaszip.so
cd /tmp/b/build/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/laszip.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -Wextra -Wall -Wno-unused-parameter -Wno-unused-variable -Wpointer-arith -Wcast-qual -Wredundant-decls -Wno-long-long -Wno-unknown-pragmas -isystem /usr/local/include -std=c++11 -O2 -g -DNDEBUG -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -shared -Wl,-soname,liblaszip.so.3 -o ../usr/lib64/liblaszip.so.3.1.1 CMakeFiles/laszip.dir/arithmeticdecoder.cpp.o CMakeFiles/laszip.dir/arithmeticencoder.cpp.o CMakeFiles/laszip.dir/arithmeticmodel.cpp.o CMakeFiles/laszip.dir/integercompressor.cpp.o CMakeFiles/laszip.dir/lasindex.cpp.o CMakeFiles/laszip.dir/lasinterval.cpp.o CMakeFiles/laszip.dir/lasquadtree.cpp.o CMakeFiles/laszip.dir/lasreaditemcompressed_v1.cpp.o CMakeFiles/laszip.dir/lasreaditemcompressed_v2.cpp.o CMakeFiles/laszip.dir/lasreaditemcompressed_v3.cpp.o CMakeFiles/laszip.dir/lasreadpoint.cpp.o CMakeFiles/laszip.dir/laswriteitemcompressed_v1.cpp.o CMakeFiles/laszip.dir/laswriteitemcompressed_v2.cpp.o CMakeFiles/laszip.dir/laswriteitemcompressed_v3.cpp.o CMakeFiles/laszip.dir/laswritepoint.cpp.o CMakeFiles/laszip.dir/laszip.cpp.o CMakeFiles/laszip.dir/laszip_dll.cpp.o
cd /tmp/b/build/src && /usr/bin/cmake -E cmake_symlink_library ../usr/lib64/liblaszip.so.3.1.1 ../usr/lib64/liblaszip.so.3 ../usr/lib64/liblaszip.so
make[2]: Leaving directory '/tmp/b/build'
[ 90%] Built target laszip
make -f dll/CMakeFiles/laszip_api.dir/build.make dll/CMakeFiles/laszip_api.dir/depend
make[2]: Entering directory '/tmp/b/build'
cd /tmp/b/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /tmp/b /tmp/b/dll /tmp/b/build /tmp/b/build/dll /tmp/b/build/dll/CMakeFiles/laszip_api.dir/DependInfo.cmake --color=
Scanning dependencies of target laszip_api
make[2]: Leaving directory '/tmp/b/build'
make -f dll/CMakeFiles/laszip_api.dir/build.make dll/CMakeFiles/laszip_api.dir/build
make[2]: Entering directory '/tmp/b/build'
[ 95%] Building C object dll/CMakeFiles/laszip_api.dir/laszip_api.c.o
cd /tmp/b/build/dll && /usr/bin/cc -Dlaszip_api_EXPORTS -I/tmp/b/include -I/tmp/b/build/include  -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/laszip_api.dir/laszip_api.c.o   -c /tmp/b/dll/laszip_api.c
[100%] Linking C shared library ../usr/lib64/liblaszip_api.so
cd /tmp/b/build/dll && /usr/bin/cmake -E cmake_link_script CMakeFiles/laszip_api.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -DNDEBUG -O2 -g -DNDEBUG -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -shared -Wl,-soname,liblaszip_api.so.3 -o ../usr/lib64/liblaszip_api.so.3.1.1 CMakeFiles/laszip_api.dir/laszip_api.c.o
CMakeFiles/laszip_api.dir/laszip_api.c.o: In function `laszip_load_dll':
/tmp/b/dll/laszip_api.c:964: undefined reference to `dlopen'
/tmp/b/dll/laszip_api.c:970: undefined reference to `dlsym'
/tmp/b/dll/laszip_api.c:975: undefined reference to `dlsym'
/tmp/b/dll/laszip_api.c:980: undefined reference to `dlsym'
/tmp/b/dll/laszip_api.c:985: undefined reference to `dlsym'
/tmp/b/dll/laszip_api.c:990: undefined reference to `dlsym'
CMakeFiles/laszip_api.dir/laszip_api.c.o:/tmp/b/dll/laszip_api.c:995: more undefined references to `dlsym' follow
CMakeFiles/laszip_api.dir/laszip_api.c.o: In function `laszip_load_dll':
/tmp/b/dll/laszip_api.c:1172: undefined reference to `dlclose'
CMakeFiles/laszip_api.dir/laszip_api.c.o: In function `laszip_unload_dll':
/tmp/b/dll/laszip_api.c:1192: undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
make[2]: *** [dll/CMakeFiles/laszip_api.dir/build.make:98: usr/lib64/liblaszip_api.so.3.1.1] Error 1
make[2]: Leaving directory '/tmp/b/build'
make[1]: *** [CMakeFiles/Makefile2:176: dll/CMakeFiles/laszip_api.dir/all] Error 2
make[1]: Leaving directory '/tmp/b/build'
make: *** [Makefile:155: all] Error 2

If there's any tests of try you would like to see, don't hesitate to ask. (I've tried the the following patch commit 0bf1c60 6602717 8e1feba without more success)

hobu commented 6 years ago
/tmp/b/dll/laszip_api.c:964: undefined reference to `dlopen'

LASzip needs to find/link CMAKE_DL_LIBS.

tigerfoot commented 6 years ago

Ok didn't realize on first look.

With adjusted parameters the build works now

%cmake \
    -DCMAKE_C_FLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie" \
    -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIE -pie" \
    -DCMAKE_CXX_FLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie" \
    -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIE -pie" \
    -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -Wl,--no-as-needed -ldl"