From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040612 Firefox/0.8 Description of problem: When using dpms.h in a C++ program. The code is compiled and linked correctly, but when the program is ran the DPMS symbols have been mangled by C++ and the DPMS* functions can't be located and the program crashes. Suggest putting and #ifdef __cplusplus extern "C" in the dpms.h header to correct this problem. Example from xpm.h, which works correctly with C++ #ifdef __cplusplus extern "C" { #endif Version-Release number of selected component (if applicable): xorg-x11-devel-6.7.0-2 How reproducible: Always Steps to Reproduce: 1. create a c++ program that uses DPMSQueryExtension 2. compile and link program 3. execute program Actual Results: relocation error: undefined symbol: _Z18DPMSQueryExtensionP9_XDisplayPiS1_ Expected Results: Program should execute correctly. Additional info: When compiling against C code the program works correctly. In my program I did this and it solved the problem #ifdef DPMSExtension #include <X11/Xlib.h> #ifndef DPMS_SERVER #include <X11/X.h> #include <X11/Xmd.h> extern "C" Bool DPMSQueryExtension(Display *, int *, int *); extern "C" Bool DPMSCapable(Display *); extern "C" Status DPMSInfo(Display *, CARD16 *, BOOL *); extern "C" Status DPMSEnable(Display *); #endif #endif
I don't want to make such a change to our X header files unless it's been approved by upstream first, as there are risks involved within a stable release cycle, however if you file a bug report in the X.Org bugzilla at http://bugs.freedesktop.org and carbon copy me on the bug report, I'll track the issue in their bugzilla instead, and will consider backporting any changes they make in CVS. Thanks for the report!
Opened bug #830 at freedesktop
Above link points to 830 in Red Hat bugzilla. Upstream URL link is: http://freedesktop.org/bugzilla/show_bug.cgi?id=830 Setting bug status to "UPSTREAM" and tracking in fd.o bugzilla. Thanks.
Status update: The upstream bug report has not yet received any comments from developers. You may wish to discuss the issue with them on xorg mailing lists, or update the upstream report with additional comments.
I have submitted at patch into the bugzilla report. Hopefully it will be accepted.
Was committed to upstream CVS for a while now. Resolving as rawhide...