[pdal] PDAL 2.0.1 build issue

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[pdal] PDAL 2.0.1 build issue

James Klassen-2
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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] PDAL 2.0.1 build issue

Howard Butler-3
How old is the cmake? Can you install the latest cmake and check if you still have the issue?


Howard



On Sep 5, 2019, at 12:03 PM, Jim Klassen <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal


_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] PDAL 2.0.1 build issue

andrew.bell.ia@gmail.com
In reply to this post by James Klassen-2
2.0.1 builds fine, generally speaking, on 16.04, so there's something special about your configuration.  You'd need to run the build command (make, ninja, whatever) with enough detail so that we can look at the output of the compilation.

Do you, perhaps, have a version of google test on your system that's getting found instead of the one packaged with PDAL?  If you're using gcc/clang, you can add "-MM" to the build options to get the header file listing.


On Thu, Sep 5, 2019 at 1:03 PM Jim Klassen <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal


--
Andrew Bell
[hidden email]

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] PDAL 2.0.1 build issue

James Klassen-2
In reply to this post by Howard Butler-3
Sorry for the delay.

I was using cmake 3.7.2 (default w/Debain 9I just build 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?


Howard



On Sep 5, 2019, at 12:03 PM, Jim Klassen <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal



_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] PDAL 2.0.1 build issue

James Klassen-2
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?


Howard



On Sep 5, 2019, at 12:03 PM, Jim Klassen <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal




_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] PDAL 2.0.1 build issue

Howard Butler-3


On Sep 12, 2019, at 3:03 PM, Jim Klassen <[hidden email]> wrote:

/src/libgtest.so

I suspect the CMakeLists.txt of gtest is somehow not getting a proper CMake path set, and your hunch about it not mattering on the Docker builds due to them being built as root is probably accurate.

I would rummage around in the gtest CMake configuration and see if you can figure out which variable our CMake configuration needs to set.

Howard

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal