Bug 70264 - EGL pkg-config does not provide correct cflags
Summary: EGL pkg-config does not provide correct cflags
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: EGL (show other bugs)
Version: 9.2
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-08 00:04 UTC by peasteven
Modified: 2015-11-18 11:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description peasteven 2013-10-08 00:04:39 UTC
The current egl.pc has the following line:

    "Cflags: -I${includedir}"

This results in the following pkg-config output, which results in missing <EGL/egl.h> errors:

    $ pkg-config egl --cflags
    -I/usr/include/libdrm

A fix is to add a trailing slash on the end:

    "Cflags: -I${includedir}/"

This results in the following output:

    $ pkg-config egl --cflags
    -I/usr/include/ -I/usr/include/libdrm

Which will allow compilation with the usual <EGL/egl.h>
Comment 1 Pekka Paalanen 2013-10-08 06:34:58 UTC
That proposed fix does not sound right. If you look at pkg-config manual, there are the PKG_CONFIG_ALLOW_SYSTEM_CFLAGS and PKG_CONFIG_ALLOW_SYSTEM_LIBS environment variables. pkg-config itself *deliberately* removes -I/usr/include by default because that is a standard path where the compiler is assumed to normally look in.

Why is your compiler not looking in the standard system paths? If that is actually as intended, then I believe you should be setting the above environment variables to tell that to pkg-config.
Comment 2 Pekka Paalanen 2015-11-18 11:31:27 UTC
In lack of response, closing this as not a bug, because I think stuff works as intended.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.