spatialite-tools required to build, run tests, but missing from CMake check?
envgap__valhalla__valhalla-2202
01 / FAILURE SIGNATURE
As reported upstream
Here's the error I got:
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
479f99a07ddeba7330ed85940ab108eed9e1ddf7- Manifest
CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
valhalla/valhalla #2202 · read the original issue
I ran into build problem with tests. We may be missing a dependency check for [spatialite-tools](https://www.gaia-gis.it/fossil/spatialite-tools/index) on a fresh build, but don't explicitly check for its existence when building the test target. As a result, the test target fails downstream when a require data dependency is missing. Here's the error I got: ```bash $ mkdir build $ cmake -DENABLE_PYTHON_BINDINGS=OFF \ -DENABLE_NODE_BINDINGS=OFF \ -DCMAKE_BUILD_TYPE=Debug \ -DENABLE_SANITIZER=ON ../ $ make -j4 tests ... [ 98%] Building tz.sqlite... make[3]: *** [test/data/tz.sqlite] Error 1 make[3]: *** Deleting file `test/data/tz.sqlite' make[2]: *** [test/CMakeFiles/utrecht_tiles.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs.... [ 98%] Built target pedestriancost [ 98%] Built target isochrone [ 98%] Built target matrix make[1]: *** [test/CMakeFiles/tests.dir/rule] Error 2 make: *** [tests] Error 2 ``` I fixed this by running `brew install spatialite-tools`. Expected behavior: - cmake build of test target (via `-DENABLE_TESTS=ON`) checks for spatialite-tools dependency on host, sets bit if present. - If building tests, check for spatialite-tools dependency bit and early exit if it's missing. - If tests are off (via `-DENABLE_TESTS=OFF`), don't load or check for dependency. My system: ``` $ sw_vers ProductName: Mac OS X ProductVersion: 10.14.3 BuildVersion: 18D109 $ gcc --version Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1 Apple LLVM version 10.0.0 (clang-1000.10.44.4) Target: x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ```
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]