Project

General

Profile

Logged in as brainvisa
Watch Actions

Defect #14673

closed

Missing shared library dependencies in the installer packages under Linux

Added by Leprince, Yann about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Start date:
06/04/2016
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

I installed BrainVISA using the installer under Arch Linux (brainvisa_installer-4.5.0-linux64-glibc-2.15-online), and I get missing shared libraries when launching BrainVISA:

ImportError: libaudio.so.2: cannot open shared object file: No such file or directory

As this dependency does not seem to be very useful anyway (audio in BrainVISA?) maybe there is some way of avoiding it? I know that passing the flag -Wl,--as-needed can avoid adding unused libraries as dependencies.

I made a small script to list the shared library dependencies that are not present in the packages:

PACKAGE_DIR=/home/yleprince/brainvisa/pkg-4.5.0
LD_LIBRARY_PATH="$PACKAGE_DIR/lib" find "$PACKAGE_DIR" -name '*.so' -exec ldd {} \; > libs.txt
LD_LIBRARY_PATH="$PACKAGE_DIR/lib" find "$PACKAGE_DIR/bin/real-bin" -execdir ldd {} \; > execs.txt
grep -vhF "$PACKAGE_DIR" libs.txt execs.txt | sed 's/ (0x[0-9a-f]\+)$//' | sort | uniq

The results for my system follow. Many of these libraries are probably best kept as dependencies, but it could be useful to bundle those that are really needed, and not present everywhere?

    libapt-inst.so.1.4 => not found
    libapt-pkg.so.4.12 => not found
    libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0
    libaudio.so.2 => not found
    libavcodec.so.53 => not found
    libavformat.so.53 => not found
    libavutil.so.51 => not found
    libBLT.2.4.so.8.5 => not found
    libbonobo-2.so.0 => not found
    libbonobo-activation.so.4 => not found
    libbonoboui-2.so.0 => not found
    libcap.so.2 => /usr/lib/libcap.so.2
    libCosmo.so.5.8 => not found
    libcrypt.so.1 => /usr/lib/libcrypt.so.1
    libc.so.6 => /usr/lib/libc.so.6
    libcurl-gnutls.so.4 => not found
    libdatrie.so.1 => /usr/lib/libdatrie.so.1
    libdb-5.1.so => not found
    libdbus-1.so.3 => /usr/lib/libdbus-1.so.3
    libdbus-glib-1.so.2 => /usr/lib/libdbus-glib-1.so.2
    libdhash.so.1 => /usr/lib/libdhash.so.1
    libdl.so.2 => /usr/lib/libdl.so.2
    libexslt.so.0 => /usr/lib/libexslt.so.0
    libffi.so.6 => /usr/lib/libffi.so.6
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1
    libfreetype.so.6 => /usr/lib/libfreetype.so.6
    libgconf-2.so.4 => /usr/lib/libgconf-2.so.4
    libgcrypt.so.11 => not found
    libgcrypt.so.20 => /usr/lib/libgcrypt.so.20
    libgdbm.so.3 => not found
    libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0
    libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0
    libgd.so.2 => not found
    libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0
    libgirepository-1.0.so.1 => /usr/lib/libgirepository-1.0.so.1
    libgl2ps.so.0 => not found
    libglade-2.0.so.0 => /usr/lib/libglade-2.0.so.0
    libGLdispatch.so.0 => /usr/lib/libGLdispatch.so.0
    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0
    libGL.so.1 => /usr/lib/libGL.so.1
    libGLU.so.1 => /usr/lib/libGLU.so.1
    libGLX.so.0 => /usr/lib/libGLX.so.0
    libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0
    libgmp.so.10 => /usr/lib/libgmp.so.10
    libgnome-2.so.0 => not found
    libgnomecanvas-2.so.0 => not found
    libgnomeui-2.so.0 => not found
    libgnomevfs-2.so.0 => not found
    libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0
    libgpg-error.so.0 => /usr/lib/libgpg-error.so.0
    libgraphite2.so.3 => /usr/lib/libgraphite2.so.3
    libgstapp-0.10.so.0 => /usr/lib/libgstapp-0.10.so.0
    libgstbase-0.10.so.0 => /usr/lib/libgstbase-0.10.so.0
    libgstinterfaces-0.10.so.0 => /usr/lib/libgstinterfaces-0.10.so.0
    libgstpbutils-0.10.so.0 => /usr/lib/libgstpbutils-0.10.so.0
    libgstreamer-0.10.so.0 => /usr/lib/libgstreamer-0.10.so.0
    libgstvideo-0.10.so.0 => /usr/lib/libgstvideo-0.10.so.0
    libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0
    libgtksourceview-2.0.so.0 => /usr/lib/libgtksourceview-2.0.so.0
    libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0
    libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0
    libICE.so.6 => /usr/lib/libICE.so.6
    liblcms.so.1 => /usr/lib/liblcms.so.1
    libldb.so.1 => /usr/lib/libldb.so.1
    liblz4.so.1 => /usr/lib/liblz4.so.1
    liblzma.so.5 => /usr/lib/liblzma.so.5
    libminc2.so.1 => not found
    libmng.so.1 => not found
    libmpi_cxx.so.0 => not found
    libmpi.so.0 => not found
    libm.so.6 => /usr/lib/libm.so.6
    libmysqlclient.so.18 => not found
    libncursesw.so.5 => not found
    libncursesw.so.6 => /usr/lib/libncursesw.so.6
    libnetcdf_c++.so.5 => not found
    libnetcdf.so.6 => not found
    libnewt.so.0.52 => /usr/lib/libnewt.so.0.52
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libnspr4.so => /usr/lib/libnspr4.so
    libnss3.so => /usr/lib/libnss3.so
    libnssutil3.so => /usr/lib/libnssutil3.so
    libopenjpeg.so.2 => not found
    libORBit-2.so.0 => not found
    libORBit-imodule-2.so.0 => not found
    liborc-0.4.so.0 => /usr/lib/liborc-0.4.so.0
    libpam_misc.so.0 => /usr/lib/libpam_misc.so.0
    libpam.so.0 => /usr/lib/libpam.so.0
    libpanelw.so.5 => not found
    libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0
    libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0
    libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0
    libpcre.so.1 => /usr/lib/libpcre.so.1
    libpcre.so.3 => not found
    libpgm-5.1.so.0 => not found
    libpixman-1.so.0 => /usr/lib/libpixman-1.so.0
    libplc4.so => /usr/lib/libplc4.so
    libplds4.so => /usr/lib/libplds4.so
    libpng16.so.16 => /usr/lib/libpng16.so.16
    libpopt.so.0 => /usr/lib/libpopt.so.0
    libpq.so.5 => not found
    libpthread.so.0 => /usr/lib/libpthread.so.0
    libpyglib-2.0-python2.7.so.0 => not found
    libpyglib-gi-2.0-python2.7.so.0 => not found
    libQtAssistantClient.so.4 => not found
    libreadline.so.6 => /usr/lib/libreadline.so.6
    libresolv.so.2 => /usr/lib/libresolv.so.2
    librt.so.1 => /usr/lib/librt.so.1
    libselinux.so.1 => not found
    libslang.so.2 => /usr/lib/libslang.so.2
    libSM.so.6 => /usr/lib/libSM.so.6
    libswscale.so.2 => not found
    libsystemd.so.0 => /usr/lib/libsystemd.so.0
    libtalloc.so.2 => /usr/lib/libtalloc.so.2
    libtcl8.5.so.0 => not found
    libtevent.so.0 => /usr/lib/libtevent.so.0
    libthai.so.0 => /usr/lib/libthai.so.0
    libtinfo.so.5 => not found
    libtk8.5.so.0 => not found
    libumfpack.so.5.4.0 => not found
    libunistring.so.0 => not found
    libutil.so.1 => /usr/lib/libutil.so.1
    libuuid.so.1 => /usr/lib/libuuid.so.1
    libvolume_io2.so.1 => not found
    libVPIC.so.5.8 => not found
    libvtkalglib.so.5.8 => not found
    libvtkWidgetsAddOn.so => not found
    libX11.so.6 => /usr/lib/libX11.so.6
    libxapian.so.22 => not found
    libXau.so.6 => /usr/lib/libXau.so.6
    libxcb-render.so.0 => /usr/lib/libxcb-render.so.0
    libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0
    libxcb.so.1 => /usr/lib/libxcb.so.1
    libXcomposite.so.1 => /usr/lib/libXcomposite.so.1
    libXcursor.so.1 => /usr/lib/libXcursor.so.1
    libXdamage.so.1 => /usr/lib/libXdamage.so.1
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6
    libXext.so.6 => /usr/lib/libXext.so.6
    libXfixes.so.3 => /usr/lib/libXfixes.so.3
    libXinerama.so.1 => /usr/lib/libXinerama.so.1
    libXi.so.6 => /usr/lib/libXi.so.6
    libXrandr.so.2 => /usr/lib/libXrandr.so.2
    libXrender.so.1 => /usr/lib/libXrender.so.1
    libxslt.so.1 => /usr/lib/libxslt.so.1
    libXt.so.6 => /usr/lib/libXt.so.6
    libyaml-0.so.2 => not found
    libz.so.1 => /usr/lib/libz.so.1

Actions #1

Updated by Riviere, Denis about 8 years ago

For libaudio, anatomist may make some kind of sound (in a very very non-needed part...) so when it is built with, it is a required dependency. So the best is probably that I remove it or load dynamically libaudio in anatomist.

For other libs, the situation is often not so clear:
  • some may depend on the system, on hardware, drivers etc like libGL, so this one must normally not be shipped with brainvisa
  • many of other missing libs are ony used in some python modules that we are not using at all. As python provides links to many C libs, and generally to almost all of the system, the full dependencies of python would be, more or less, a whole linux system. We don't really want to package libs we are not using (many of them are big)... The "real" problem here is that we ship python as a single package instead of hundreds of different ones like on most linux distribs. But it's too much work to split it into so many pieces and dependencies...
Actions #2

Updated by Riviere, Denis about 8 years ago

Actually Qt is already linked against libaudio, so it's a required dependency of Qt:

ldd /usr/lib/x86_64-linux-gnu/libQtGui.so.4 | fgrep audio
        libaudio.so.2 => /usr/lib/x86_64-linux-gnu/libaudio.so.2 (0x00007fecacc26000)

It's strange that libaudio is not installed on some systems...

Actions #3

Updated by Leprince, Yann about 8 years ago

Well, libaudio is not a general-purpose audio library, but it is only used for some weird network-based audio setups, so I guess that is why it is not installed on many systems.

The problem with libaudio is that it isn’t even packaged on some distributions (including Arch and Gentoo), so that we cannot simply tell the user to install the relevant package. Then, I see two possible solutions for addressing this problem:
  1. Quick, sub-optimal solution: package libaudio.so.2 with the Qt libraries;
  2. More involved solution: ship a version of Qt that only has useful features enabled, however this means that we cannot simply use the Debian/Ubuntu package but probably have to compile it from source…
Actions #4

Updated by Riviere, Denis about 8 years ago

The problem with libaudio is that it isn’t even packaged on some distributions (including Arch and Gentoo),

So How does Qt work on such distributions ? Without audio support ?

Moreover libaudio has neither cmake config nor pkg-config setup, so we will have to do it on our own.

I still prefer solution 1 because when possible we ship the Qt lib of the system we build on, it allows system compatibility for the same system, and avoids the work of rebuilding Qt with all fancy options. And then we ship a full-featured Qt.

By the way, I think the Mandriva-based distrib of Brainvisa doesn't have this audio support/dependency.

Actions #5

Updated by Leprince, Yann about 8 years ago

Yes, it probably supports audio through other libraries, only not the esoteric network-based setup of libaudio

By the way, I hit another missing library on my Arch system: libtinfo.so.5. It is required by the packaged version of libreadline.so.6, which is itself needed by the shell (system bash); as a result all shell scripts fail to run when LD_LIBRARY_PATH points to the package’s lib/ directory.

The situation with libtinfo is a little different compared to libaudio: this library is part of the ncurses library, but there is the option to build it separately during ncurses configuration. While Debian chose to separate the library, Arch chose not to so it does not exist on this distribution. Gentoo provides a choice, but even when libtinfo is there the shell fails with undefined symbol: rl_signal_event_hook. Life is hard… In the meantime I installed an Ubuntu virtual machine to run BrainVISA on my Arch workstation.

So I guess that for this case the right thing would be to include libtinfo.so.5 in the package that already distributes libreadline?

Actions #6

Updated by Riviere, Denis over 6 years ago

  • Target version set to brainvisa-4.6
Actions #7

Updated by Riviere, Denis over 6 years ago

  • Status changed from New to Closed
Watch Actions

Also available in: Atom PDF