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

Update simbody to a version with `SimTK::CableSpan` support #3911

Closed adamkewley closed 1 month ago

adamkewley commented 2 months ago

Fixes issue N/A (@pepbos , @nickbianco )

Brief summary of changes

Testing I've completed

Looking for feedback on...

N/A

CHANGELOG.md (choose one)


This change is Reviewable

adamkewley commented 2 months ago

Ulterior motive is that the updated opensim-core main will be propagated to opensim-creator, which might make building prototypes, visualizers, etc. for SimTK::CableSpan easier, if required.

adamkewley commented 2 months ago

It looks like upstream simbody has done something with its libBLAS and now our CI is broken. It'll require some investigation.

halleysfifthinc commented 2 months ago

BLAS link failure is my fault from simbody/simbody#795 and simbody/simbody#796. I've got a fix ( :crossed_fingers: ) up at my fork halleysfifthinc/simbody#2 (commit: 4638ee275b29eb7a7f1507617746a2e67a921b73). You should be able to test it here by temporarily updating the GIT_URL and GIT_TAG to the commit of my fix. (Passing CI in my fork or upstream simbody doesn't mean anything, since the issue is at the downstream/link library resolution step.)

adamkewley commented 2 months ago

Thanks for looking into it @halleysfifthinc

Looking through Cmake-related PRs in simbody, it's gradually becoming clear that it needs a cmake make-over - at least w.r.t. handling libBLAS/libLAPACK. It's not going to be manageable, longer-term, to keep twiddling with little if..elses, rather than just using cmake as-intended (creating actual targets in one location).

I'll have a look into centralizing the mess in Platform/

adamkewley commented 2 months ago

Ok, I take it back - fixing simbody's CMake is going to be a multi-day deal, because it's accumulated quite a few global variables, special one-off flags, etc. :<

halleysfifthinc commented 2 months ago

I've been working on a series of PRs refactoring/modernizing the simbody CMake off and on since this spring. My most substantial rewrite will soon be ready to submit as a PR, but I'm mostly not touching the Platform/ CMake settings.

(But you are quite correct that the Platform/ CMake config is a mess, and I think the best long-term solution would be to stop vendoring the precompiled BLAS/LAPACK binaries on Windows. Binaries in git is generally not a great idea, in addition to the unclear provenance of the libraries and likely violations of the library's license.)

adamkewley commented 1 month ago

Rebased as a single commit, it is now passing CI and is a minor enough change to merge straight away.

Thanks again for speedily looking into it @halleysfifthinc !