Bug 11591 - [pkgconf 1.5.3] xserver OpenGL support is missing
Summary: [pkgconf 1.5.3] xserver OpenGL support is missing
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-06 20:38 UTC by romain.naour
Modified: 2019-01-14 21:32 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description romain.naour 2019-01-06 20:38:01 UTC
On current Buildroot master.

There is a regression with OpenGL support with a xserver, the path to the dri modules is prefixed with the sysroot at runtime:

From Xorg.0.log:
(EE) AIGLX error: dlopen of /home/naourr/buildroot-test/test/arete/host/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/lib/dri/r600_dri.so failed (/home/naourr/buildroot-test/test/arete/host/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/lib/dri/r600_dri.so: cannot open shared object file: No such file or directory)
(II) GLX: no usable GL providers found for screen 0

xserver hardcode this path in DRI_DRIVER_PATH which come from dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri`

dri.pc:
prefix=/usr
exec_prefix=/usr
libdir=${exec_prefix}/lib
includedir=${prefix}/include
dridriverdir=${libdir}/dri

Name: dri
Description: Direct Rendering Infrastructure
Version: 18.2.8
Requires.private: libdrm >= 2.4.75
Cflags: -I${includedir}

(y_morin):
"That's because dridriverdir=${libdir}/dri  and libdir *is* a sysroot-prefixed variable.
And sysroot prefix is added at the moment the variable is evaluated. I.e. libdir first gets evaluated from ${exec_prefix}/lib, then libdir is eligible to sysroot-prefixing, so sysroot is prefixed.
Then dridriverdir is evaluated from ${libdir}/dri and libdir already has the sysroot in it."

I tested to revert back to the old version of pkgconf and dridriverdir is just "/usr/lib/dri"

The issue is present even with commit 7125fc5c1a8a96ff8eee057789358702e1b55835 "package/pkgconf: add patch to restore pre-1.5.3 behavior for sysroot prefixing".

Romain