CMake Error during PlusLib SuperBuild: "The source does not match..."

Hi everyone,

I’m encountering an error during the building of Pluslib, which is a dependency for Slicer on Ubuntu. My goal is to acquire ultrasound images from a Windows machine using the PLUS server.

I followed the instructions in this link: PlusBuild/Docs/BuildInstructionsLinux.md at master · PlusToolkit/PlusBuild · GitHub

Error Message:

[ 73%] Performing configure step for 'PlusLib'
CMake Error: The source "/home/user/devel/PlusBuild/PlusBuild-bin/PlusLib/CMakeLists.txt" does not match the source "/home/user/Slicer-SuperBuild-Debug/RapidJSON/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
make[2]: *** [CMakeFiles/PlusLib.dir/build.make:100: PlusLib-prefix/src/PlusLib-stamp/PlusLib-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:983: CMakeFiles/PlusLib.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

What I’ve tried so far:

  1. I completely deleted the build directory (PlusBuild-bin) and started the build from scratch.

  2. I manually removed CMakeCache.txt and the CMakeFiles directory and then re-ran CMake.

Neither of these steps resolved the issue.

My environment:

  • Ubuntu 22.04 LTS

  • Slicer 5.6.2 (To use SlicerRos2)

Any insights into why this error might be occurring and what I might be missing would be greatly appreciated.

Thank you in advance for your help.