Bug 3797 - .pc files contain -DXOPEN_SOURCE
Summary: .pc files contain -DXOPEN_SOURCE
Status: CLOSED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/Xlib (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jim Gettys
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-16 20:02 UTC by Murray Cumming
Modified: 2011-10-15 17:23 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Murray Cumming 2005-07-16 20:02:55 UTC
The x pkg-config .pc files contain -DXOPEN_SOURCE, which breaks the build of
several GNOME modules, because it prevents them from using GNU extensions in
glibc. Though this might be useful during the X build, it should not be provided
via pkg-config.

I noticed this on Ubuntu unstable (breezy).
Comment 1 James Henstridge 2005-07-18 23:27:18 UTC
It seems that the xproto.pc file contains the flag:
  http://cvs.freedesktop.org/xlibs/Xproto/xproto.pc.in?view=markup

Due to the way the other xlibs .pc files are written, the flag gets repeated in
them too.  E.g.:
  http://cvs.freedesktop.org/xlibs/X11/x11.pc.in?view=markup

(this file should be using "Requies: xproto" to pull in the Xproto flags, but
that is really another bug).

If the _XOPEN_SOURCE symbol is only needed when compiling the xlibs, then it
should not be included in the .pc files, since it causes compile problems for
applications that use the X libraries but also use some libc symbols that get
hidden when _XOPEN_SOURCE is defined.

The Gnome mailing list thread in question is here:
  http://thread.gmane.org/gmane.comp.gnome.desktop/25131
Comment 2 James Henstridge 2005-07-22 23:15:31 UTC
From talking with Daniel Stone, it seems that I gave the wrong viewcvs URL. 
Breezy is using the xorg X libraries, which have since been fixed:
  http://cvs.freedesktop.org/xorg/proto/X11/xproto.pc.in?view=markup
Comment 3 Murray Cumming 2005-07-22 23:24:43 UTC
Great. So this seems to be fixed.


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.