symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.41k stars 145 forks source link

Building with CMake links to wrong version of fmt on Macos #346

Open arbor-arthur opened 1 year ago

arbor-arthur commented 1 year ago

Describe the bug On Macos when building with cmake, if fmt version 8 and 9 (or 10) are both available, it detects version 8 and then tries to link to version 9/10, and fails because of missing symbols.

To Reproduce Install symforce through pip, which on my computer installed fmt 8 into /Library/Frameworks/Python.framework/Versions/3.9/. brew install fmt (for the newer version of fmt) Download symforce v0.9.0 and follow cmake build instructions.

Expected behavior If cmake detects version 8, it should link to the same version it finds. Alternatively, there could be an option to force downloading and linking against a local copy (what it does when it doesn't find a compatible version).

Environment (please complete the following information):

chao-qu-skydio commented 1 year ago

I'm not sure why it would find 8 and try to link to 9 or 10, since we already restrict fmt version to only 8. If you print out some fmt cmake variables for fmt, what do they look like?