PDAL / PDAL

PDAL is Point Data Abstraction Library. GDAL for point cloud data.

Home Page:https://pdal.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDAL 2.6.2 is not able to run tests (could not find test executables)

imincik opened this issue · comments

Describe the bug
When building PDAL 2.6.2 for Nixpkgs, it is not possible to run tests after the build. Test binaries are installed to source/build/<ABSOLUTE-PATH-TO-SOURCE-AGAIN>/build/bin/ instead of source/build/bin/ directory.

Error message:

 Unable to find executable: /build/source/build/bin/pdal_io_ilvis2_metadata_test
136/138 Test #136: pdal_io_ilvis2_metadata_test .................***Not Run   0.00 sec
        Start 137: pdal_io_ilvis2_reader_metadata_test
Could not find executable /build/source/build/bin/pdal_io_ilvis2_reader_metadata_test
Looked in the following places:
/build/source/build/bin/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Release/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Release/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Debug/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Debug/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/MinSizeRel/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/MinSizeRel/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/RelWithDebInfo/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/RelWithDebInfo/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Deployment/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Deployment/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Development/pdal_io_ilvis2_reader_metadata_test
/build/source/build/bin/Development/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Release/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Release/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Debug/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Debug/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/MinSizeRel/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/MinSizeRel/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/RelWithDebInfo/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/RelWithDebInfo/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Deployment/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Deployment/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Development/pdal_io_ilvis2_reader_metadata_test
build/source/build/bin/Development/pdal_io_ilvis2_reader_metadata_test

CMake flags:

cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LOCALEDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/share/doc/PDAL -DCMAKE_INSTALL_INFODIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/share/info -DCMAKE_INSTALL_MANDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/share/man -DCMAKE_INSTALL_OLDINCLUDEDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/include -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/include -DCMAKE_INSTALL_SBINDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/sbin -DCMAKE_INSTALL_BINDIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/bin -DCMAKE_INSTALL_NAME_DIR=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_STRIP=/nix/store/sfgnb6rr428bssyrs54d6d0vv2avi95c-gcc-wrapper-12.3.0/bin/strip -DCMAKE_RANLIB=/nix/store/sfgnb6rr428bssyrs54d6d0vv2avi95c-gcc-wrapper-12.3.0/bin/ranlib -DCMAKE_AR=/nix/store/sfgnb6rr428bssyrs54d6d0vv2avi95c-gcc-wrapper-12.3.0/bin/ar -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_INSTALL_PREFIX=/nix/store/xf1n8klwdsd8dnq309bhbwlcibh4k7nx-pdal-2.6.2 -DBUILD_PLUGIN_E57=ON -DBUILD_PLUGIN_HDF=ON -DBUILD_PLUGIN_PGPOINTCLOUD=ON -DBUILD_PLUGIN_TILEDB=ON -DWITH_COMPLETION=ON -DBUILD_PLUGIN_CPD=OFF -DBUILD_PLUGIN_FBX=OFF -DBUILD_PLUGIN_GEOWAVE=OFF -DBUILD_PLUGIN_I3S=OFF -DBUILD_PLUGIN_ICEBRIDGE=OFF -DBUILD_PLUGIN_MATLAB=OFF -DBUILD_PLUGIN_MBIO=OFF -DBUILD_PLUGIN_MRSID=OFF -DBUILD_PLUGIN_NITF=OFF -DBUILD_PLUGIN_OCI=OFF -DBUILD_PLUGIN_RDBLIB=OFF -DBUILD_PLUGIN_RIVLIB=OFF -DBUILD_PGPOINTCLOUD_TESTS=OFF -DWITH_TESTS=ON

NOTE: pdal and pdal-config binaries are installed correctly and package works properly. The problem occurs only with test binaries.

Expected behavior
Tests can be correctly launched.

I'm quite sure the tests are assuming they're running relative to the source directory to find their test data and such. If you make a PR that fixes this, it must also install the test data (where? 🤷). This is why we have punted on this.

Thank you very much for replying.

The problem is that tests are installed to incorrect directory.
For example, if I build PDAL in /home/my-user/pdal/source directory, test binaries will end up in /home/my-user/pdal/source/build/home/my-user/pdal/source/build/bin directory instead of /home/my-user/pdal/source/build/bin.

It looks like the leading slash of absolute binaries path is lost and then it is appended to source directory as relative path.

Can you please pull #4291 and see if it corrects this issue for you?

Can you please pull #4291 and see if it corrects this issue for you?

Yes, I confirm that #4291 is fixing my problem. Thank you very much for looking at it.