On Sun, Nov 5, 2017 at 2:53 PM, Samuel Thibault <[email protected]> wrote:
> László Böszörményi (GCS), on dim. 05 nov. 2017 14:28:33 +0100, wrote:
>>  On kfreebsd-* and hurd-i386 architectures libexpat uses
>> arc4random_buf() from libbsd and thus links to it. Hence anything
>> links to expat on these architectures, may use this function
>> indirectly. If you don't link to libbsd and / or the .so symlink is
>> not present, you will get undefined symbol of the mentioned function.
>
> Really? Such undefined symbols only happen when the application call the
> function directly, not when they link against a library which call the
> function.
 I meant maybe the application need to init that random generator
somehow - otherwise you are right, if the application itself doesn't
call the function, there's no reason for the linker to search for it.
The thing brothers me is why I've exposed the libbsd-dev on
kfreebsd-*: was it the reason the application wanted to initialize
that random generator or only because the left in .la files forced the
libbsd linking. Let me do the practical test; will do test compilation
on Hurd with the removed .la files and act accordingly - but you are
probably right and expat itself handle everything related to libbsd.

Thanks for the talk,
Laszlo/GCS

Reply via email to