Skip to content

Add LC_ALL=C to cc-objdump-file-format.sh for awk to work properly #614

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

Merged
merged 1 commit into from
Aug 21, 2025

Conversation

elkcl
Copy link

@elkcl elkcl commented Aug 20, 2025

If a non-English locale is used, awk fails to properly extract the file format from objdump output, leading to build errors such as this:

arch/lkl/Kconfig:42: syntax error
arch/lkl/Kconfig:41: invalid statement

The problem is fixed by making sure that objdump uses the C locale.

Copy link

@ddiss ddiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, although I'm a little confused as to why other $OBJDUMP output parsers (e.g. arch/x86/tools/Makefile) don't need this. Which locale are you using?

@elkcl
Copy link
Author

elkcl commented Aug 20, 2025

I'm using ru_RU.UTF-8. Fixing that file was enough for the build to succeed in my case, so I didn't really check any other objdump/awk passes.

As far as I can see, arch/x86/tools/chkobjdump.awk and arch/x86/tools/objdump_reformat.awk both don't mention any locale-dependent strings, so that's probably why they're working fine

Copy link
Member

@tavip tavip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @elkcl ! Please add the Signed-off-by: tag to the commit message.

@elkcl elkcl force-pushed the file-format-locale-patch branch from 23d8925 to bd914ba Compare August 20, 2025 19:23
@elkcl
Copy link
Author

elkcl commented Aug 21, 2025

ok, done!

@tavip
Copy link
Member

tavip commented Aug 21, 2025

Thanks @elkcl, could you also please fix the author name in the git commit to avoid checkpatch complaining?

WARNING: From:/Signed-off-by: email name mismatch: 'From: Elk Cloner <[email protected]>' != 'Signed-off-by: Ilya Denisyev <[email protected]>'

@elkcl elkcl force-pushed the file-format-locale-patch branch 2 times, most recently from 26ac604 to a0b4877 Compare August 21, 2025 19:42
@elkcl elkcl force-pushed the file-format-locale-patch branch from a0b4877 to 49f9937 Compare August 21, 2025 19:44
@elkcl
Copy link
Author

elkcl commented Aug 21, 2025

Sure, should be good to go now

@tavip tavip merged commit 9f876c1 into lkl:master Aug 21, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants