[PATCH] Link against standalone error library if available
parona
parona@protonmail.com
Wed Jan 29 07:57:37 GMT 2025
Hi,
On Monday, January 27th, 2025 at 10:40 PM, Mark Wielaard <mark@klomp.org> wrote:
> My main question/confusion is where the error.h include comes from.
> elfutils does support libcs like musl who don't provide error.h but do
> provide err.h. Then the build should provide its own error function
> through lib/system.h.
Normally there would be no error.h meaning it would use the err.h approach with functions from lib/system.h.
The new variable is that some packages have started to require sys-libs/error-standalone which installs its own error.h, but requiring explicit linkage just like argp-standalone and fts-standalone. This leads to the error.h check to pass and lib/system.h error functions don't get used (ultimately leading to a linking error).
> So maybe our configure check is wrong and it should just test whether
> there is an error.h but also if you can link the result?
Included patch that checks if the symbol is available before defining HAVE_ERROR_H. This would also work, and wouldn't add a new automagic dependency on musl.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Declare-HAVE_ERROR_H-only-if-error-symbol-is-availab.patch
Type: text/x-patch
Size: 1129 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/elfutils-devel/attachments/20250129/995143ba/attachment.bin>
More information about the Elfutils-devel
mailing list