Skip to contentSkip to conversation

Can we build static host tools (e.g. tar)?

Buildroot Grant Edwards 2 participants 3 messages Jan 14, 2025 – Jan 23, 2025

lore
Share & tools
lore
#0 lore raw

I'm having problems with the SDK that Buildroot builds. Things like opkg-build are failing because they're using buildroot's SDK version of tar, and the glibc version isn't compatible between the host where the sdk was built and the devleoper host where the sdk is being used.

--
Grant

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw
Quoted 4 lines · Grant Edwards

I'm having problems with the SDK that Buildroot builds. Things like opkg-build are failing because they're using buildroot's SDK version of tar, and the glibc version isn't compatible between the host where the sdk was built and the devleoper host where the sdk is being used.

The SDK is meant to be relocatable, but it is very hard to make it possible to
just run anywhere. Static linking can help but even with -static you may still get a shared binary. So even if we do that, there's no guarantee that it will work on another build machine.

BTW I'm surprised you complain about tar - the compiler should have the same
issue, no?

Regards,
Arnout
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 10 lines · Arnout Vandecappelle via buildroot
Quoted 4 lines · Grant Edwards

I'm having problems with the SDK that Buildroot builds. Things like opkg-build are failing because they're using buildroot's SDK version of tar, and the glibc version isn't compatible between the host where the sdk was built and the devleoper host where the sdk is being used.

The SDK is meant to be relocatable, but it is very hard to make it possible to
just run anywhere. Static linking can help but even with -static you may still get a shared binary. So even if we do that, there's no guarantee that it will work on another build machine.

Right, but it should reduce the areas that could cause problems (though static binaries would probably end up being absurding large).

Quoted 2 lines

BTW I'm surprised you complain about tar - the compiler should have the same
issue, no?

The change that's tripping us up was at glibc 2.38. So far, the only change we've run into using the SDK that wasn't compatible was in libacl, and the only thing that uses that in the SDK (at least for us) is tar.

Our temporary work-around is to go into the sdk tree on the affected hosts and replace 'tar' with a symlink to the host's native tar. Eventually those hosts will get OS updates that will allow the SDK's tar to work again.

--
Grant

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot