CMake Error: The source "/sources/gvmd-22.4.0/CMakeLists.txt" does not match the source "/sources/gvm-libs-22.4.0/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
A diff of both CMakeLists.txt clearly shows the two files to be totally different right from the start:
Thanks bricks. I am trying to add GVM to my own pentest docker and this was my own mistake. For the record I was not setting properly my WORKDIR. A side note we should correct Building 22.4 from Source - Greenbone Community Documentation on the gvmd install to set the PKG_CONFIG_PATH var otherwise it won’t build:
That should not be necessary if gvm-libs is installed into the default prefix /usr/local/. The pkg-config file can be found in /usr/local/include/pkg-config. If you don’t use the default prefix you shouldn’t point to the build dir and use $PREFIX/include/pkg-config.
For what is worth bricks, I forgot to say that at least for gvmd and pg-gvm the below command exits with code 1:
cp -rv $INSTALL_DIR/* /
This means that if scripted the output has to be ignored unless the script is not checking for errors. Docker will definitely stop there unless a hack (like the below) is introduced:
cp -rv $INSTALL_DIR/* / || echo 'cp -rv $INSTALL_DIR/* / returns with exit code 1 but that is not a showstopper apparently'
CMake Error: The current CMakeCache.txt directory /Users/devanshiarora/downloads/ChromaticCalorimetry/spacal-simulation/build/CMakeCache.txt is different than the directory /home/spacal/Documents/LHCb/simulations/ChromaticCalorimetry/spacal-simulation/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt
CMake Error: The source “/Users/devanshiarora/downloads/ChromaticCalorimetry/spacal-simulation/CMakeLists.txt” does not match the source “/home/spacal/Documents/LHCb/simulations/ChromaticCalorimetry/spacal-simulation/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.
Last command “cmake $CMAKE_ARGS …/” returned with exit code 1.