Skip to content

Conversation

talregev
Copy link
Contributor

@talregev talregev commented Oct 6, 2025

Add static build in the ci with workarounds.
I take the workarounds of @Gold856 in this commit: Gold856@6c530ef
and combine them with mine and create this PR.

I manage to compile static build without permissive flag that suggested in this PR: #2268
On static release build, the build fail on divided by zero that detected in the compilation time.
I can change the code, but it change the behavior of the function. In the new behavior tests are failing.
I can add a seperate PR for it, and we can discuss it there.

This PR is not meant to merge, because it solve the compilation problem with workarounds. The PR highlight the problems and people can take this PR and solve them in the correct way.
Some of the changes are good in my perspective, and I can make a PR for those changes. For example: Add the ability to compile cephes in static build.

@talregev
Copy link
Contributor Author

talregev commented Oct 6, 2025

Compilation errors that PR solve:

libgtsamDebug.lib(Rot3.cpp.obj) : error LNK2019: unresolved external symbol "public: class Eigen::Matrix<double,9,1,0,9,1> __cdecl gtsam::SO<3>::vec(class gtsam::OptionalJacobian<9,3>)const " (?vec@?$SO@$02@gtsam@@QEBA?AV?$Matrix@N$08$00$0A@$08$00@Eigen@@V?$OptionalJacobian@$08$02@2@@Z) referenced in function "public: class Eigen::Matrix<double,3,1,0,3,1> __cdecl gtsam::Rot3::xyz(class gtsam::OptionalJacobian<3,3>)const " (?xyz@Rot3@gtsam@@QEBA?AV?$Matrix@N$02$00$0A@$02$00@Eigen@@V?$OptionalJacobian@$02$02@2@@Z)
testSO4.cpp.obj : error LNK2019: unresolved external symbol "public: class Eigen::Matrix<double,16,1,0,16,1> __cdecl gtsam::SO<4>::vec(class gtsam::OptionalJacobian<16,6>)const " (?vec@?$SO@$03@gtsam@@QEBA?AV?$Matrix@N$0BA@$00$0A@$0BA@$00@Eigen@@V?$OptionalJacobian@$0BA@$05@2@@Z) referenced in function "public: virtual void __cdecl SO4VecTest::run(class TestResult &)" (?run@SO4VecTest@@UEAAXAEAVTestResult@@@Z)
testGncOptimizer.cpp.obj : error LNK2019: unresolved external symbol __imp_igami referenced in function "double __cdecl gtsam::internal::chi_squared_quantile(double,double)" (?chi_squared_quantile@internal@gtsam@@YANNN@Z)

@talregev
Copy link
Contributor Author

talregev commented Oct 6, 2025

divided by zero error that can be solve in other PR:

D:\a\gtsam\gtsam\gtsam\linear\NoiseModel.h(578) : error C2220: the following warning is treated as an error
D:\a\gtsam\gtsam\gtsam\linear\NoiseModel.h(578) : warning C4723: potential divide by 0

@Gold856
Copy link
Contributor

Gold856 commented Oct 7, 2025

I shipped my full cephes fix in #2273. It was more than just fixing the C math functions, but also symbol exports (and I have a preference for making the build system handle that).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants