Ported applications and dependencies

(Feel free to merge this into an existing topic if a suitable already exists)

After watching this video (at the 1:17:45 mark) where the user installs Kate on a new system, I reacted to how many dependencies it required that should not be required. This cannot be correctly configured.

Kate is a text editor and should not require installation of a shit ton of audio and video codecs, among other things. Only the bare minimum of dependencies should be installed.

Why is this happening and how can it be fixed?

This is not related to Haiku. Those are KDE packages and their related dependencies.

1 Like

IIRC KDE has libraries in severall “layers” ontop of each other, that is in layer three kate might need two libs, but those then need severall lower leveled libs too, which need severall more because each library wants the dependencies to provide the full library capabilities, not the capabilities the application actually wants.

As for fixing this… no idea, apart from using native software. We also have a scintilla based editor called Koder, working on that could give better results probably.

We could likely mitigate this by porting some of those “higher” libraries away from kde’s libs and instead using haiku kits directly, giving a much flatter dependency tree.

But alas, it’s linux dependency hell, and if you let in the apps the dependency hell follows :frowning:

One could also try statically linking applications or splitting up the libraries more, but we would basically try fixing the entire linux library mess just to get some apps over :g

1 Like

In other words, the packages are misconfigured by Haiku’s packager(s). Because the dependencies should be configured according to each package’s needs, not “the full library capabilities”. If I install a text editor that do not use audio or video codecs, no audio or video codec packages should be installed.

Is there a tool to manually resolve Kate’s dependencies to examine where the misconfiguration is?

No, they are not misconfigured. It’s the dependencies of the library that are the problem, not the dependencies of kate.
Say if i need a functionality from an audiovisual library and depend on it i will intrinsically depend on both audio and video libraries, even if my application only needs audio capabilities.

This is a problem with “library” dependencies in general, not much to be done about that other than making a new model of how such dependencies can be handeled.

The options to mitigate i already laid out above :confused:

but pretty much nothing we can do if we bring over foreign software like this.

Edit: don’t know of a tool currently, but you can view kates dependencies here: https://github.com/haikuports/haikuports/blob/d6bda5d15d9be890b7ec19eb4badf65e4e5b4a55/kde-base/kate/kate-23.08.4.recipe#L75

2 Likes

They are clearly misconfigured. If I install a text editor and it pulls in a shit ton of functionality that the text editor do not need*, then it is a misconfiguration. Period.

The reason for the misconfiguration is another matter and why I posted my question. It can be a dependency configuration mistake or an architectural design flaw. In either way, the result is that functionality that is not needed is being installed.

I have not found information that Kate has functionality that requires audio- or video codecs.

Kate requires Qt framework, IIRC. The Qt framework drags in many dependencies. The HaikuPorts repo is fed by a buildmaster whose instructions are hosted on GitHub. Submit a pull request if you can detangle the requirements.

1 Like

Kate is part of the KDE ecosystem and the KDE Framework is based on Qt. Both are made of many libraries and modules and in a typical KDE-based Linux distribution they should already be installed out of the box.
It’s not surprising that Kate has so many dependencies, it may require even just one function of a specific library which in turn may require other libraries. If Kate requires all of them it’s definitely not packager’s fault. It is what it is. How on earth can this be a misconfiguration?
If you are not happy with installing all this foreign libraries then go with a native solution: give Koder or Genio a try and see if they fit your needs.

4 Likes

I highly doubt that Kate requires audio and video codecs in order to fully function. Please correct me if I am wrong. So unless I am wrong Kate do not require them all.

So then it is a misconfiguration. Stating otherwise is just stupid.

I do not know the reason for the misconfiguration. It can be wrong package dependency configuration, architecture limitations or a combination thereof.

I’d love to hear from someone who knows if and if so what is wrong.

I’m not familiar with Kate, does it have audio feedback? Notifications or onevents like I.e. when you reach end of line? In this case, it will require Phonon which will require in turn Gstreamer…

I doubt that audio feedback requires codecs, especially video ones.

There’s no way to do otherwise, unless you want that each KDE app package embed his own KDE build and his own Qt both build with per app customized options. It is doable but not realistic if you install more than 3 apps. This is the big problem of apps built on a framework and in this case the framework is build on another. Honestly, frameworks are more nice for devs than for users. What are the real benefits from a user point of view? Uniform shortcuts management and look and feel… It is exactly what Haiku provides, so why there’s no point adding complexity for nothing, better use a native app indeed.

2 Likes

I am not complaining that a lot of packages are being installed, which I understand is a requirement when using frameworks. What I am complaining about is installation of packages that I doubt Kate requires or can even utilize.

Installation of packages that are not needed = bug. I do not care about the reason. It is a bug.

This answer is very clear!
Find out the whats wrong and submit a pull request!

Do not ask other people to solve your problem!

1 Like

It may be. But it has nothing to do with my questions.

What do you think this thread is about?

Please quote where I have asked other people to solve my problem.

This thread is full of stupid answers.

1 Like

I find no documentation for “pkgman resolve-dependencies”, more than the argument help, but below is the output for Kate.

What I am asking in this thread is how this dependency list is created and especially how to know which dependency chain results in a particular package. I have marked the codec packages that I have used as an example of packages that I doubt Kate needs or even can use.

For example, how can I figure out how installation of Kate resolves to installing x265-3.5-5-x86_64.hpkg? I doubt Kate can use that package.

~> pkgman resolve-dependencies /boot/system/packages/kate-23.08.4-1-x86_64.hpkg /boot/system/packages
/boot/system/packages/intel_wifi_firmwares-2023_03_06-1-any.hpkg
/boot/system/packages/noto-20200106-1-any.hpkg
/boot/system/packages/noto_sans_cjk_jp-1.004-2-any.hpkg
/boot/system/packages/ralink_wifi_firmwares-2015_02_11-2-any.hpkg
/boot/system/packages/realtek_wifi_firmwares-2019_01_02-1-any.hpkg
/boot/system/packages/ca_root_certificates-2022_10_11-1-any.hpkg
/boot/system/packages/zlib-1.3-1-x86_64.hpkg
/boot/system/packages/libxml2-2.10.4-3-x86_64.hpkg
/boot/system/packages/haiku-r1~beta4_hrev57337-1-x86_64.hpkg
/boot/system/packages/coreutils-9.3-3-x86_64.hpkg
/boot/system/packages/ncurses6-6.3-2-x86_64.hpkg
/boot/system/packages/readline-8.2.001-1-x86_64.hpkg
/boot/system/packages/libiconv-1.17-3-x86_64.hpkg
/boot/system/packages/gettext_libintl-0.21.1-4-x86_64.hpkg
/boot/system/packages/bash-5.2.015-1-x86_64.hpkg
/boot/system/packages/bzip2-1.0.8-3-x86_64.hpkg
/boot/system/packages/gzip-1.12-1-x86_64.hpkg
/boot/system/packages/tar-1.35-2-x86_64.hpkg
/boot/system/packages/unzip-6.10c23-5-x86_64.hpkg
/boot/system/packages/gcc_syslibs-13.2.0_2023_08_10-3-x86_64.hpkg
/boot/system/packages/libedit-20210910_3.1-3-x86_64.hpkg
/boot/system/packages/icu66-66.1-3-x86_64.hpkg
/boot/system/packages/graphite2-1.3.14-2-x86_64.hpkg
/boot/system/packages/libpng16-1.6.40-1-x86_64.hpkg
/boot/system/packages/harfbuzz-8.2.1-1-x86_64.hpkg
/boot/system/packages/freetype-2.12.1-4-x86_64.hpkg
/boot/system/packages/fontconfig-2.13.96-2-x86_64.hpkg
/boot/system/packages/expat-2.5.0-2-x86_64.hpkg
/boot/system/packages/libsolv-0.3.0_haiku_2014_12_22-5-x86_64.hpkg
/boot/system/packages/openssl-1.1.1w-1-x86_64.hpkg
/boot/system/packages/openssl_man-1.1.1w-1-any.hpkg
/boot/system/packages/zstd-1.5.5-1-x86_64.hpkg
/boot/system/packages/pixman-0.42.2-1-x86_64.hpkg
/boot/system/packages/haiku_svg_icon_theme-5.15.2.35-1-any.hpkg
**/boot/system/packages/x264-20220222-1-x86_64.hpkg**
**/boot/system/packages/libmpeg2-0.5.1-7-x86_64.hpkg**
**/boot/system/packages/a52dec-0.8.0-1-x86_64.hpkg**
/boot/system/packages/libtool_libltdl-2.4.6-3-x86_64.hpkg
/boot/system/packages/taglib-1.12-2-x86_64.hpkg
/boot/system/packages/brotli-1.0.9-4-x86_64.hpkg
**/boot/system/packages/wavpack-5.5.0-3-x86_64.hpkg**
/boot/system/packages/soxr-0.1.3-2-x86_64.hpkg
/boot/system/packages/snappy-1.1.10-1-x86_64.hpkg
/boot/system/packages/libvpx-1.11.0-3-x86_64.hpkg
/boot/system/packages/libopenmpt-0.7.2-1-x86_64.hpkg
**/boot/system/packages/lame-3.100-4-x86_64.hpkg**
/boot/system/packages/game_music_emu-0.6.3-2-x86_64.hpkg
/boot/system/packages/fribidi-1.0.13-1-x86_64.hpkg
**/boot/system/packages/fdk_aac-2.0.2-4-x86_64.hpkg**
**/boot/system/packages/speexdsp-1.2.1-1-x86_64.hpkg**
/boot/system/packages/libunistring-1.0-2-x86_64.hpkg
/boot/system/packages/libtasn1-4.18.0-1-x86_64.hpkg
/boot/system/packages/libidn2-2.0.5-3-x86_64.hpkg
/boot/system/packages/gmp-6.3.0-1-x86_64.hpkg
/boot/system/packages/giflib-5.2.1-1-x86_64.hpkg
/boot/system/packages/nghttp2-1.43.0-1-x86_64.hpkg
/boot/system/packages/llvm12_libs-12.0.1-8-x86_64.hpkg
**/boot/system/packages/libogg-1.3.5-2-x86_64.hpkg**
**/boot/system/packages/x265-3.5-5-x86_64.hpkg**
/boot/system/packages/rtmpdump-2.4_20161210-7-x86_64.hpkg
/boot/system/packages/orc-0.4.32-2-x86_64.hpkg
/boot/system/packages/opus-1.3.1-2-x86_64.hpkg
/boot/system/packages/libsrtp2-2.5.0-1-x86_64.hpkg
/boot/system/packages/faad2-2.10.1-1-x86_64.hpkg
/boot/system/packages/faac-1.30-3-x86_64.hpkg
/boot/system/packages/libffi-3.4.2-2-x86_64.hpkg
/boot/system/packages/gettext-0.21.1-4-x86_64.hpkg
/boot/system/packages/minizip-1.2.13-2-x86_64.hpkg
/boot/system/packages/gtest-1.11.0-3-x86_64.hpkg
/boot/system/packages/libgpg_error-1.47-2-x86_64.hpkg
/boot/system/packages/libssh2-1.9.0-2-x86_64.hpkg
/boot/system/packages/libpcre-8.45-3-x86_64.hpkg
/boot/system/packages/aspell-0.60.8-1-x86_64.hpkg
/boot/system/packages/sqlite-3.42.0.0-1-x86_64.hpkg
/boot/system/packages/qsystray-5.15.2.14-1-x86_64.hpkg
/boot/system/packages/openal-1.21.1-5-x86_64.hpkg
/boot/system/packages/libpcre2-10.39-2-x86_64.hpkg
/boot/system/packages/libjpeg_turbo-2.1.4-2-x86_64.hpkg
/boot/system/packages/flite-2.2-2-x86_64.hpkg
/boot/system/packages/double_conversion-3.2.0-1-x86_64.hpkg
/boot/system/packages/xz_utils-5.4.4-1-x86_64.hpkg
**/boot/system/packages/mpg123-1.30.2-1-x86_64.hpkg**
/boot/system/packages/libass-0.17.1-1-x86_64.hpkg
/boot/system/packages/libpsl-0.21.1-3-x86_64.hpkg
/boot/system/packages/nettle-3.7.3-1-x86_64.hpkg
/boot/system/packages/mesa-22.0.5-2-x86_64.hpkg
/boot/system/packages/speex-1.2.1-2-x86_64.hpkg
**/boot/system/packages/flac-1.4.3-1-x86_64.hpkg**
**/boot/system/packages/flac13-1.3.4-2-x86_64.hpkg**
/boot/system/packages/tremor-1.0.0~git-2-x86_64.hpkg
**/boot/system/packages/libvorbis-1.3.7-1-x86_64.hpkg**
**/boot/system/packages/libtheora-1.1.1-8-x86_64.hpkg**
/boot/system/packages/p11_kit-0.23.18.1-2-x86_64.hpkg
/boot/system/packages/libgcrypt-1.10.2-1-x86_64.hpkg
/boot/system/packages/curl-8.1.2-1-x86_64.hpkg
/boot/system/packages/aspell_en-2020.12.07~0-1-any.hpkg
/boot/system/packages/glib2-2.78.0-1-x86_64.hpkg
/boot/system/packages/tiff4-4.4.0-1-x86_64.hpkg
/boot/system/packages/glu-9.0.0-8-x86_64.hpkg
/boot/system/packages/libsndfile-1.1.0-4-x86_64.hpkg
/boot/system/packages/gnutls-3.7.8-1-x86_64.hpkg
/boot/system/packages/libgit2-1.5.0-1-x86_64.hpkg
/boot/system/packages/cairo1.18-1.18.0-1-x86_64.hpkg
/boot/system/packages/glib_networking-2.72.2-2-x86_64.hpkg
/boot/system/packages/libmms-0.6.4-4-x86_64.hpkg
/boot/system/packages/gobject_introspection-1.78.1-1-x86_64.hpkg
/boot/system/packages/shared_mime_info-1.15-2-x86_64.hpkg
/boot/system/packages/libwebp-1.3.2-1-x86_64.hpkg
/boot/system/packages/lcms-2.12-2-x86_64.hpkg
/boot/system/packages/libsdl-1.2.15-19-x86_64.hpkg
/boot/system/packages/assimp-5.3.1-1-x86_64.hpkg
/boot/system/packages/twolame-0.4.0-3-x86_64.hpkg
/boot/system/packages/libinstpatch-1.1.3-4-x86_64.hpkg
/boot/system/packages/libnice-0.1.18-2-x86_64.hpkg
/boot/system/packages/libsoup3-3.2.2-1-x86_64.hpkg
/boot/system/packages/gstreamer-1.22.0-1-x86_64.hpkg
/boot/system/packages/gdk_pixbuf-2.42.9-4-x86_64.hpkg
/boot/system/packages/openjpeg-2.4.0-2-x86_64.hpkg
/boot/system/packages/fluidsynth2-2.1.8-1-x86_64.hpkg
/boot/system/packages/gst_plugins_base-1.22.0-1-x86_64.hpkg
**/boot/system/packages/ffmpeg-4.2.9-1-x86_64.hpkg**
/boot/system/packages/gst_plugins_ugly-1.22.0-1-x86_64.hpkg
/boot/system/packages/gst_plugins_good-1.22.0-2-x86_64.hpkg
/boot/system/packages/gst_plugins_bad-1.22.0-2-x86_64.hpkg
/boot/system/packages/gst_libav-1.22.0-1-x86_64.hpkg
/boot/system/packages/qt5-5.15.11-3-x86_64.hpkg
/boot/system/packages/qthaikuplugins-5.15.2.36-1-x86_64.hpkg
/boot/system/packages/phonon-4.11.1-1-x86_64.hpkg
/boot/system/packages/threadweaver-5.93.0-1-x86_64.hpkg
/boot/system/packages/sonnet-5.93.0-2-x86_64.hpkg
/boot/system/packages/solid-5.93.0-1-x86_64.hpkg
/boot/system/packages/kwindowsystem-5.93.0-1-x86_64.hpkg
/boot/system/packages/kwidgetsaddons-5.93.0-1-x86_64.hpkg
/boot/system/packages/kuserfeedback-1.3.0-1-x86_64.hpkg
/boot/system/packages/ksyntax_highlighting-5.93.0-1-x86_64.hpkg
/boot/system/packages/kitemviews-5.93.0-1-x86_64.hpkg
/boot/system/packages/ki18n-5.93.0-1-x86_64.hpkg
/boot/system/packages/kguiaddons-5.93.0-1-x86_64.hpkg
/boot/system/packages/kdbusaddons-5.93.0-1-x86_64.hpkg
/boot/system/packages/kcoreaddons-5.93.0-1-x86_64.hpkg
/boot/system/packages/kconfig-5.93.0-1-x86_64.hpkg
/boot/system/packages/kcodecs-5.93.0-1-x86_64.hpkg
/boot/system/packages/karchive-5.93.0-1-x86_64.hpkg
/boot/system/packages/attica-5.93.0-1-x86_64.hpkg
/boot/system/packages/phonon_gstreamer-4.10.0-1-x86_64.hpkg
/boot/system/packages/kunitconversion-5.93.0-1-x86_64.hpkg
/boot/system/packages/kjobwidgets-5.93.0-1-x86_64.hpkg
/boot/system/packages/kitemmodels-5.93.0-1-x86_64.hpkg
/boot/system/packages/kcrash-5.93.0-1-x86_64.hpkg
/boot/system/packages/kauth-5.93.0-1-x86_64.hpkg
/boot/system/packages/kactivities-5.93.0-1-x86_64.hpkg
/boot/system/packages/kcompletion-5.93.0-1-x86_64.hpkg
/boot/system/packages/knotifications-5.93.0-1-x86_64.hpkg
/boot/system/packages/kpackage-5.93.0-1-x86_64.hpkg
/boot/system/packages/kservice-5.93.0-2-x86_64.hpkg
/boot/system/packages/kconfigwidgets-5.93.0-1-x86_64.hpkg
/boot/system/packages/kglobalaccel-5.93.0-1-x86_64.hpkg
/boot/system/packages/kiconthemes-5.93.0-1-x86_64.hpkg
/boot/system/packages/kwallet-5.93.0-1-x86_64.hpkg
/boot/system/packages/ktextwidgets-5.93.0-1-x86_64.hpkg
/boot/system/packages/kxmlgui-5.93.0-1-x86_64.hpkg
/boot/system/packages/kbookmarks-5.93.0-1-x86_64.hpkg
/boot/system/packages/kio-5.93.0-2-x86_64.hpkg
/boot/system/packages/kdeclarative-5.93.0-1-x86_64.hpkg
/boot/system/packages/kparts-5.93.0-1-x86_64.hpkg
/boot/system/packages/knewstuff-5.93.0-2-x86_64.hpkg
/boot/system/packages/ktexteditor-5.93.0-3-x86_64.hpkg

It’s almost impossible to avoid transitive dependencies when working with large frameworks. While Kate might not need to play ogg or mp3 files, it does need access to the other parts of the framework which in turn have a dependency on those multimedia libraries.

Contributing to this problem is the immaturity of the Haiku package system. Mainly that it doesn’t currently make use of “suggested” or “optional” packages and so everything is a strict requirement.

The list of dependencies for Kate isn’t all that strange or large. I see an almost identical list from my Arch Linux box but most Linux distros have already included those multimedia libraries and so you don’t notice the dependency.

Running pactree -u kate from Arch:

kate
knewstuff5
kio5
solid5
qt5-base
libjpeg-turbo
glibc
linux-api-headers>=4.10
tzdata
filesystem
iana-etc
xcb-util-keysyms
libxcb
xcb-proto
libxdmcp
xorgproto
libxau
xcb-util-renderutil
libgl
libxext
libx11
mesa
libdrm
libpciaccess
zlib
libelf
bzip2
sh
readline
ncurses
gcc-libs
curl
ca-certificates
ca-certificates-mozilla
ca-certificates-utils>=20181109-3
coreutils
acl
attr
gmp
libcap
pam
libtirpc
krb5
e2fsprogs
util-linux-libs
libldap
libsasl
gdbm
openssl
keyutils
libverto-module-base
libevent
pambase
audit
libcap-ng
libxcrypt
findutils
p11-kit>=0.24.0
libp11-kit=0.25.3-1
libffi
libtasn1
libsystemd.so=0-64
libgcrypt
libgpg-error
lz4
xz
zstd
brotli
libidn2
libunistring
libnghttp2
libpsl
libssh2
libunwind
libxdamage
libxfixes
libxshmfence
libxxf86vm
llvm-libs
libedit
libxml2
icu
lm_sensors
vulkan-icd-loader
wayland
expat
default-cursors
libomxil-bellagio
fontconfig
freetype2
libpng
harfbuzz
libgraphite2.so=3-64
libglib-2.0.so=0-64
libsysprof-capture
pcre2
xdg-utils
file
libseccomp
xorg-xset
libxmu
libxt
libsm
libice
xorg-xprop
shared-mime-info
xcb-util-wm
libxrender
libxi
sqlite
xcb-util-image
xcb-util
tslib
libinput
mtdev
systemd
cryptsetup
device-mapper
popt
json-c
argon2
dbus
kbd
kmod
hwdata
util-linux
shadow
libutempter
libevdev
libwacom
libgudev
libxkbcommon-x11
libxkbcommon
xkeyboard-config
libproxy
duktape
libcups
gnutls
nettle
avahi
libdaemon
double-conversion
md4c
qt5-translations
media-player-info
upower
libimobiledevice
libplist
libusbmuxd
usbmuxd
libusb
udisks2
btrfs-progs
lzo
libatasmart
libblockdev
libbytesize
mpfr
libnvme
mdadm
nss
nspr>=4.35
parted
volume_key
gpgme
gnupg>=2
libksba
libassuan
npth
pinentry
libsecret
tpm2-tss
lvm2
thin-provisioning-tools
libaio
polkit
kjobwidgets5
kcoreaddons5
kwidgetsaddons5
qt5-x11extras
kbookmarks5
kxmlgui5
kglobalaccel5
kdbusaddons5
kconfig5
kcrash5
kwindowsystem5
kiconthemes5
qt5-svg
kconfigwidgets5
kauth5
polkit-qt5
kcodecs5
kguiaddons5
qt5-wayland
qt5-declarative
libxcomposite
ki18n5
iso-codes
karchive5
kitemviews5
libxslt
kwallet5
knotifications5
libcanberra
libvorbis
libogg.so=0-64
libltdl
tar
alsa-lib
alsa-topology-conf
alsa-ucm-conf
libpulse
libasyncns
libsndfile
flac
lame
mpg123
opus
tdb
sound-theme-freedesktop
libdbusmenu-qt5
qt5-speech
qt5-multimedia
gst-plugins-base
gst-plugins-base-libs=1.22.7
gstreamer=1.22.7
libxv
orc
cdparanoia
graphene
libtheora
pango
cairo
pixman
fribidi
libthai
libdatrie
libxft
openal
libxtst
kservice5
qca-qt5
ktextwidgets5
kcompletion5
sonnet5
kded5
kpackage5
attica5
syndication5
ktexteditor5
kparts5
syntax-highlighting5
editorconfig-core-c
kactivities5
kuserfeedback5
hicolor-icon-theme
1 Like

I uninstalled x265 and Kate functioned just fine as far as i can see. Cannot find any functionality within Kate that relates to audio or video. Cannot find any such references in the documentation.

If you managed to uninstall it then it is not a dependency of kate

1 Like

And I argue that that is a bug. The framework should work perfectly fine without multimedia libraries. Kate works perfectly fine without multimedia libraries. So they should not be defined as a dependency of neither the framework or Kate. It should only be defined as a dependency of the packages that actually need the libraries.

I “proved” that x265 is not needed by the framework or Kate by uninstalling it without seemingly breaking any functionality of Kate.

Interesting. This is an example of an architectural problem that I have described in this thread. If this contributes to the problem then it is a bug.

That does not prove anything other than they are also doing their dependency resolution wrong. If a package cannot utilize another package that is resolved thru dependency, then it is a bug. Period.

1 Like