<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I just tested that ninja vs make doesn't matter. Both try to use
/src as the top level for building gtest.<br>
<br>
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).<br>
<br>
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?<br>
<br>
<br>
=== make error ===<br>
<br>
<tt>Scanning dependencies of target gtest</tt><tt><br>
</tt><tt>make[2]: Leaving directory
'/home/jimk/apps/PointClouds/pdal/src/pdal/build'</tt><tt><br>
</tt><tt>make -f vendor/gtest/CMakeFiles/gtest.dir/build.make
vendor/gtest/CMakeFiles/gtest.dir/build</tt><tt><br>
</tt><tt>make[2]: Entering directory
'/home/jimk/apps/PointClouds/pdal/src/pdal/build'</tt><tt><br>
</tt><tt>[ 42%] Building CXX object
vendor/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o</tt><tt><br>
</tt><tt>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</tt><tt><br>
</tt><tt><b>[ 43%] Linking CXX shared library /src/libgtest.so</b></tt><tt><br>
</tt><b><tt>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</tt></b><b><tt><br>
</tt></b><b><tt>/usr/bin/c++ -fPIC -O3 -DNDEBUG -shared
-Wl,-soname,libgtest.so -o /src/libgtest.so
CMakeFiles/gtest.dir/src/gtest-all.cc.o -lpthread </tt></b><b><tt><br>
</tt></b><b><tt>/usr/bin/ld: cannot open output file
/src/libgtest.so: No such file or directory</tt></b><b><tt><br>
</tt></b><tt>collect2: error: ld returned 1 exit status</tt><tt><br>
</tt><tt>vendor/gtest/CMakeFiles/gtest.dir/build.make:86: recipe for
target '/src/libgtest.so' failed</tt><tt><br>
</tt><tt>make[2]: *** [/src/libgtest.so] Error 1</tt><tt><br>
</tt><tt>make[2]: Leaving directory
'/home/jimk/apps/PointClouds/pdal/src/pdal/build'</tt><tt><br>
</tt><tt>CMakeFiles/Makefile2:1122: recipe for target
'vendor/gtest/CMakeFiles/gtest.dir/all' failed</tt><tt><br>
</tt><tt>make[1]: *** [vendor/gtest/CMakeFiles/gtest.dir/all] Error
2</tt><tt><br>
</tt><tt>make[1]: Leaving directory
'/home/jimk/apps/PointClouds/pdal/src/pdal/build'</tt><tt><br>
</tt><tt>Makefile:165: recipe for target 'all' failed</tt><tt><br>
</tt><tt>make: *** [all] Error 2</tt><br>
<br>
<br>
=== ninja error ===<br>
<br>
<tt>ninja: error: mkdir(/src): Permission denied</tt><tt><br>
</tt><tt>ninja: build stopped: .</tt><br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 9/10/19 3:45 PM, Jim Klassen wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1f6e3c62-b204-ab67-c4c1-07ee67b554af@gmail.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
Sorry for the delay.<br>
<br>
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.<br>
<br>
<div class="moz-cite-prefix">On 9/5/19 12:41 PM, Howard Butler
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:F6513DCE-CF61-4823-A971-4E2A479AEBF6@hobu.co">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
How old is the cmake? Can you install the latest cmake and check
if you still have the issue?
<div class=""><br class="">
</div>
<div class="">Something like <a
href="https://github.com/PDAL/PDAL/blob/master/scripts/docker/ubuntu/dependencies/Dockerfile#L18"
class="" moz-do-not-send="true">https://github.com/PDAL/PDAL/blob/master/scripts/docker/ubuntu/dependencies/Dockerfile#L18</a> maybe
will work on 16.04</div>
<div class=""><br class="">
</div>
<div class="">Howard</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Sep 5, 2019, at 12:03 PM, Jim Klassen
<<a href="mailto:klassen.js@gmail.com" class=""
moz-do-not-send="true">klassen.js@gmail.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">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.<br class="">
<br class="">
[ 41%] Linking CXX shared library /src/libgtest.so<br
class="">
/usr/bin/ld: cannot open output file /src/libgtest.so:
No such file or directory<br class="">
collect2: error: ld returned 1 exit status<br class="">
vendor/gtest/CMakeFiles/gtest.dir/build.make:94:
recipe for target '/src/libgtest.so' failed<br
class="">
make[2]: *** [/src/libgtest.so] Error 1<br class="">
CMakeFiles/Makefile2:1320: recipe for target
'vendor/gtest/CMakeFiles/gtest.dir/all' failed<br
class="">
make[1]: *** [vendor/gtest/CMakeFiles/gtest.dir/all]
Error 2<br class="">
Makefile:160: recipe for target 'all' failed<br
class="">
make: *** [all] Error 2<br class="">
<br class="">
<br class="">
_______________________________________________<br
class="">
pdal mailing list<br class="">
<a href="mailto:pdal@lists.osgeo.org" class=""
moz-do-not-send="true">pdal@lists.osgeo.org</a><br
class="">
<a class="moz-txt-link-freetext"
href="https://lists.osgeo.org/mailman/listinfo/pdal"
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/pdal</a></div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>