Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Don't install systemd-dummy/systemd-libs-dummy in pkgconfig (Read 2261 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Don't install systemd-dummy/systemd-libs-dummy in pkgconfig

I did complain about this on the mailing list earlier, but I figure I should leave a thread here on the forums as well. Starting with 241.7-2, the systemdcompat package started to install itself in pkgconfig as well. The problem with this change is that build systems (like Meson or CMake) will start to think that you have libsystemd installed and will compile against it. This, naturally, results in broken builds since libsystemd doesn't actually exist on the system. Of course, it's possible to workaround this since we are talking about compiling from source after all. However, I don't really see any value in putting false values in pkg-config. It just breaks builds.

Re: Don't install systemd-dummy/systemd-libs-dummy in pkconfig

Reply #1
Installing the pc file is precisely to trick pkg-config in chroot to pull libsystemd.

The next elogind version will probably provide a symlink, but I haven't decided yet.

On a normal artix system, the pc file is of no consequence if you use a properly written PKGBUILD and proper depends.
It will only pull the pc file, if you explicitly add the systemd dummy packages as a depend or if a depend is an arch depend that has a systemd depend. In such case, a non systemd artix package would be adopted.

Remove libsystemd.pc

Reply #2
Please remove the file /usr/lib/pkgconfig/libsystemd.pc from the package
systemd-dummy, or vlc build (and all other builds that use -lsystemd) will
fail.
Code: [Select]
fatal error: systemd/sd-journal.h: No such file or directory
If you insist on keeping the file, you HAVE TO include ALL systemd
headers!

 

Re: Don't install systemd-dummy/systemd-libs-dummy in pkconfig

Reply #3
Installing the pc file is precisely to trick pkg-config in chroot to pull libsystemd.

The next elogind version will probably provide a symlink, but I haven't decided yet.

On a normal artix system, the pc file is of no consequence if you use a properly written PKGBUILD and proper depends.
It will only pull the pc file, if you explicitly add the systemd dummy packages as a depend or if a depend is an arch depend that has a systemd depend. In such case, a non systemd artix package would be adopted.

I don't understand what value is gained from doing this. Pkg-config is a tool for compiling applications. What possible benefit is there from adding libsystemd to pkg-config when the entire systemd suite is not actually installed? It doesn't necessarily have anything to do with PKGBUILDs either. Compiling anything from source that makes use of a build system that checks pkg-config (like meson or cmake for example) will also fail.

As far as tricking arch packages that have systemd as a dependency goes, the old version was already more than sufficient for that (i.e. chromium/ungoogled-chromium  and wine work just fine). I was always under the impression that this was the primary purpose of this package.

If you insist on keeping the file, you HAVE TO include ALL systemd
headers!

No this will cause problems as well. There is software out there that provide support for systemd or elogind. These are exclusive dependencies (i.e. one or the other). Elogind is officially supported and used by the distro, so it should be the one used in these cases. Actually compiling against libsystemd makes zero sense for an Artix system.

Re: Don't install systemd-dummy/systemd-libs-dummy in pkgconfig

Reply #4
Actually compiling against libsystemd makes zero sense for an Artix system.

To cut it short, it doesn't except for very specific fringe cases.
It is a try to trick the build system to use libsystemd-dummy to pass hard depend checks on libsystemd, if explicity added to the depends, so we don't to have to add elogind specific patches. It will change anyway with upcoming new elogind version.


But, if you try to build a package on your system, you should not have any libdystemd depend or any systemd feature enabled. Under normal conditions, if you try to compile a package, you should not be needing libsystemd-dummy at all, its original use case is for runtime, not build time.

Re: Don't install systemd-dummy/systemd-libs-dummy in pkgconfig

Reply #5
To cut it short, it doesn't except for very specific fringe cases.
It is a try to trick the build system to use libsystemd-dummy to pass hard depend checks on libsystemd, if explicity added to the depends, so we don't to have to add elogind specific patches. It will change anyway with upcoming new elogind version.

But, if you try to build a package on your system, you should not have any libdystemd depend or any systemd feature enabled. Under normal conditions, if you try to compile a package, you should not be needing libsystemd-dummy at all, its original use case is for runtime, not build time.

So reading up on it, I see that v241 elogind is supposed to be fully compatible with anything built with libsystemd which is an interesting turn of events. So when that version comes out, that totally changes the purpose of libsystemd-dummy completely and I guess that should mean I would be able to drop it and still use applications like ungoogled-chromium and wine. I guess if it all works out that way, I'll be satisfied.

Re: Don't install systemd-dummy/systemd-libs-dummy in pkgconfig

Reply #6
My latest update included elogind 241.1-1 and that uninstalled systemd-dummy and systemd-libs-dummy.  Sounds good to me, except chromium (72.0.3626.121-1) will now not install as it requres systemd-dummy.  Do I simply need to wait for a version of chromium with its depends updated, or do I need to use a different browser?

Re: Don't install systemd-dummy/systemd-libs-dummy in pkgconfig

Reply #7
Well chromium is an arch package so that won't be updated anytime soon. However, I would think it should be safe to make the elogind 241 package also provide systemd now since the developer says it's fully ABI compatible. That seems like the correct approach to me. And then systemd-dummy/systemd-libs-dummy can be used strictly for tricking build systems.

Re: Don't install systemd-dummy/systemd-libs-dummy in pkgconfig

Reply #8
Even better, if all works out with compiling against new elogind, we probably drop the dummy packages.
elogind provides systemd-dummy, I was hesitant to also provide a systemd, but I can add it.
This would make libelogind/elogind a full drop in replacement of systemd-libs/systemd.

Re: Don't install systemd-dummy/systemd-libs-dummy in pkgconfig

Reply #9
Alright so elogind 241 works fine on my end, so I'll go ahead and mark this as solved. I had to explicitly call udiskie during the startup of my window manager for automounting usbs for whatever reason (didn't have to do that before), but it's not a big deal. It still is a bit of an open question how upstream software should handle elogind being a drop in replacement now, but I can ask/send patches later. Everything works so it's all good now.