Add configure warning message if ARCH environment variable is set #17680
+18
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
I encountered an nasty issue when building zfs in the docker container, where environment variable ARCH was set to 'x86_64' value, and it was used for non zfs build related purpose.
Then I got the configure error message like this one:
It confused me, and I spent some time debugging the possible modules build issues.
The fact that on my VMs the same configuration of ZFS built well, initially led me to a wrong investigation path.
hence to save time of other users I'd like to introduce a warning message during the configure phase.
Description
This change adds autotools macros to the config/always-arch.m4 file, which produces the warning message if the ARCH variable is set in the building environment. This helps to avoid issues described above.
How Has This Been Tested?
When ARCH variable is set to some unsupported by kernel Makefile value, like ARCH="x86_64", I got this warning and failure:
If ARCH variable is unset I got:
Types of changes
Checklist:
Signed-off-by
.