-
Notifications
You must be signed in to change notification settings - Fork 76
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
Fix sophus build errors for humble and iron #394
base: develop
Are you sure you want to change the base?
Conversation
Nice! Do you have any idea why the noetic version doesn't work? |
Do you need noetic? I didn't look into the details. I assume the reason will be the same (i.e. newer compiler in nixpkgs generates more warnings). The solution would be also the same - remove |
Here is a quick patch doing that for noetic (on the upstream here: https://github.com/stonier/sophus/tree/release/1.1.x)
|
But if this is all that is needed to do, and the error seems to stem from building the tests and examples, wouldn't it be better to turn off those options? |
Btw, while it is annoying that some of the ros-versions of sophus don't work, the library itself can be built and used with no issue. I just copied the derivation from nixpkgs unstable: { lib, stdenv, eigen, fmt, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "sophus";
version = "1.22.10";
src = fetchFromGitHub {
owner = "strasdat";
repo = "Sophus";
rev = "${version}";
hash = "sha256-TNuUoL9r1s+kGE4tCOGFGTDv1sLaHJDUKa6c9x41Z7w=";
};
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ eigen fmt ];
cmakeFlags = [
(lib.cmakeBool "BUILD_SOPHUS_TESTS" false)
(lib.cmakeBool "BUILD_SOPHUS_EXAMPLES" false)
];
} Then add it to the code I want like a normal library in cmake:
|
Rolling version builds OK, other versions (noetic, humble, iron) fail. For ROS 2, we apply the patch which is already rolling. The patch does not apply to foxy and noetic versions. We ignore Foxy as it is EOL. We patch noetic by removing explicitly removing "-Werror". Fixes lopsided98#393
I'd prefer to build tests and examples, because it may allow discovering potential problems in the future. We just need to remove I've updated the commit to also patch Noetic. Now, all sophus versions build fine. |
We apply the patch from the rolling version, which builds fine already now. The patch does not apply to foxy and noetic versions so we don't patch them. Foxy is EOL. If someone needs noetic version, more effort is needed.
Fixes #393