patchelf icon indicating copy to clipboard operation
patchelf copied to clipboard

build-id.sh fails when `LANG` ≠ `C`

Open Mikael-Lovqvist opened this issue 1 year ago • 0 comments

Describe the bug

When building on a system with a non C locale, invoking build-id.sh causes pattern matching to fail which fails the test and hence the build.

Steps To Reproduce

The problem can be reproduced using sv_SE.UTF-8 for locale like so:

$ make LANG=sv_SE.UTF-8 check

Expected behavior

Test should succeed no matter the locale when invoking make.

patchelf --version output

config.log contains

#define VERSION "0.17.2"

if that helps.

Additional context

When grepping for output in software that doesn't have a strict structure (which generally should be avoided), one way to minimize risk of error is to force LANG=C for consistent output. This might be done in some cmake shenanigans, in the build-id.sh script or somewhere else. To circumvent the problem one can make sure to invoke everything with LANG=C.

Mikael-Lovqvist avatar Jul 20 '24 00:07 Mikael-Lovqvist