isciences / exactextract

Fast and accurate raster zonal statistics
Apache License 2.0
255 stars 33 forks source link

No rule to make target `/lib.so', needed by `exactextract' #9

Closed hgscal closed 3 years ago

hgscal commented 4 years ago

Hi all, I'm trying to build exactextract, but during make I first found that CL11.hpp was empty, I had to re-download it, then, after passing CLI11 issue, I get the following:

/zeus/opt/sources/exactextract/cmake-build-release -- The C compiler identification is Intel 19.0.5.20190815 -- The CXX compiler identification is Intel 19.0.5.20190815 -- Check for working C compiler: /zeus/opt/intel_2019/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/icc -- Check for working C compiler: /zeus/opt/intel_2019/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/icc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /zeus/opt/intel_2019/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/icpc -- Check for working CXX compiler: /zeus/opt/intel_2019/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/icpc -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found GEOS: /usr/lib64/libgeos_c.so -- Found GDAL: /lib.so
-- Source version: 271d4a4 -- Found Doxygen: /usr/bin/doxygen (found version "1.8.5") found components: doxygen missing components: dot Doxygen build started -- Configuring done -- Generating done -- Build files have been written to: /zeus/opt/sources/exactextract/cmake-build-release --2020-02-05 11:48:45-- https://github.com/CLIUtils/CLI11/releases/download/v1.6.0/CLI11.hpp Resolving github.com (github.com)... 140.82.118.4 Connecting to github.com (github.com)|140.82.118.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/80064252/e6608e02-7ae1-11e8-8ce4-5fa18405c43b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200205T104845Z&X-Amz-Expires=300&X-Amz-Signature=cf68bccc54f907b95ed3465f9ce9a373604200ccb5278597abcfaaa552613126&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DCLI11.hpp&response-content-type=application%2Foctet-stream [following] --2020-02-05 11:48:45-- https://github-production-release-asset-2e65be.s3.amazonaws.com/80064252/e6608e02-7ae1-11e8-8ce4-5fa18405c43b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200205T104845Z&X-Amz-Expires=300&X-Amz-Signature=cf68bccc54f907b95ed3465f9ce9a373604200ccb5278597abcfaaa552613126&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3DCLI11.hpp&response-content-type=application%2Foctet-stream Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.216.98.123 Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.216.98.123|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 141529 (138K) [application/octet-stream] Saving to: ‘CLI11.hpp’

100%[=================================================================================================>] 141,529 387KB/s in 0.4s

2020-02-05 11:48:46 (387 KB/s) - ‘CLI11.hpp’ saved [141529/141529]

MAKE Scanning dependencies of target exactextract_STATIC [ 2%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/area.cpp.o [ 4%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/box.cpp.o [ 6%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/cell.cpp.o [ 8%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/coordinate.cpp.o [ 10%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/floodfill.cpp.o [ 12%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/geos_utils.cpp.o [ 14%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/grid.cpp.o [ 16%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/perimeter_distance.cpp.o [ 18%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/raster_cell_intersection.cpp.o [ 20%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/side.cpp.o [ 22%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/traversal.cpp.o [ 24%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/traversal_areas.cpp.o [ 26%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/output_writer.cpp.o [ 28%] Building CXX object CMakeFiles/exactextract_STATIC.dir/src/utils.cpp.o [ 30%] Linking CXX static library libexactextract.a [ 30%] Built target exactextract_STATIC Scanning dependencies of target exactextract_bin [ 32%] Building CXX object CMakeFiles/exactextract_bin.dir/src/exactextract.cpp.o [ 34%] Building CXX object CMakeFiles/exactextract_bin.dir/src/gdal_raster_wrapper.cpp.o [ 36%] Building CXX object CMakeFiles/exactextract_bin.dir/src/gdal_dataset_wrapper.cpp.o [ 38%] Building CXX object CMakeFiles/exactextract_bin.dir/src/gdal_writer.cpp.o [ 40%] Building CXX object CMakeFiles/exactextract_bin.dir/src/feature_sequential_processor.cpp.o [ 42%] Building CXX object CMakeFiles/exactextract_bin.dir/src/raster_sequential_processor.cpp.o make[2]: No rule to make target /lib.so', needed byexactextract'. Stop. make[1]: [CMakeFiles/exactextract_bin.dir/all] Error 2 make: *** [all] Error 2

Can you help us?

dbaston commented 4 years ago

Looks like the output of gdal-config --libs isn't in a format that the build script is expecting (around https://github.com/isciences/exactextract/blob/master/cmake/FindGDAL.cmake#L220). Can you paste the output of gdal-config --libs here?

hgscal commented 4 years ago

Hi dbaston, I used: cmake -DCMAKE_CXX_FLAGS:STRING="-std=c++14" -DCMAKE_BUILD_TYPE=Release -DGDAL_CONFIG:FILEPATH=/zeus/opt/intel19.5/gdal/3.0.3 .. -DGDAL_INCLUDE_DIR:PATH=/zeus/opt/intel19.5/gdal/3.0.3/include -DCMAKE_CXX_COMPILER:FILEPATH=/zeus/opt/intel_2019/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/icpc -DCMAKE_C_COMPILER:FILEPATH=/zeus/opt/intel_2019/intel/compilers_and_libraries_2019.5.281/linux/bin/intel64/icc

and the requested output is:

gdal-config --libs -L/zeus/opt/intel19.5/gdal/3.0.3/lib -lgdal

dbaston commented 4 years ago

Looks like I should remove the FindGDAL in this repository since there is a version built-in to CMake.

In the meantime, try setting -DGDAL_CONFIG_PREFER_PATH:FILEPATH=/zeus/opt/intel19.5/gdal/3.0.3

instead of -DGDAL_CONFIG:FILEPATH=/zeus/opt/intel19.5/gdal/3.0.3

hgscal commented 4 years ago

ok, now I'm getting:

icpc: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance [ 76%] Built target exactextract_SHARED Scanning dependencies of target catch_tests [ 78%] Building CXX object CMakeFiles/catch_tests.dir/test/test_box.cpp.o /zeus/opt/sources/exactextract/test/test_box.cpp(7): error #77: this declaration has no storage class or type specifier TEST_CASE("Box dimensions are calculated correctly", "[box]" ) { ^

/zeus/opt/sources/exactextract/test/test_box.cpp(7): error: a value of type "const char *" cannot be used to initialize an entity of type "int" TEST_CASE("Box dimensions are calculated correctly", "[box]" ) { .. .. .. /zeus/opt/sources/exactextract/test/test_box.cpp(180): error #77: this declaration has no storage class or type specifier crx = b.crossing({0.4, 0.6}, {0.7, -0.3}); ^

compilation aborted for /zeus/opt/sources/exactextract/test/test_box.cpp (code 4) make[2]: [CMakeFiles/catch_tests.dir/test/test_box.cpp.o] Error 4 make[1]: [CMakeFiles/catch_tests.dir/all] Error 2 make: *** [all] Error 2

dbaston commented 4 years ago

I can download Intel C++ and try to reproduce, though there is some history of compilation failures with Catch2 and Intel's compilers. You could try make exactextract instead of make to avoid building the test suite.

hgscal commented 4 years ago

no luck with make exactextract:

[root@zeus-n001][/zeus/opt/sources/exactextract/cmake-build-release]> make exactextract make: *** No rule to make target `exactextract'. Stop.

dbaston commented 4 years ago

Sorry, make exactextract_bin

hgscal commented 4 years ago

ok thanks

[100%] Linking CXX executable exactextract icpc: warning #10315: specifying -lm before files may supersede the Intel(R) math library and affect performance [100%] Built target exactextract_bin

Can I consider this installation for production? (only exactextract_bin) Since we put a versioning of compiled sw, what version is this one? Thanks

dbaston commented 4 years ago

I just built the binary and tests with Intel C++ 19.1.0.20191121. I'm not sure why you're seeing a compile failure.

Can I consider this installation for production? (only exactextract_bin)

Yes, the exactextract binary is standalone. You don't need to install anything else.

Since we put a versioning of compiled sw, what version is this one?

There's no version except the git hash, which you can see with exactextract --help. You should see: Zonal statistics using exactextract: build b132965