-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
This page collects solutions to the most common problems encountered while building and running SMS++. For how to point CMake at libraries installed in non-standard locations, see Customize the configuration; for the full setup, see the installation guide.
[[TOC]]
-
No CMAKE_CXX_COMPILER could be found.Your C++ compiler is not installed (or not found). Make sure a C++17-capable
gccorclang(Linux/macOS) or MSVC (Windows) is installed. If it is installed but not found, set theCXXenvironment variable or theCMAKE_CXX_COMPILERcache entry to the full path of the compiler (or its name if it is in thePATH). -
Unable to find the requested Boost libraries.CMake could not locate your Boost installation. Install Boost, or point CMake at it with the matching
*_ROOTvariable:cmake .. -DBoost_ROOT="/my/custom/path/to/boost"The same pattern works for the other dependencies (
Eigen3_ROOT,netCDF_ROOT,netCDFCxx_ROOT, …); see Customize the configuration. -
A required package (Eigen3, netCDF, …) is not found.
Install the missing dependency (the installation guide and the INSTALL scripts do this for you), or override its
*_ROOTpath as above. -
No MILP solver is available / a Block cannot be solved.
MILPSolverneeds at least one back-end among HiGHS, SCIP, CPLEX and Gurobi. Install one (HiGHS and SCIP are open source) and, if needed, point CMake at it withHiGHS_ROOT/SCIP_ROOT/CPLEX_ROOT/GUROBI_ROOT.
-
A module fails because the core library (or another module) is not found.
When building modules individually, enable the User Package Registry so they find each other without installing:
cmake .. -DCMAKE_EXPORT_PACKAGE_REGISTRY=ON
In the umbrella project this is already on by default. See Customize the configuration.
-
A submodule directory is empty / a
BUILD_*flag seems ignored.The umbrella builds a module only if its submodule is initialized. Fetch them with:
git submodule update --init --recursive
(turning a
BUILD_*flagONalso triggers this automatically).
-
vcpkg packages are not picked up.
Pass the vcpkg toolchain file at configure time:
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
Dependencies are resolved from the
vcpkg.jsonmanifest in manifest mode. See the installation guide. -
Cannot copy output executable ... Permission deniedorfile INSTALL cannot find ... .exe: File exists.Typical offenders are
getarch_2nd.exe(while building OpenBLAS) and tool executables such asbkbench.exe(at install time). This is not a vcpkg or SMS++ bug: an antivirus flags a freshly built, unsigned executable in the build tree as suspicious and locks or quarantines it, so CMake then cannot copy it. The: File existspart is a misleading leftover error; the real cause is that the file was made inaccessible.The fix is to exclude the whole build tree from your antivirus, namely
C:\vcpkgand your SMS++ directory (e.g.C:\smspp-project). On Windows Defender, from a PowerShell as administrator:Add-MpPreference -ExclusionPath "C:\vcpkg" Add-MpPreference -ExclusionPath "C:\smspp-project"
INSTALL.ps1does this automatically (skip it with-withoutDefenderExclusions). With a third-party antivirus (Avast, AVG, Norton, …)Add-MpPreferencefails with0x800106ba, because Defender is in passive mode and does not control the scanner. In that case add the same two paths to the exclusion list of your own antivirus, or disable its real-time protection for the duration of the build. After excluding, delete the half-built artifacts (C:\vcpkg\buildtrees\openblas,C:\vcpkg\packages\openblas_x64-windows, yourbuilddirectory), restore any quarantined.exe, and reconfigure. Building from a clean x64 Native Tools prompt with any conda environment deactivated also avoids unrelated toolchain interference.
Check the Getting help section of the relevant module's README, and search
or open an issue on the
project tracker.