projg2 / shadowman

Unified compiler shadow link directory updater (for ccache, distcc, icecc)
3 stars 3 forks source link

Provide a replacement for `distcc-config --update-masquerade-with-crossdev` #1

Open ghost opened 6 years ago

ghost commented 6 years ago

The old sys-devel/distcc ebuild used to have a USE flag to prevent installation of bare cc/gcc/c++/g++ symlinks, so that slow i686 machines can safely distcc to fast amd64 hosts without cryptic failures, e.g. bug 639494. This tool installs symlinks unconditionally and there's no fix besides manually pruning them, which gets undone whenever it decides to run again.

mgorny commented 6 years ago

Do you have any suggestion how to do that cleanly? I'd rather not add awful conditionals like 'if distcc || icecc, then skip those symlinks'. Ebuilds calling gcc/g++/etc. directly need to be fixed anyway.

ghost commented 6 years ago

I agree with that, compiler-shadow.eselect doesn't look like a good place to add this... maybe it makes sense to have the distcc/icecc pkg_postinst fix the links since that's where they get added. Apart from those places I've no idea where else this could go.

khumarahn commented 5 years ago

Hi! What is the problem with not installing short compiler links like cc/gcc/c++/g++ for distcc, only using long ones like x86_64-pc-linux-gnu-* or aarch64-unknown-linux-gnu-*? Maybe there could be a setting which controls this?

Some ebuilds use short compilers, e.g. qtwebengine https://bugs.gentoo.org/652172, and this is not going to end any time soon. I have to take extra care when updating the system that compiler-shadow is not run sometime in the middle of the update, otherwise the symlinks are screwed and who knows what gets compiled.

mgorny commented 5 years ago

For the record, I think the current versions of distcc should catch bare tool calls and automatically translate them to appropriate CHOST. But I don't know how reliably that works.

khumarahn commented 5 years ago

I ran into problems with distcc-3.3.2-r4. Probably, distcc's chost substitution is not yet reliable...