SyneRBI / SIRF-SuperBuild

SIRF CMake SuperBuild
http://www.ccpsynerbi.ac.uk
Apache License 2.0
15 stars 17 forks source link

JSON errors on build #440

Closed AnderBiguri closed 3 years ago

AnderBiguri commented 3 years ago

I get json errors when trying to build SIRF through the super build (make SIRF -j20)

<other similar json errors>

CMake Error at src/common/CMakeLists.txt:23 (add_library):
  Target "csirf" links to target "nlohmann_json::nlohmann_json" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?

-- Generating done
-- Build files have been written to: /home/anderbiguri/SIRF/build/builds/SIRF/build
CMakeFiles/SIRF.dir/build.make:113: recipe for target 'builds/SIRF/stamp/SIRF-configure' failed
make[3]: *** [builds/SIRF/stamp/SIRF-configure] Error 1
CMakeFiles/Makefile2:491: recipe for target 'CMakeFiles/SIRF.dir/all' failed
make[2]: *** [CMakeFiles/SIRF.dir/all] Error 2
CMakeFiles/Makefile2:503: recipe for target 'CMakeFiles/SIRF.dir/rule' failed
make[1]: *** [CMakeFiles/SIRF.dir/rule] Error 2
Makefile:272: recipe for target 'SIRF' failed
make: *** [SIRF] Error 2

But I do have it installed, as I do build STIR with it and use ctac_to_mu_values without problem. This is some config error I think, but I can't figure out how to solve it. Can anyone give me a hand?

KrisThielemans commented 3 years ago

that seems to imply we don't "find" it before using it. That would be a STIR problem I believe. Indeed, checking https://github.com/UCL/STIR/blob/master/src/cmake/STIRConfig.cmake.in there are not lines "if I found json, include it". Could you check modifying STIR (careful, a bit tricky with the SuperBuild. if you modify your build/sources/STIR copy locally, you have to run CMake in build with -DDISABLE_GIT_CHECKOUT_STIR:BOOL=ON).

then it'll need a STIR PR. Maybe best to do that on release_4

AnderBiguri commented 3 years ago

OK, I'll give this a go.... my CMAKE skills are a bit inexistent, so will take me a bit likely.

KrisThielemans commented 3 years ago

See discussion in STIR issues. Note that this isn't a problem for STIR 4.x, but only for 5.x (i.e current master)