lopsided98 / nix-ros-overlay

ROS overlay for the Nix package manager
Apache License 2.0
212 stars 83 forks source link

Turtlebot3 packages on linux fail to build (ROS2 Humble) #430

Open hegde-atri opened 4 months ago

hegde-atri commented 4 months ago

Fails to build cartographer after failing to find cairo - output here.

Not sure how I could fix this as cairo seems to exist in propagatedBuildInputs.

dylan-gonzalez commented 4 months ago

I think you have to override the cartographer package to add pkg-config to its nativeBuildInputs. But then there are a bunch of C++ parsing errors...

hegde-atri commented 3 months ago

I think you have to override the cartographer package to add pkg-config to its nativeBuildInputs. But then there are a bunch of C++ parsing errors...

How would I go about doing this? Would I have to do this override in humble/turtlebot3-cartographer/default.nix?

dylan-gonzalez commented 3 months ago

on the command line (from memory):

nix-build -E 'with import <nix-ros-overlay> { }; pkgs.rosPackages.humble.cartographer.overrideAttrs ({ nativeBuildInputs ? [ ], ...}: 
    nativeBuildInputs = nativeBuildInputs ++ [ pkgs.pkg-config ];
)'

and in a file, you would do a similar thing but in an overlay. But I'd have to take a deeper look to see where to go from here.

liarokapisv commented 3 months ago

It seems just defining the package in an overlay is not enough, probably some issue with the scope definition, I am not sure what exactly. I could temporarily bypass this issue by directly override cartographer when passing turtlebot in the buildEnv. Other than that it seems that the cartographer package depends on a very old version (2018) of abseil which complicates things further.

hegde-atri commented 3 months ago

I could temporarily bypass this issue by directly override cartographer when passing turtlebot in the buildEnv.

@liarokapisv How would I go about doing this in a flake?