-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Remove GCC_HOST_COMPILER_PREFIX as it may be out of sync with GCC_HOST_COMPILER_PATH #39263
Comments
Before that flag was introduced we hard-coded -B/usr/bin, which is arguably significantly worse :) |
The right solution is to actually discover all binutils via PATH, like other build systems would. |
From the comment:
And as explained in #34202:
So I don't see why setting this is still required. And I also disagree with "Before that flag was introduced": That flag was never documented as far as I can tell. So are people supposed to use/rely on it? For another datapoint: In Easybuild (install automation tool) we patch that file to set this to empty since forever as adding Additionally the removal was already accepted and merged (twice!) but has been removed again, I guess due to a mistake as no indication for a reason is visible and the commit message of f057199 is clearly wrong |
We're currently using this in our cross-compilation setup. We use a cross-compiler gcc for manylinux, but the host system's binutils. Removing this will get rolled back until somebody has time to hunt down regressions, root-cause them and then figure out how we'll need to adapt our setup. I think you're right that it can be removed, but it's a bit of work to change & test everything that relies on it. Re: the commit message: what's wrong about it? |
It also looks like there are still open issues in bazel around this: |
Can you clarify what exactly you mean by "this"? Ok just read the linked bazel issue and it seems PATH is discarded by Bazel. Then the comment quoted above ( So at the very least it should be documented because as the linked commit from bazelbuild/bazel#6834 states:
So there are known failures with that added as well as without it. I'm wondering why it is now only done for the CUDA toolchain though and not for anything else.
The commit message is "Merge pull request #34218 from Flamefire:fix_missing_linker_path" but it does revert that merge. Also interesting: The merge commit has a green CI tick while the revert commit has a failed CI tick 🤷 So summary:
Edit: Oh and maybe don't name it |
@Flamefire Could you please let us know if this issue still persists ? If it it resolved then please feel free to move this issue to close status ? Thanks! |
Yes, the comment from #39263 (comment) still applies as-is with latest master. See the summary there |
System information
Describe the problem
The file https://github.com/tensorflow/tensorflow/blob/1588f45ee56860d247a1c26ea228cb3721b4bf1b/third_party/gpus/cuda_configure.bzl has a documented environment variable
GCC_HOST_COMPILER_PATH
to set the path (or name) of a GCC host compiler. However it also uses an undocumented variableGCC_HOST_COMPILER_PREFIX
to get the folder where the gcc binary resides (guessing from name) defaulting to/usr/bin
if it isn't set:tensorflow/third_party/gpus/cuda_configure.bzl
Lines 1028 to 1030 in 1588f45
I have 2 problems with that:
GCC_HOST_COMPILER_PATH
is usedThis leads to issues such as
As reported at easybuilders/easybuild-easyconfigs#7800 (comment)
I hence propose to either completely remove that variable in favor of deriving its value from
GCC_HOST_COMPILER_PATH
or properly documenting it with a better default.It does not seem to be required at all so it's likely best to just remove it. This should have been done by #34218 but for some reason that merge was reverted with a very misleading commit title: f057199
@gunan @mihaimaruseac please take a look what went wrong
The text was updated successfully, but these errors were encountered: