Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
imincik opened this issue Dec 13, 2023 · 4 comments
Closed

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

imincik opened this issue Dec 13, 2023 · 4 comments
Labels
Milestone

Comments

@imincik
Copy link

imincik commented Dec 13, 2023

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.

@hobu
Copy link
Member

hobu commented Dec 15, 2023

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.

@hobu hobu added the build label Dec 15, 2023
@imincik
Copy link
Author

imincik commented Dec 15, 2023

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.

@hobu
Copy link
Member

hobu commented Dec 27, 2023

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

@hobu hobu added this to the 2.7.0 milestone Dec 27, 2023
@imincik
Copy link
Author

imincik commented Dec 27, 2023

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.

@hobu hobu closed this as completed Dec 29, 2023
hobu added a commit that referenced this issue Jan 8, 2024
* use standard CMake variables for install and build locations to attempt to address #4280

* PDAL_DRIVER_PATH subs

* shut off cmake debug
bramton pushed a commit to bramton/PDAL that referenced this issue Jan 24, 2024
* use standard CMake variables for install and build locations to attempt to address PDAL#4280

* PDAL_DRIVER_PATH subs

* shut off cmake debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants