Ported applications and dependencies

This clearly confirms your weak background when it comes to building software.

You cannot watch at Kate dependencies apart from KDE. KDE is a rich, complex framework used by a ton of different applications, and it requires ALL its dependencies, because the many applications built upon MAY need them. Kate does not, but no package system can tell this. Thus, on any OS you will need the whole KDE, Period.

2 Likes

If this is true, why could I remove one dependency without anything breaking?

The applications that needs a dependency must declare them. You do not declare dependencies that are not needed because some other application may need them. That is stupidity.

Kate do not need audio- or video codecs so they are not listed as dependencies. An audio- or video editor that needs the codecs adds them as dependencies.

That is how a package system can know what dependencies to install.

Again, if this is true why could I remove one dependency without the application breaking?

From Wikipedia:

“Kate, is a source code editor… intended for software developers.” It’s a jack-of-all-trades with many plugins. So, as a text editor it would probably be considered bloatware.

“KWrite is a lightweight text editor… Kwrite has been based on the Kate text editor and the KParts framework, allowing it to use many of Kate’s features.” This app would be more suitable for general text editing.

KDE / Kwrite forums have numerous complaints about dependencies, especially "unmet dependencies.

1 Like

Ahoy @Null ,

If you are not acquired the meaning of libraries in programming it is not your fault … but whinning against it meaningless.

As generally KDE desktop installed in full on Linux or for what dependency is(/are) marked in the several packages it might get a text editor to have requrement a totally different library and that library bring in an application package as well.
As KDE packages installs generally all altogether it is not relevant.
However you can use a Gnome or other desktop but you want to use a KDE program as such application exists only on KDE desktop - for example a personal finance program you are favoring … then you have to install some related KDE packages as well.
This is because the developer knows what functions or GUI parts coded in another app and they call it from their application. Sometimes it is not such code that provided by the OS libraries or e.g. a general KDE library but it is from an application’s library.
It reduces redundancy in the compiled applications and reduces the time of development as well.
It is like a network management : if an app is capable to download / upload , handle secure network calls, or inbound / outbound queues or uses network protocols, etc.
Some will be available from OS (kernel), some will be copied from other apps’ sources if they cover the function / service the developer needs.
It’s much faster if they reuse the function from an already installed library then to recompile in their application copying all the code.
They will skip it - just reuse the necessary libraries for the required code.
if you are not satisfied or do not want to install such dependencies - you can skip such applications.
As others has suggested yet : there are more ‘lean’ editors to chose from.

2 Likes

Why do you toss away the good explaining answers ?

Sorry, but this answer of you, in me,
summons the picture of a little boy prancing with rage in the middle of a shop, who wants to get something in the shop, no matter what the argument his parents try to say - why it is not possible to get what he wants, and does not listen to well rationalized answers from them.

2 Likes

As one of the package managers … I for one check a build without dependencies, that way haikuporter will inform me on any missing one, x265/gst_plugins are not listed in there, so they must have been pulled in by some other packages. Building without dependencies listed in the recipe sums up the misssing depending packages like:

Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5KIOGui.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libQt5Core.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libQt5Widgets.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libQt5DBus.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5WindowSystem.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5CoreAddons.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5I18n.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Completion.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5KIOCore.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5SonnetUi.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5TextEditor.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5IconThemes.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5ConfigWidgets.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKUserFeedbackWidgets.so.1", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5WidgetsAddons.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5XmlGui.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5ConfigGui.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Codecs.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Parts.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5SyntaxHighlighting.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5AuthCore.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Auth.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5KIOWidgets.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5JobWidgets.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5TextWidgets.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Crash.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Service.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5DBusAddons.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5ConfigCore.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libQt5Network.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libQt5Gui.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Activities.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libQt5Xml.so.5", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKUserFeedbackCore.so.1", but the package doesn't seem to declare that as a requirement
Warning: POLICY WARNING: "/packaging/kate/apps/Kate/Kate" needs library "libKF5Solid.so.5", but the package doesn't seem to declare that as a requirement

Recipes/packages that use x265:

~> inrecipe libx265
/Opslag/haikuports/games-emulation/fceux/fceux-2.6.5.recipe:38: lib:libx265$secondaryArchSuffix
/Opslag/haikuports/games-emulation/fceux/fceux-2.6.5.recipe:55: devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-libs/gst_plugins_bad/gst_plugins_bad-1.22.0.recipe:71: lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-libs/gst_plugins_bad/gst_plugins_bad-1.22.0.recipe:131:        devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-libs/libheif/libheif-1.12.0.recipe:39: lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-libs/libheif/libheif-1.12.0.recipe:63: lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-libs/libheif/libheif-1.12.0.recipe:73: devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:25:  lib:libx265$secondaryArchSuffix = $libVersionCompat
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:33:  devel:libx265$secondaryArchSuffix = $libVersionCompat
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:60:  "$libDir"/libx265.so.$libVersion \
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:76:# depth. Meaning, one has to rebuild libx265 if (s)he wants to produce HEVC
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:81:# The API requires the bit depth parameter, so that libx265 can then chose which
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:102: cp ./build/12bit/libx265.a ./libx265_12b.a
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:118: cp ./build/10bit/libx265.a ./libx265_10b.a
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:127:         -DEXTRA_LIB="libx265_12b.a;libx265_10b.a;libhdr10plus.a" \
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:143: rm -f $libDir/libx265.a
/Opslag/haikuports/media-libs/x265/x265-3.5.recipe:145: prepareInstalledDevelLibs libx265
/Opslag/haikuports/media-video/avidemux/avidemux-2.8.0.recipe:52:       lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/avidemux/avidemux-2.8.0.recipe:79:       devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/ffmpeg/ffmpeg-4.2.9.recipe:81:#          lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/ffmpeg/ffmpeg-4.2.9.recipe:191:#         devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/ffmpeg/ffmpeg5-5.1.4.recipe:82:#         lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/ffmpeg/ffmpeg5-5.1.4.recipe:195:#                devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/ffmpeg/ffmpeg6-6.1.recipe:82:#           lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/ffmpeg/ffmpeg6-6.1.recipe:190:#          devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/handbrake/handbrake-1.5.1.recipe:65:     lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/handbrake/handbrake-1.5.1.recipe:100:    devel:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/vlc/vlc-3.0.20.recipe:81:        lib:libx265$secondaryArchSuffix
/Opslag/haikuports/media-video/vlc/vlc-3.0.20.recipe:137:       devel:libx265$secondaryArchSuffix

Recipes/packages using gst_plugins:

~> inrecipe gst_plugins
/Opslag/haikuports/media-libs/gst_plugins_bad/gst_plugins_bad-1.22.0.recipe:20: gst_plugins_bad$secondaryArchSuffix = $portVersion
/Opslag/haikuports/media-libs/gst_plugins_bad/gst_plugins_bad-1.22.0.recipe:77: gst_plugins_bad${secondaryArchSuffix}_devel = $portVersion
/Opslag/haikuports/media-libs/gst_plugins_bad/gst_plugins_bad-1.22.0.recipe:95: gst_plugins_bad${secondaryArchSuffix} == $portVersion base
/Opslag/haikuports/media-libs/gst_plugins_base/gst_plugins_base-1.22.0.recipe:22:       gst_plugins_base$secondaryArchSuffix = $portVersion
/Opslag/haikuports/media-libs/gst_plugins_base/gst_plugins_base-1.22.0.recipe:61:       gst_plugins_base${secondaryArchSuffix}_devel = $portVersion
/Opslag/haikuports/media-libs/gst_plugins_base/gst_plugins_base-1.22.0.recipe:75:       gst_plugins_base$secondaryArchSuffix == $portVersion base
/Opslag/haikuports/media-libs/gst_plugins_good/gst_plugins_good-1.22.0.recipe:24:       gst_plugins_good$secondaryArchSuffix = $portVersion
/Opslag/haikuports/media-libs/gst_plugins_good/gst_plugins_good-1.22.0.recipe:74:       gst_plugins_good${secondaryArchSuffix}_gtk = $portVersion
/Opslag/haikuports/media-libs/gst_plugins_good/gst_plugins_good-1.22.0.recipe:77:       gst_plugins_good$secondaryArchSuffix
/Opslag/haikuports/media-libs/gst_plugins_ugly/gst_plugins_ugly-1.22.0.recipe:20:       gst_plugins_ugly$secondaryArchSuffix = $portVersion
/Opslag/haikuports/media-sound/kasts/kasts-23.08.4.recipe:24:   gst_plugins_good$secondaryArchSuffix
2 Likes

Which I argue is a bug. Kate do not need x265 so it should not be installed.

Is it possible to resolve Kate’s dependencies and get a dependency tree? That way it should be possible to identify which package(s) causes x265 to be installed.

From my records there isn’t, only way to hunt this down is to do a clean install and install Kate to see what’s actually being installed and what pulls in x265.

EDIT, just checked with a nightly from yesterday, it’s indeed a HUGE list of packages that get installed.

1 Like

https://dev.haiku-os.org/ticket/18718

It seems like the qt5 package is a single monolithic one, providing all the libraries, including multimedia things. It should probably be split into individual packages for each Qt module.

I don’t think that is the problem. The packages are already split. What I believe is happening is that the dependencies are resolved “upwards” the dependency tree. This pulls in packages that are not needed. This is a packaging error, or what I have called misconfiguration.

Let me explain what I mean by this.

Assume that we have a QT5 base package named “QT5”. It has a dependency of “QT5Sound” which has a dependency of “AudioCodecs”. It also has a dependency of “QT5Text” package which has a dependency of “SpellChecker”.

If the application “AQT5TextEditor” has “QT5” as a dependency, it will resolve to installing “QT5Sound” and “AudioCodecs”. This is wrong because of wrongly defined dependencies. It will also pull in “QT5Text” and its dependency “SpellChecker”.

Instead “QT5Sound” should be dependent on “QT5”, but not the other way around. Similarly, “QT5Text” should be dependent on “QT5” but not the other way around. “SpellChecker” should be dependent on “QT5Text” but not the other way around.

That way “AQT5TextEditor” should be dependent on “QT5Text” which will resolve to “QT5” but not “QT5Sound” or “AudioCodecs”. If spell checking functionality is needed, “AQT5TextEditor” should also be dependent on “SpellChecker”.

“AQT5SoundStudio” should be dependent on “QT5Sound”, which will resolve to “QT5”. If audio codecs are needed, “AQT5SoundStudio” could also be dependent on “AudioCodecs”. Since no upwards dependencies exist on “QT5” towards “QT5Text”, it will correctly not be resolved. Since “QT5Text” do not have “SpellChecker” as a dependency, it will also not be resolved.

For the record, Qt5 is not split up into several packages, it has however a few sub-packages, Qt6 on the other hand has several packages seperated from the base one, so maybe in this case anything related to Qt5 will be added to the dependencies for Kate (doubt any one at this moment will tackle Qt5 into splitting it in multiple packages). :slight_smile:

1 Like

This is not how shared libraries works. I know no operating system which uses the way you proposed. This is not an issue however: feel free to create a platform or operating system which behaves this way. Please write detailed reports about your progress and results, so other projects can consider to do the same. Thank you.

4 Likes

This thread is about dependency resolution of packages, which may or may not contain libraries.

If my example was wrong, what was wrong about it and what is correct in Haiku’s case?

What do this have to do with me pointing out a fault in the package resolution of an application in Haiku? I have not complained about the current implementation of packages in Haiku, in fact I have defended it in this thread against other users that says it is “dependency hell” etc and that it cannot be fixed. I have argued that it is only a dependency misconfiguration that can be fixed.

1 Like

Do Haiku’s package team have routines for detecting dependency configuration errors that results in packages that are not needed being resolved?

As mentioned in my first reply here, those policy warnings during build will end up in errors when you run “haikuporter -S” (in strict mode), so only the needed requirements are added, the requirements for the subpackages it relies on are not listed and dealt with those packages.
So if Kate relies on Qt5 (which it does) everything needed for Qt5 will be installed also.

So I interpret that the answer to my question is “no”.

The package system does what the package system is told to do, including human errors. It is very obvious that installation of Kate pulls in a lot of packages that are not needed, caused by human errors.

I think routines (and tools) are needed to eliminate human errors so that package resolution results only in needed packages.

Keep in mind that Qt5 has been ported over a long time ago, back then not everything was split up into multiple packages for it, could this be done better, probably, we just need more people stepping up to help us out at haikuports, at this moment there is still a handfull of people active in there.
So in short, yes it’s a human error probably, splitting up those monster packages can be a pain, just ask the people that worked on Texlive. :slight_smile: Big thumbs up on that one, same goes for mentioning that the Qt6 packages probably wont suffer from this, so once we could get KF6 working with Qt6 those applications will make the move also and things should look up from then.

I think the Haiku package team should create routines for detecting and solving package resolution of packages that are not needed, so that it can be incorporated in the packaging process.

Where should a ticket for this be created, at Haiku’s Trac or HaikuPorts? I can create one at Trac but not at HaikuPorts.