Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644694 - media-tv/plex-media-server-1.10.0 registers its .so files in ldconfig
Summary: media-tv/plex-media-server-1.10.0 registers its .so files in ldconfig
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jonathan Vasquez (RETIRED)
Depends on:
Reported: 2018-01-15 21:02 UTC by wyvern5
Modified: 2018-01-31 05:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description wyvern5 2018-01-15 21:02:27 UTC
Desired behavior:
- Install Plex. Plex uses its own libraries, and nothing else does.

Actual behavior:
- Install Plex. Plex's libraries are made available for anyone to link against, leading to crashes when those libraries are actually used.

It seems really bad to have plex basically offer its own little mini-OS worth of libraries to the entire system. I definitely don't want plex's libexpat, for instance. I found this when it caused the python interpreter to crash because `imageio` was loading plex's copy of ``, which did not play well.

# ldconfig -p | grep plexmedia (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/ (libc6,x86-64) => /usr/lib64/plexmediaserver/
Comment 1 Jonathan Vasquez (RETIRED) gentoo-dev 2018-01-19 02:07:18 UTC
Thanks for reporting this, I'll get to it when I get a chance. If you can submit patches, that would expedite this process.
Comment 2 wyvern5 2018-01-24 15:38:40 UTC
Simply commenting out the LDPATH line (the only line) in /etc/env.d/66plex and running env-update solved the issue for me. 

With or without that change, revdep-rebuild still thinks that plex-media-server needs to be rebuilt.
Comment 3 Dudu Edri 2018-01-28 19:14:54 UTC
Can confirm that commenting out LDPATH in /etc/env.d/66plex solves the registration of plex's libraries to the entire system.

There one more problem - revdep-rebuild tells that several libraries search for "", and a rebuild doesn't help:
 * Broken files that require: (64 bits)
        * /usr/lib64/plexmediaserver/Resources/Python/lib/python2.7/lib-dynload/
        * /usr/lib64/plexmediaserver/Resources/Python/lib/python2.7/lib-dynload/

ldd's output for one of the files:

ldd: warning: you do not have execution permission for `/usr/lib64/plexmediaserver/Resources/Python/lib/python2.7/lib-dynload/' (0x00007ffe80df0000) => not found => /usr/lib64/ (0x00007fec15a96000) => /lib64/ (0x00007fec15876000) => /lib64/ (0x00007fec154b4000) => /lib64/ (0x00007fec152b0000) => /lib64/ (0x00007fec150ad000) => /lib64/ (0x00007fec14d63000)
        /lib64/ (0x00007fec16074000)

Those file aren't being linked against the correct library (actually, they aren't being compiled locally, they are just extracted from a DEB package - so that's why a rebuild doesn't help).
Comment 4 Jonathan Vasquez (RETIRED) gentoo-dev 2018-01-28 23:12:52 UTC
Hey folks,

I've fixed and tested the issue with your fix. Seems good. I pushed it in

That also stabilizes 1.10.1.

As for the other issue, you could open another bug report if you want, I am aware of that issue but it hasn't caused any issues with other applications and at this point I consider it cosmetic. It probably would be more complicated to try and split this from being packaged by upstream vs use rebuilding it. Due to this, I don't feel I want to spend time trying to do this, and I would also like to stay close to upstream. Hopefully as we move towards a more containerized future, these issues wouldn't pop up (Since with containers, upstream is free-to & encouraged to package all of their stuff in their own container).

- Jonathan