Skip to content

Commit

Permalink
Add missing library dependencies (bsc#1197120)
Browse files Browse the repository at this point in the history
Short version
-------------

tail -f ~/.y2log & # or
tail -f /var/log/YaST2/y2log &
echo 'Dir (.)' | Y2DISABLELANGUAGEPLUGINS=1 /usr/lib/YaST2/servers_non_y2/ag_udev_persistent

would result in
[liby2] Y2PluginComponent.cc(loadPlugin):234 error loading plugin /usr/lib64/YaST2/plugin/libpy2scr.so.2: /usr/lib64/YaST2/plugin/libpy2scr.so.2: undefined symbol: _ZTI18Y2ComponentCreator

Explanation
-----------

yast-core has for historical reasons many small shared libraries which depend
on one another. They are almost always all loaded together.
So when a library libfoo uses a symbol from another libbar but does not
declare it with a -lbar linker option, it is not a problem because some other
library from the group will -lbar.

Some libraries are plugins, optionally loaded with dlopen.

In https://bugzilla.suse.com/show_bug.cgi?id=1197120
(root cause: unrelated; symptom: error message about jemalloc)
it turned out that stdio-communicating agents
`/usr/lib/YaST2/servers_non_y2/ag_*`, written mostly in Perl, are loading:

1. the Perl-YCP binding (to be able to parse YCP traffic)
2. all the language bindings: Perl, Ruby, Python

(2) is unnecessary and, by dlopen-ing Ruby, produces the jemalloc error.

(2) can be disabled by putting Y2DISABLELANGUAGEPLUGINS=1 into the
environment. When doing that, the missing dependencies in the remaining
libraries are uncovered.
  • Loading branch information
mvidner committed May 4, 2022
1 parent a0c7c5e commit 3c83603
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions libscr/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ AM_CPPFLAGS = \
${Y2UTIL_CFLAGS}

libscr_la_LDFLAGS = -version-info 3:0
libscr_la_LIBADD = \
$(top_srcdir)/libycp/src/libycp.la \
$(top_srcdir)/libycp/src/libycpvalues.la \
${Y2UTIL_LIBS}
6 changes: 5 additions & 1 deletion libycp/src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ libycpvalues_la_LDFLAGS = -version-info 6:0:0
libycpvalues_la_LIBADD = ${Y2UTIL_LIBS}

libycp_la_LDFLAGS = -version-info 5:0:0
libycp_la_LIBADD = ${Y2UTIL_LIBS} ${CRYPTO_LIBS} libycpvalues.la
libycp_la_LIBADD = \
libycpvalues.la \
$(top_srcdir)/liby2/src/liby2.la \
${Y2UTIL_LIBS} \
${CRYPTO_LIBS}

CLEANFILES = parser.output parser.cc scanner.cc $(BUILT_SOURCES)

Expand Down

0 comments on commit 3c83603

Please sign in to comment.