[Vm-dev] Unexpected external library dependencies on linux

Levente Uzonyi leves at caesar.elte.hu
Wed Apr 22 20:42:31 UTC 2020

Hi Nicolas

On Wed, 22 Apr 2020, Nicolas Cellier wrote:

> Hi Levente,
> Tthat's unfortunate...
> Stupid guess: could it be related to the fact that we want to export all symbols?
> Anyway, that means that those .so appeared on the command line when they shouldn't.
> We might be able to fix the makefiles... Hmm thru configure, that ain't gonna be easy (not my cup of tea).

I just checked what libraries are passed to the build command when 
building the VM binary. It's independent of the CC flag, so it's the same 
with both gcc and clang:
-ldl -lutil -lpulse-simple -lasound -ldl -lm.
I suspect that gcc is able to detect unused dependencies but clang is not.

Here's what ldd says when clang is used:

$ ldd -u squeak
Unused direct dependencies:

$ ldd -u SHA2Plugin/.libs/SHA2Plugin.so
Unused direct dependencies:

However, both outputs are empty with gcc.

I couldn't find any clang flags to fix this, so I'm afraid the only 
solution is to make autoconf generate proper dependencies because that 
seems to be the actual bug here but it was hidden by gcc.


More information about the Vm-dev mailing list