[pdal] PDAL 2.0.1 build issue
Jim Klassen
klassen.js at gmail.com
Thu Sep 12 13:03:21 PDT 2019
I just tested that ninja vs make doesn't matter. Both try to use /src as the top level for building gtest.
I also tried building in a fresh VM. I got the same errors when building as a normal user. However, if I built as root, the build completed successfully (while leaving /src/libgtest_main.so and /src/libgtest.so behind on the filesystem).
I don't have a docker install handy, but is it possible the Dockerfiles build successfully because they run as root and are allowed to create /src?
=== make error ===
Scanning dependencies of target gtest
make[2]: Leaving directory '/home/jimk/apps/PointClouds/pdal/src/pdal/build'
make -f vendor/gtest/CMakeFiles/gtest.dir/build.make vendor/gtest/CMakeFiles/gtest.dir/build
make[2]: Entering directory '/home/jimk/apps/PointClouds/pdal/src/pdal/build'
[ 42%] Building CXX object vendor/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
cd /home/jimk/apps/PointClouds/pdal/src/pdal/build/vendor/gtest && /usr/bin/c++ -DGTEST_CREATE_SHARED_LIBRARY=1 -DUNIX -Dgtest_EXPORTS -I/home/jimk/apps/PointClouds/pdal/src/pdal/vendor/gtest/include -I/home/jimk/apps/PointClouds/pdal/src/pdal/vendor/gtest -I/usr/include/geotiff -I/home/jimk/apps/PointClouds/pdal/2.0.1/include -I/include -O3 -DNDEBUG -fPIC -Wall -Wshadow -Werror -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -o CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /home/jimk/apps/PointClouds/pdal/src/pdal/vendor/gtest/src/gtest-all.cc
*[ 43%] Linking CXX shared library /src/libgtest.so*
*cd /home/jimk/apps/PointClouds/pdal/src/pdal/build/vendor/gtest && /home/jimk/apps/cmake/bin/cmake -E cmake_link_script CMakeFiles/gtest.dir/link.txt --verbose=1**
**/usr/bin/c++ -fPIC -O3 -DNDEBUG -shared -Wl,-soname,libgtest.so -o /src/libgtest.so CMakeFiles/gtest.dir/src/gtest-all.cc.o -lpthread **
**/usr/bin/ld: cannot open output file /src/libgtest.so: No such file or directory**
*collect2: error: ld returned 1 exit status
vendor/gtest/CMakeFiles/gtest.dir/build.make:86: recipe for target '/src/libgtest.so' failed
make[2]: *** [/src/libgtest.so] Error 1
make[2]: Leaving directory '/home/jimk/apps/PointClouds/pdal/src/pdal/build'
CMakeFiles/Makefile2:1122: recipe for target 'vendor/gtest/CMakeFiles/gtest.dir/all' failed
make[1]: *** [vendor/gtest/CMakeFiles/gtest.dir/all] Error 2
make[1]: Leaving directory '/home/jimk/apps/PointClouds/pdal/src/pdal/build'
Makefile:165: recipe for target 'all' failed
make: *** [all] Error 2
=== ninja error ===
ninja: error: mkdir(/src): Permission denied
ninja: build stopped: .
On 9/10/19 3:45 PM, Jim Klassen wrote:
> Sorry for the delay.
>
> I was using cmake 3.7.2 (default w/Debain 9). I just built with cmake 3.15.3 and got the same results. Looking at the Dockerfiles, I'm wondering if this might be a ninja vs make thing.
>
> On 9/5/19 12:41 PM, Howard Butler wrote:
>> How old is the cmake? Can you install the latest cmake and check if you still have the issue?
>>
>> Something like https://github.com/PDAL/PDAL/blob/master/scripts/docker/ubuntu/dependencies/Dockerfile#L18 maybe will work on 16.04
>>
>> Howard
>>
>>
>>
>>> On Sep 5, 2019, at 12:03 PM, Jim Klassen <klassen.js at gmail.com <mailto:klassen.js at gmail.com>> wrote:
>>>
>>> I am having build failures with PDAL on various Ubuntu 16.04 and Debian 9 machines that seems to have started sometime between 1.9 and 2.0.1. It is looking for '/src/libgtest.so' (note the leading slash) which doesn't exist (there is no /src directory on my systems). PDAL builds fine if I disable building tests. I suspect something in cmake land is not right, but I am not sure where to look. The '/src/libgtest.so' appears in many of the generated makefiles, but I don't see it set in CMakeCache.txt or see where it is calculated.
>>>
>>> [ 41%] Linking CXX shared library /src/libgtest.so
>>> /usr/bin/ld: cannot open output file /src/libgtest.so: No such file or directory
>>> collect2: error: ld returned 1 exit status
>>> vendor/gtest/CMakeFiles/gtest.dir/build.make:94: recipe for target '/src/libgtest.so' failed
>>> make[2]: *** [/src/libgtest.so] Error 1
>>> CMakeFiles/Makefile2:1320: recipe for target 'vendor/gtest/CMakeFiles/gtest.dir/all' failed
>>> make[1]: *** [vendor/gtest/CMakeFiles/gtest.dir/all] Error 2
>>> Makefile:160: recipe for target 'all' failed
>>> make: *** [all] Error 2
>>>
>>>
>>> _______________________________________________
>>> pdal mailing list
>>> pdal at lists.osgeo.org <mailto:pdal at lists.osgeo.org>
>>> https://lists.osgeo.org/mailman/listinfo/pdal
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20190912/08612455/attachment.html>
More information about the pdal
mailing list