Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#77678 - [libxi] Missing dependency: libxfixes

Attached to Project: Arch Linux
Opened by Balló György (City-busz) - Tuesday, 28 February 2023, 19:49 GMT
Last edited by Andreas Radke (AndyRTR) - Friday, 03 March 2023, 14:50 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andreas Radke (AndyRTR)
Laurent Carlier (lordheavy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

xfixes is defined in xi.pc, which means the header file of libxfixes is needed to build anything based on libxi.
Please move libxfixes from makedepends=() to depends=() of libxi.
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Friday, 03 March 2023, 14:50 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.8-3
Comment by Toolybird (Toolybird) - Tuesday, 28 February 2023, 21:04 GMT
> is needed to build anything based on libxi

"build anything" implies makedep. There is no runtime dep on libfixes. There is nothing in the packaging guidelines justifying this so could you please reassess?
Comment by Balló György (City-busz) - Tuesday, 28 February 2023, 21:27 GMT
This is the same as  FS#76959 

And we have other packages in the repository, which are not linked to libxfixes, but specified in their *.pc file:
- libxcomposite
- libxdamage
- libxpresent

So if you say it should be a makedep, then it should be removed from these three packages. But I don't think it would be good. And we have xorgproto dependency of libx11 for the same reason. xorgproto is a build time dependency of anything which depend on X11 libraries.

Maybe we could mention in the guidelines that dependencies from *.pc files might be declared as dependencies.
Comment by Balló György (City-busz) - Tuesday, 28 February 2023, 21:44 GMT
This is the output of pkg-config if libxfixes is not installed:

$ pkg-config --cflags xi
Package xfixes was not found in the pkg-config search path.
Perhaps you should add the directory containing `xfixes.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xfixes', required by 'xi', not found
Comment by loqs (loqs) - Tuesday, 28 February 2023, 22:08 GMT
The dependency is only used in static linking which is not possible with libxi as it does not ship a static library. So if it is removed from the .pc then it does not need to be added to package dependencies.
Comment by Balló György (City-busz) - Tuesday, 28 February 2023, 22:21 GMT
@loqs: Yes, if we remove the 'Requires.private' fields from the .pc files of libxi, libxcomposite and libxpresent packages, then we don't need to add libxfixes dependency for them. It could be a good solution.
Comment by Toolybird (Toolybird) - Tuesday, 28 February 2023, 22:23 GMT
Bottom line (though of course there are exceptions):

- depends -> "run time"
- makedepends -> "build time"

.pc files and header files only matter at "build time" (with a few exceptions). I believe you are overthinking things and therefore creating confusion. Can we please just keep things simple? Probably too much staring at namcap code :)
Comment by Balló György (City-busz) - Tuesday, 28 February 2023, 22:36 GMT
I think if a .pc file is present, then it's expected that all of its dependencies are present. Since we don't split header files into separated '-dev' package, it's expected to build someting on it will be successful without these kind of errors. But the main problem is that pkgconf checks the existence everything declared in 'Requires.private', even if we don't do static builds. So we have to do something with that... And namcap is the best! :)
Comment by Andreas Radke (AndyRTR) - Wednesday, 01 March 2023, 21:52 GMT
Maybe bring this to the ML to find some agreement for how to deal this for all use cases in a common way or leave it up to the maintainers and maybe how to check using namcap in the future to throw some warning.

I prefer a pragmatic way to only add header packages to the depends when a large group of packages would need to add it to the makedepends otherwise like we do with xorgproto.
Comment by Balló György (City-busz) - Thursday, 02 March 2023, 19:35 GMT
I implemented a new rule for this in namcap:
https://gitlab.archlinux.org/pacman/namcap/-/merge_requests/28

And I posted about it on arch-dev-public mailing list:
https://lists.archlinux.org/archives/list/arch-dev-public%40lists.archlinux.org/thread/A2MV7T3NDHVHWX6WHIHH2DKH4YSWSIIX/

The new namcap rule can be tested with my namcap-improved package from AUR:
https://aur.archlinux.org/packages/namcap-improved
Comment by Toolybird (Toolybird) - Thursday, 02 March 2023, 21:59 GMT
Maybe it's just me, but I still fail to see what *.pc files have to do with "run time". Sure, having correct *.pc files is an admirable goal, so I have no objections...as long we are *not* adding obviously unnecessary "run time" depends just to satisfy some problematic "build" tool i.e. pkg-config. To reiterate, *running* a program is one thing, but *building* a pkg is a completely separate exercise.

After all, "Keep It Simple" is literally in the first sentence on the Arch front page and is a foundation principle. Please let's not over-complicate things and become another Debian.

But I do agree with your point in the mailing list posting about systemd and pkg-config and have whinged about it in the past [1].

[1] https://bugs.archlinux.org/task/75194#comment209572

Loading...