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

ceres-solver: clean up cmake configuration #42661

Merged
merged 1 commit into from Jun 28, 2018

Conversation

timor
Copy link
Member

@timor timor commented Jun 27, 2018

No need to explicitely set cmakeFlags, specifying the eigen library in the
build inputs should be enough.

Also, packages that build against ceres-solver and also use the eigen library
seem to be problematic. For this reason, it should be propagated.

Motivation for this change

While writing a derivation for colmap, when pulling in eigen3_3 there, it complains about ceres-solver being built with a different version.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@timor
Copy link
Member Author

timor commented Jun 27, 2018

cc @giogadi

@orivej
Copy link
Contributor

orivej commented Jun 28, 2018

It seems that ceres-solver does not have to propagate eigen3, and this is not how Nixpkgs avoids version conflicts. Why does colmap pull in eigen3_3? If it does not build with eigen 3.2, then you need to write this in all-packages.nix:

colmap = callPackage … {
  eigen = eigen3_3;
  ceres-solver = ceres-solver.override {
    eigen = eigen3_3;
  };
}

(or switch ceres-solver to eigen3_3 globally, if that does not break anything).

@timor
Copy link
Member Author

timor commented Jun 28, 2018

Ah Ok. Then it seems I misunderstood how propagatedBuildInputs is to be used. You are right that colmap does not pull in eigen3_3 by itself, only when specifying that explicitly, thus causing the conflict with the available ceres-solver.

As for the cleanup part, I would still like to have that merged. Should I change this PR or create a new one?

No need to explicitely set cmakeFlags, specifying the eigen library in the
build inputs is enough.
@orivej orivej force-pushed the ceres-solver-propagate-eigen branch from 85befd5 to cf23830 Compare June 28, 2018 09:03
@orivej orivej changed the title ceres-solver: clean up cmake configuration, propagate eigen library ceres-solver: clean up cmake configuration Jun 28, 2018
@orivej orivej merged commit ba15c00 into NixOS:master Jun 28, 2018
@orivej
Copy link
Contributor

orivej commented Jun 28, 2018

I have edited this PR and merged. Thanks!

@timor timor deleted the ceres-solver-propagate-eigen branch June 29, 2018 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants