[Vm-dev] Unexpected external library dependencies on linux

Levente Uzonyi leves at caesar.elte.hu
Wed Apr 22 13:31:33 UTC 2020


I just checked the binaries on bintray. The last good version is 
201909292337 (even though it has no plugins), the next one, which is 
broken, is 201910302214.
I checked commits between those dates and the only suspicious one was the 
gcc to clang change.
I compiled a VM on my machine with clang and one with gcc (by 
uncommenting the CC=clang line in mvm), and found that clang causes the 
dependency problems. The gcc version has the correct dependencies, the 
clang one has all the extra dependencies.

I also noticed that the fixes I made[1] to the CryptographyPlugins have not 
been applied. The code in the repository was still generated from an old 
version of the package (CryptographyPlugins-eem.14). And the plugins I 
asked to be included[2] have not been added.


Levente

[1] http://squeaksource.com/Cryptography/CryptographyPlugins-ul.22.mcz
[2] http://lists.squeakfoundation.org/pipermail/vm-dev/2020-March/033114.html

On Fri, 17 Apr 2020, Levente Uzonyi wrote:

>
> 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