Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 704738 - dev-java/openjfx-11.0.3_p1: libgstreamer-lite.so dependency not resolvable via DT_RUNPATH
Summary: dev-java/openjfx-11.0.3_p1: libgstreamer-lite.so dependency not resolvable vi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal QA (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 704736 (view as bug list)
Depends on:
Blocks: 704320
  Show dependency tree
 
Reported: 2020-01-04 00:47 UTC by Zac Medico
Modified: 2021-04-16 08:32 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2020-01-04 00:47:56 UTC
As shown in /var/db/pkg/dev-java/openjfx-11.0.3_p1/NEEDED.ELF.2, the libfxplugins.so and libavplugin.so files lack an $ORIGIN setting in their DT_RUNPATH field:

> X86_64;/usr/lib64/openjfx-11/lib/libfxplugins.so;;;libgstreamer-lite.so,libgobject-2.0.so.0,libglib-2.0.so.0,libc.so.6;x86_64
> X86_64;/usr/lib64/openjfx-11/lib/libavplugin.so;;;libgstreamer-lite.so,libgobject-2.0.so.0,libglib-2.0.so.0,libavcodec.so.58,libavformat.so.58,libc.so.6;x86_64
> X86_64;/usr/lib64/openjfx-11/lib/libgstreamer-lite.so;;;libasound.so.2,libgobject-2.0.so.0,libgmodule-2.0.so.0,libgthread-2.0.so.0,libglib-2.0.so.0,libm.so.6,libpthread.so.0,libc.so.6;x86_64
> X86_64;/usr/lib64/openjfx-11/lib/libjfxmedia.so;;$ORIGIN;libgstreamer-lite.so,libgobject-2.0.so.0,libgmodule-2.0.so.0,libgthread-2.0.so.0,libglib-2.0.so.0,libpthread.so.0,libc.so.6,ld-linux-x86-64.so.2;x86_64

The problem can be corrected by running patchelf --set-rpath '$ORIGIN' on libfxplugins.so and libavplugin.so, so that the libgstreamer-lite.so dependency is resolvable by normal means.

I'd like to get things like this fixed, since eventually I'd like to enable soname dependency resolution by default (bug 687956), and unsatisfied soname dependencies break the dependency graph for emerge --ignore-soname-deps=n --usepkgonly commands.
Comment 1 Georgy Yakovlev archtester gentoo-dev 2020-01-22 00:55:04 UTC
*** Bug 704736 has been marked as a duplicate of this bug. ***
Comment 2 Georgy Yakovlev archtester gentoo-dev 2020-01-22 01:05:57 UTC
I don't want to mess with patchelf, as it's a source build, I can patch Makefiles

modules/javafx.media/src/main/native/jfxmedia/projects/linux/Makefile

sets this

LDFLAGS := -Wl,-rpath,\$$ORIGIN -L$(BUILD_DIR) -lgstreamer-lite $(PACKAGES_LIBS) ...


idk if it's correct or not.
Comment 3 Georgy Yakovlev archtester gentoo-dev 2020-04-21 22:59:21 UTC
looks like I figured it out.

for libs linking to other libs we have to use -rpath-link,\$$ORIGIN instead of rpath.

bumping now, should be fixed, please test if you can.
Comment 4 Larry the Git Cow gentoo-dev 2020-04-21 23:00:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0debb86288b13270d7b3d6a08af8f7e3e6566270

commit 0debb86288b13270d7b3d6a08af8f7e3e6566270
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-04-21 22:58:19 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-04-21 22:59:47 +0000

    dev-java/openjfx: bump to 11.0.7_p1
    
    modify patch in place to fix rpath issue
    
    Bug: https://bugs.gentoo.org/704738
    Package-Manager: Portage-2.3.89, Repoman-2.3.20
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 dev-java/openjfx/Manifest                          |   1 +
 .../openjfx/files/11/respect-user-cflags.patch     |   2 +-
 dev-java/openjfx/openjfx-11.0.7_p1.ebuild          | 221 +++++++++++++++++++++
 3 files changed, 223 insertions(+), 1 deletion(-)
Comment 5 Zac Medico gentoo-dev 2020-04-22 00:49:19 UTC
(In reply to Georgy Yakovlev from comment #3)
> looks like I figured it out.
> 
> for libs linking to other libs we have to use -rpath-link,\$$ORIGIN instead
> of rpath.
> 
> bumping now, should be fixed, please test if you can.

I've tested 11.0.7_p1 and portage is happy with it. Thank you!

However, the rpath setting appears to be ineffective, since it does now show in NEEDED.ELF.2
Comment 6 Zac Medico gentoo-dev 2020-04-22 00:53:37 UTC
comment #5 continued...

However, the rpath setting appears to be ineffective, since it does now show in NEEDED.ELF.2 and ldd still complains:

> ldd /usr/lib64/openjfx-11/lib/libavplugin.so | grep 'not found'
>         libgstreamer-lite.so => not found

Meanwhile, portage is totally happy with this situation due to changes from bug 715162 and bug 705736.
Comment 7 Zac Medico gentoo-dev 2020-04-22 01:02:33 UTC
It's worth noting that, with 11.0.7_p1, libgstreamer-lite.so now has an DT_SONAME which it it did not have before. However, portage does not require the DT_SONAME setting since bug 715162. If the DT_SONAME setting is missing, then portage simply infers an implicit soname from the basename (which is consistent with dynamic linker behavior in practice).