Bug 242236

Summary: devel/libsysinfo: move headers under include/libsysinfo/ prefix
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Warner Losh <imp>
Status: Closed Not Accepted    
Severity: Affects Only Me CC: imp, imp
Priority: --- Keywords: needs-patch, needs-qa
Version: LatestFlags: bugzilla: maintainer-feedback? (imp)
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257398
Attachments:
Description Flags
v0 (only few consumers adapted) none

Description Jan Beich freebsd_committer 2019-11-25 21:55:11 UTC
Ports with USES=localbase and lang/gcc* look under /usr/local/include by default. Unexpected consumers may auto-detect sysinfo() based on sys/sysinfo.h availability but assume the symbol is in libc, not a separate library. In shared libraries underlinking may go unnoticed.

Steps to reproduce:
1. pkg install gcc9 libsysinfo xorg-minimal
2. CC=gcc9 make install clean -C/usr/ports/x11-drivers/xf86-video-intel
3. Adjust xorg.conf to use "intel" driver
4. startx
5. Livelock from VT switch to X server that failed to start
Comment 1 Jan Beich freebsd_committer 2019-11-25 21:58:44 UTC
3.1. Add xorg.conf to use Option "AccelMethod" "SNA"
Comment 2 Warner Losh freebsd_committer 2021-08-10 22:04:11 UTC
I've seen this in the past, and was unsure what the actual ask was, so without a patch I've been ignoring this since it was unclear what the desired change is. The  word 'prefix' at the end is confusing.

Is it really you want to install in ${PREFIX}/include/libsysinfo? And will all the programs that use it really do the right thing?
Comment 3 Jan Beich freebsd_committer 2021-08-10 23:12:28 UTC
Created attachment 227098 [details]
v0 (only few consumers adapted)

(In reply to Warner Losh from comment #2)
> without a patch I've been ignoring this since it was unclear what the desired change is

After the pushback in bug 235240 I didn't want to waste time. Also, upstream Makefile is a bit crufty which makes patching ugly but not impossible.

> Is it really you want to install in ${PREFIX}/include/libsysinfo?

Yep.

> And will all the programs that use it really do the right thing?

Consumers that don't rely on "pkg-config --cflags" or "pkg-config --variable=includedir" may need to be patched. According to "git grep -Fl :devel/libsysinfo | wc -l" there are only 18 of those.

In v0 I've patched only a few lightweight ports. Fixing this port is not my responsibility, so other work takes priority over rebuilding the affected ports and some of their heavy dependencies.
Comment 4 Warner Losh freebsd_committer 2021-08-10 23:14:30 UTC
thanks Jan. I'll work with the other maintainers as needed to get this updated.
Comment 5 Warner Losh freebsd_committer 2021-08-20 13:59:16 UTC
After due consideration, what's there today works. this is an request to rework the port in arbitrary ways, which I'm not ever going to do. There's too many ports that need to change to implement this, and the benefit is not worth it. Since nobody is willing to do the work to make this happen, I'm closing this bug to reduce the noise in my bug list.