opensim-org / opensim-core

SimTK OpenSim C++ libraries and command-line applications, and Java/Python wrapping.
https://opensim.stanford.edu
Apache License 2.0
801 stars 324 forks source link

opensim-core main branch fails to build on Windows #3898

Closed sboschinertia closed 2 months ago

sboschinertia commented 2 months ago

Built and installed dependencies using dependencies superbuild.

Ran cmake for the project itself in a ./build sub-directory as follows:

$ cmake ../ -DOPENSIM_WITH_TROPTER=OFF -DOPENSIM_WITH_CASADI=OFF
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- NOTICE: Make sure all OpenSim dependencies are built with the same CMAKE_BUILD_TYPE (Linux) or CONFIGURATION (Xcode/MSVC) as OpenSim to avoid mysterious runtime errors.
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Could NOT find LATEX (missing: LATEX_COMPILER PDFLATEX)
-- The following OPTIONAL packages have been found:

 * Git
 * Simbody (required version >= 3.7)
 * docopt (required version >= 0.6.1)

-- The following REQUIRED packages have been found:

 * Threads
 * spdlog
 * Catch2

-- The following features have been disabled:

 * WITH_CASADI, Build CasADi support for Moco (OPENSIM_WITH_CASADI)
 * WITH_TROPTER, Build the tropter optimal control library (OPENSIM_WITH_TROPTER)

-- The following OPTIONAL packages have not been found:

 * Doxygen
 * LATEX

-- Configuring done (4.8s)
-- Generating done (18.8s)
-- Build files have been written to: D:/Data/Projects/VStudio/opensim-core/build

Visual C++ fails to build as follows:

Rebuild started at 15:04...
1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>1>Checking Build System
2>------ Rebuild All started: Project: osimLepton, Configuration: Release x64 ------
3>------ Rebuild All started: Project: Simbody_CONFIG_check, Configuration: Release x64 ------
4>------ Skipped Rebuild All: Project: RUN_TESTS_PARALLEL, Configuration: Release x64 ------
4>Project not selected to build for this solution configuration 
5>------ Skipped Rebuild All: Project: RUN_TESTS, Configuration: Release x64 ------
5>Project not selected to build for this solution configuration 
6>------ Skipped Rebuild All: Project: NightlyMemoryCheck, Configuration: Release x64 ------
6>Project not selected to build for this solution configuration 
7>------ Skipped Rebuild All: Project: Nightly, Configuration: Release x64 ------
7>Project not selected to build for this solution configuration 
8>------ Skipped Rebuild All: Project: Experimental, Configuration: Release x64 ------
8>Project not selected to build for this solution configuration 
9>------ Skipped Rebuild All: Project: Continuous, Configuration: Release x64 ------
9>Project not selected to build for this solution configuration 
2>Building Custom Rule D:/Data/Projects/VStudio/opensim-core/Vendors/lepton/CMakeLists.txt
3>Checking if Simbody was built with same BUILD_TYPE or CONFIGURATION as the current OpenSim BUILD_TYPE or CONFIGURATION.
3>Building Custom Rule D:/Data/Projects/VStudio/opensim-core/CMakeLists.txt
10>------ Rebuild All started: Project: Copy Simbody DLLs, Configuration: Release x64 ------
2>CompiledExpression.cpp
2>ExpressionProgram.cpp
2>ExpressionTreeNode.cpp
2>Operation.cpp
2>ParsedExpression.cpp
2>Parser.cpp
10>Copying SimTKcommon.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying SimTKmath.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying SimTKsimbody.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying glut32.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying libblas.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying libgcc_s_sjlj-1.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying libgfortran-3.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying liblapack.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Copying libquadmath-0.dll from C:/Software/simbody/bin to D:/Data/Projects/VStudio/opensim-core/build/Release.
10>Building Custom Rule D:/Data/Projects/VStudio/opensim-core/CMakeLists.txt
2>   Creating library D:/Data/Projects/VStudio/opensim-core/build/Release/osimLepton.lib and object D:/Data/Projects/VStudio/opensim-core/build/Release/osimLepton.exp
2>osimLepton.vcxproj -> D:\Data\Projects\VStudio\opensim-core\build\Release\osimLepton.dll
11>------ Rebuild All started: Project: testLepton, Configuration: Release x64 ------
12>------ Rebuild All started: Project: osimCommon, Configuration: Release x64 ------
11>Building Custom Rule D:/Data/Projects/VStudio/opensim-core/Vendors/lepton/test/CMakeLists.txt
12>Building Custom Rule D:/Data/Projects/VStudio/opensim-core/OpenSim/Common/CMakeLists.txt
11>testLepton.cpp
12>APDMDataReader.cpp
12>About.cpp
12>AbstractDataTable.cpp
12>AbstractProperty.cpp
12>Assertion.cpp
12>CSVFileAdapter.cpp
12>CommonUtilities.cpp
12>Component.cpp
12>ComponentList.cpp
12>ComponentOutput.cpp
12>ComponentPath.cpp
12>ComponentSocket.cpp
12>Constant.cpp
12>DataAdapter.cpp
12>DebugUtilities.cpp
12>Exception.cpp
12>ExpressionBasedFunction.cpp
12>FileAdapter.cpp
12>Function.cpp
12>FunctionAdapter.cpp
12>FunctionSet.cpp
11>   Creating library D:/Data/Projects/VStudio/opensim-core/build/Release/testLepton.lib and object D:/Data/Projects/VStudio/opensim-core/build/Release/testLepton.exp
12>GCVSpline.cpp
11>testLepton.vcxproj -> D:\Data\Projects\VStudio\opensim-core\build\Release\testLepton.exe
12>GCVSplineSet.cpp
12>IMUDataReader.cpp
12>IO.cpp
12>LatinHypercubeDesign.cpp
12>LinearFunction.cpp
12>Lmdif.cpp
12>LoadOpenSimLibrary.cpp
12>Logger.cpp
12>MarkerData.cpp
12>MarkerFrame.cpp
12>MultiplierFunction.cpp
12>MultivariatePolynomialFunction.cpp
12>Object.cpp
12>ObjectGroup.cpp
12>OptimizationTarget.cpp
12>PiecewiseConstantFunction.cpp
12>PiecewiseLinearFunction.cpp
12>Property.cpp
12>PropertyBool.cpp
12>PropertyBoolArray.cpp
12>PropertyDbl.cpp
12>PropertyDblArray.cpp
12>PropertyGroup.cpp
12>PropertyInt.cpp
12>PropertyIntArray.cpp
12>PropertyObj.cpp
12>PropertySet.cpp
12>PropertyStr.cpp
12>PropertyStrArray.cpp
12>PropertyTable.cpp
12>PropertyTransform.cpp
12>Property_Deprecated.cpp
12>RegisterTypes_osimCommon.cpp
12>Reporter.cpp
12>RootSolver.cpp
12>STOFileAdapter.cpp
12>Scale.cpp
12>ScaleSet.cpp
12>SegmentedQuinticBezierToolkit.cpp
12>Signal.cpp
12>SignalGenerator.cpp
12>SimmIO.cpp
12>SimmSpline.cpp
12>SmoothSegmentedFunction.cpp
12>SmoothSegmentedFunctionFactory.cpp
12>StateVector.cpp
12>StepFunction.cpp
12>Storage.cpp
12>TRCFileAdapter.cpp
12>TableUtilities.cpp
12>Units.cpp
12>VectorFunction.cpp
12>VectorFunctionUncoupledNxN.cpp
12>XMLDocument.cpp
12>XYFunctionInterface.cpp
12>XsensDataReader.cpp
12>osimCommonDLL.cpp
12>osimCommonTemplates.cpp
12>gcvspl.c
12>   Creating library D:/Data/Projects/VStudio/opensim-core/build/Release/osimCommon.lib and object D:/Data/Projects/VStudio/opensim-core/build/Release/osimCommon.exp
12>XYFunctionInterface.obj : error LNK2019: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z) referenced in function "public: bool __cdecl OpenSim::XYFunctionInterface::deletePoint(int)" (?deletePoint@XYFunctionInterface@OpenSim@@QEAA_NH@Z)
12>XsensDataReader.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>osimCommonTemplates.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>TableUtilities.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>VectorFunction.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>VectorFunctionUncoupledNxN.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>XMLDocument.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>SimmSpline.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>StateVector.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>StepFunction.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>Storage.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>Scale.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>ScaleSet.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>Signal.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>SignalGenerator.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>PropertySet.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>RegisterTypes_osimCommon.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>Reporter.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>RootSolver.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>PiecewiseConstantFunction.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>PiecewiseLinearFunction.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>Property.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>PropertyObj.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>MultivariatePolynomialFunction.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>Object.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>ObjectGroup.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>OptimizationTarget.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>Logger.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)
12>MarkerData.obj : error LNK2001: unresolved external symbol "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z)

etc...

What is going on?

Visual C++ 2022   00482-90000-00000-AA412
Microsoft Visual C++ 2022
nickbianco commented 2 months ago

@sboschinertia not sure what the issue is here. Our Windows2022 builds pass on CI. What commit are you building from? We had some recent issues with spdlog, which depends on fmt.

sboschinertia commented 2 months ago

Commit was: 7466c6d4d0e73e48445c1868d92b167b54284614

Got it to build with the powershell build script at that time, so I didn't report back here right away. I am now using the build environment created by that to do development.

nickbianco commented 2 months ago

@sboschinertia sounds good. Can we close this issue?

sboschinertia commented 2 months ago

yes