[Vm-dev] Unexpected external library dependencies on linux

Levente Uzonyi leves at caesar.elte.hu
Fri Apr 17 09:02:47 UTC 2020


Hi Tobias,

On Fri, 17 Apr 2020, Tobias Pape wrote:

> 
>
>> On 17.04.2020, at 01:28, David T. Lewis <lewis at mail.msen.com> wrote:
>> 
>> 
>> On Thu, Apr 16, 2020 at 02:55:46PM -0700, tim Rowledge wrote:
>>> 
>>>> On 2020-04-16, at 2:42 PM, David T. Lewis <lewis at mail.msen.com> wrote:
>>>> 
>>>> 
>>>> On Thu, Apr 16, 2020 at 06:53:51PM +0200, Levente Uzonyi wrote:
>>>>> 
>>>>> However, recent VMs (202003050026 from March, 202004160240 from April) 
>>>>> also depend on the following:
>>>>> 
>>>>> libuuid.so.1
>>>>> libutil.so.1
>>>>> libpulse-simple.so.0
>>>>> libasound.so.2
>>>>> 
>>>>> The last two are the most worrying as servers usually don't need or have 
>>>>> sound installed. So, without pulseaudio installed, these VMs won't start.
>>>>> Does anyone know how and why those new dependencies got there?
>>>>> 
>>>>> (These are the dependencies of the VM binary itself not dependencies of 
>>>>> external plugins).
>>>> 
>>>> Hi Levente,
>>>> 
>>>> I don't know the answer to your question, but the sound dependencies are
>>>> likely associated with the VM plugin modules vm-sound-*.so as opposed to
>>>> any of the conventional VM plugins such as UUIDPlugin.so. It is quite
>>>> likely that specifying the -vm-sound-null parameter to the VM will bypass
>>>> any problems. Otherwise, deleting the offending vm-sound-* modules should
>>>> be harmless.
>>> 
>>> Is it possible some edit to the build files made the pulse audio stuff
>>> a default (this was discussed recently) and set it to link to the VM
>>> instead of the (expected to be) separate vm-sound-* module? 
>>> 
>> 
>> Pulse audio /is/ one of the vm-sound-* modules, so the idea there was
>> just to put it first in the search list because that's what makes sense on
>> most Linux platforms today.
>> 
>> But I see now that Levente was asking about library dependencies in the
>> actual VM executable itself (which you can see with "$ ldd squeak" in the
>> libarary directory with the VM and plugins). It has dependencies on the
>> pulse audio and alsa sound libraries. That makes no sense at all, and I
>> don't know the reason for it.
>> 
>> I also see that the plugins have lots of unnecessary dependencies. For
>> example, the UUID plugin depends on pulse audio and alsa sound libraries,
>> which is obviously not right.
>
>
> There might be a problem with the way the linker flags are being collected.
> Namely, that they're built up while configuring the individual plugins but 
> then used throughout the entire process. That bit me for some other flags
> on FreeBSD.

Just checked what library flags are passed when the VM binary is linked, 
and they are:  -ldl -lutil -lpulse-simple -lasound -ldl -lm 
So, you're right, the flags are wrong.


Levente

>
> Unser Bausystem ist Mist ;)
>
> Best regards
> 	-Tobias


More information about the Vm-dev mailing list