Known problems with system configurations - SyneRBI/SIRF GitHub Wiki
Cross-platform development of software that relies on many other packages is challenging. Many of the packages are built with CMake and test for dependencies and their versions. However, those tests are not always up-to-date or sufficient. We try to help by providing the SIRF-SuperBuild. It tests a few other dependencies and allows you to build certain packages yourself. Nevertheless, there are some cases where all this isn't sufficient. This page is constructed to list a few cases with known problems and som epossibly work-arounds.
When compiling on Windows 10, you might see an error like
6>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(383,5):
error MSB3491: Could not write lines to file "test_PoissonLogLikelihoodWithLinearModelForMeanAndProjData.dir\RelWithDebInfo\test_Poi.AB258268.tlog\test_PoissonLogLikelihoodWithLinearModelForMeanAndProjData.lastbuildstate".
Path: test_PoissonLogLikelihoodWithLinearModelForMeanAndProjData.dir\RelWithDebInfo\test_Poi.AB258268.tlog\test_PoissonLogLikelihoodWithLinearModelForMeanAndProjData.lastbuildstate exceeds the OS max path limit.
The fully qualified file name must be less than 260 characters. [C:\Users\krisf\Documents\devel\buildVC22\SIRF-SuperBuild\builds\STIR\build\src\recon_test\test_PoissonLogLikelihoodWithLinearModelForMeanAndProjData.vcxproj]
There are 2 causes for this:
- by default, Windows 10 ships with a limit of 260 characters. This can be changed however if you have admin permissions. As far as we know, this can be done by either setting a registry key (Windows Home) or setting a group policy (Windows Pro) or maybe both. See for instance this howtogeek post for instructions. You will need to reboot probably after applying this.
- If you use
msbuild
(i.e. Visual Studio), older versions don't support long pathnames and give the same error, even if you've done the previous step. You therefore need to upgrade yourmsbuild
, which is probably easiest to do by upgrading all of VS. VS 2022 ships with MSBuild 17.3 or similar, which no longer has this problem.
If after doing these steps, you still have problems, it is recommended to try and make a file that exceeds this limit, e.g. in Explorer. If you cannot, you know you have the first problem.
Retained here for reference.
In previous versions of the SuperBuild, many dependencies still fail with gcc-9 [Jan 2021], see SIRF-Superbuild #413. This should have been fixed in version 3.2. We recommend upgrading. If not, you can workaround this by
sudo apt install g++-8
export CC=gcc-8
export CXX=g++-8
cmake ....
System version is ace-6.0.3. Using a recent gcc gives an error when compiling Gadgetron
/usr/include/ace/TSS_T.cpp:357:39: error: no matching function for call to
ACE_Thread::keycreate(ACE_thread_key_t*, void (*)(void*), void*)(void *) this);
Details are here.
You could try to build ACE yourself (USE_SYSTEM_ACE=OFF
) and update this page.
You might see
/Users/travis/build/SyneRBI/SIRF-SuperBuild/INSTALL/include/boost/random/uniform_on_sphere.hpp:229:37: error: no member named 'bind2nd' in namespace 'std'
std::bind2nd(std::multiplies<RealType>(), 1/sqrt(sqsum)));
This seems a bug in that version of Boost, which was fixed in 1.68 (probably earlier). More detail here
CMake seems to fail detecting a hdf5 version, more detail here. This could be a CMake 3.11 problem. It is solved by setting USE_SYSTEM_HDF5=OFF
.