mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Mesa DRI drivers path
@ 2014-05-19 12:19 Roger Karis
  2014-06-02  8:27 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Roger Karis @ 2014-05-19 12:19 UTC (permalink / raw)
  To: ptxdist

Hello,

while building an i568-based linux distribution with PTXdist 2014.4 we
discovered a deployment problem involving mesalib and xorg-server.

The xorg-server package uses pkg-config during the prepare phase to
determine the absolute path where DRI drivers are installed. The path
is stored in the variable 'dridriverdir' in dri.pc.

In previous versions of mesalib (e.g. 8.0.3), this path variable was
fully expanded at package preparation time (for example to
/usr/lib/dri). In the current packaged version (10.1.0), this path is
not fully expanded but remains relative to the install prefix (which
is set to /usr at prepare). At install time the prefix is replaced by
${pcfiledir}/../.. which makes the dridriverdir relative to the
sysroot-target folder.

When starting the xorg-server on the target, this means that the
drivers will be loaded from an absolute path using
.../platform-foo/sysroot-target/.... Because the drivers are located
at /usr/lib/dri, this fails with a AIGLX dlopen() error.

The workaround we currently employ is to explicitly specify the driver
directory (--with-dri-driverdir) during mesalib preparation, but of
course it would be much better if there was a proper solution to this
problem.

Thanks,

Roger

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] Mesa DRI drivers path
  2014-05-19 12:19 [ptxdist] Mesa DRI drivers path Roger Karis
@ 2014-06-02  8:27 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2014-06-02  8:27 UTC (permalink / raw)
  To: ptxdist

On Mon, May 19, 2014 at 02:19:02PM +0200, Roger Karis wrote:
> while building an i568-based linux distribution with PTXdist 2014.4 we
> discovered a deployment problem involving mesalib and xorg-server.
> 
> The xorg-server package uses pkg-config during the prepare phase to
> determine the absolute path where DRI drivers are installed. The path
> is stored in the variable 'dridriverdir' in dri.pc.
> 
> In previous versions of mesalib (e.g. 8.0.3), this path variable was
> fully expanded at package preparation time (for example to
> /usr/lib/dri). In the current packaged version (10.1.0), this path is
> not fully expanded but remains relative to the install prefix (which
> is set to /usr at prepare). At install time the prefix is replaced by
> ${pcfiledir}/../.. which makes the dridriverdir relative to the
> sysroot-target folder.
> 
> When starting the xorg-server on the target, this means that the
> drivers will be loaded from an absolute path using
> .../platform-foo/sysroot-target/.... Because the drivers are located
> at /usr/lib/dri, this fails with a AIGLX dlopen() error.
> 
> The workaround we currently employ is to explicitly specify the driver
> directory (--with-dri-driverdir) during mesalib preparation, but of
> course it would be much better if there was a proper solution to this
> problem.

I think setting --with-dri-driverdir explicitly is actually the only sane
way to handle this. The problem ist that pkg-config cannot really handle
sysroot/destdir. Take look at dri.pc there is 'includedir'. That will
probably be uses as '-I$(includedir)' so it needs to bee
'$(SYSROOT)/something'. On the other hand 'dridriverdir' probably used
while installing: "... $(DESTDIR)$(dridriverdir) ..." so it must not
contain '$(SYSROOT)' as you noticed. I've come across cases where such a
variable is used both ways. This is usually where really ugly patches start
to appear. Setting "--with-dri-driverdir" with an appropriate comment is
a rather clean and simple fix in comparison.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-02  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-19 12:19 [ptxdist] Mesa DRI drivers path Roger Karis
2014-06-02  8:27 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox