Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAVE_CERES being defined might throw errors for the NonlinearLeastSquaresOptimizer #41

Closed
greenleaf641 opened this issue Nov 26, 2024 · 3 comments

Comments

@greenleaf641
Copy link

For context this is also related with #39, meaning that the code is edited somewhat but I still believe it is relevant. When building on OSX I get some errors for the included ceres version:

jet.h:1283:25: warning: 'float_denorm_style' is deprecated [-Wdeprecated-declarations]
       >  1283 |   static constexpr std::float_denorm_style has_denorm =

If HAVE_CERED is defined though, the optimizer.hpp file has some issues when it comes to the NonlinearLeastSquaresOptimizer.
First of all:

optimizer.hpp:206:8: error: explicit specialization of undeclared template struct 'NonlinearLeastSquaresOptimizer'
       >   206 | struct NonlinearLeastSquaresOptimizer<T, OptimizerType::Ceres> final : public OptimizerBase {
       >       |        ^                             ~~~~~~~~~~~~~~~~~~~~~~~~~

and also:

optimizer.hpp:223:31: error: use of undeclared identifier 'DTable'
       >   223 |     Operon::CostFunction<DTable, Eigen::RowMajor> cf(individual, ds, target, range, dt);
       >       |                               ^

It could be because this function is not used anywhere from what I see.

@greenleaf641
Copy link
Author

greenleaf641 commented Nov 27, 2024

Additionally, while trying to somehow merge the IT method with Operon I now suddenly can't build because

scn/impl.cpp:729:41: error: 'scientific' is not a member of 'fast_float'
       >   729 |             format_flags |= fast_float::scientific;
       >       |                                         ^~~~~~~~~~

I've tried nix build --update-input nixpkgs but I can only build if I manually copy paste the flake.lock file from the main branch, which doesn't make much sense with my current understanding, and I don't recall ever changing anything on scn!
I did run nix flake update --commit-lock-file at some point though trying to fix the issue.

This is not related with the above, not sure if I should move it to a different issue

@foolnotion
Copy link
Member

foolnotion commented Nov 27, 2024

Additionally, while trying to somehow merge the IT method with Operon I now suddenly can't build because

scn/impl.cpp:729:41: error: 'scientific' is not a member of 'fast_float'
       >   729 |             format_flags |= fast_float::scientific;
       >       |                                         ^~~~~~~~~~

I've tried nix build --update-input nixpkgs but I can only build if I manually copy paste the flake.lock file from the main branch, which doesn't make much sense with my current understanding, and I don't recall ever changing anything on scn! I did run nix flake update --commit-lock-file at some point though trying to fix the issue.

This is not related with the above, not sure if I should move it to a different issue

Your second issue is an incompatibility between scnlib and the lastest fast-float: eliaskosunen/scnlib#135

If you're using nix, I have temporarily forced fast-float to version 6.1.6.

@greenleaf641
Copy link
Author

I see.
So in fact me running nix flake update --commit-lock-file is what caused the issue then. Got it.

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

No branches or pull requests

2 participants