Bug 139078

Summary: kdebindings "_XOPEN_SOURCE" and "_POSIX_C_SOURCE" are redefined
Product: [Developer tools] bindings Reporter: Taurnil <taurnil.oronar>
Component: generalAssignee: kde-bindings
Status: RESOLVED WORKSFORME    
Severity: normal CC: andrew.crouthamel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: kdebindings compile log

Description Taurnil 2006-12-21 01:26:40 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Compiled From Sources
Compiler:          gcc
3.4.6 
OS:                Linux

The problem appears to start with ;

/usr/include/python2.5/pyconfig.h:941:1: warning: "_XOPEN_SOURCE" redefined
<command line>:5:1: warning: this is the location of the previous definition
pcop.cpp:701: warning: unused parameter 'self'

then right after that is;

/usr/include/python2.5/pyconfig.h:932:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/string.h:26,

then the make fails with;

/usr/include/features.h:150:1: warning: this is the location of the previous definition
marshaller.cpp: In member function `bool PythonDCOP::Marshaller::marshalDict(const PythonDCOP::PCOPType&, const PythonDCOP::PCOPType&, PyObject*, QDataStream*) const':
marshaller.cpp:129: error: cannot convert `int*' to `Py_ssize_t*' for argument `2' to `int PyDict_Next(PyObject*, Py_ssize_t*, PyObject**, PyObject**)'
marshaller.cpp:138: error: cannot convert `int*' to `Py_ssize_t*' for argument `2' to `int PyDict_Next(PyObject*, Py_ssize_t*, PyObject**, PyObject**)'
make[4]: *** [marshaller.lo] Error 1
make[4]: Leaving directory `/usr/src/kdebindings-3.5.5/dcoppython/shell'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/src/kdebindings-3.5.5/dcoppython/shell'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/kdebindings-3.5.5/dcoppython'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/kdebindings-3.5.5'
make: *** [all] Error 2

I'm using Python2.5 and after some poking around the XOPEN and POSIX_C_SOURCE things seems to be related to some standards issues. Looking around in /usr/include/python2.5/pyconfig.h, it has ;

#define _XOPEN_SOURCE 600

and 

#define _POSIX_C_SOURCE 200112L

Looking in the kdebindings Makefiles they have XOPEN_SOURCE=500 and -std=iso9899:1990. If I sed all the Makefiles changing XOPEN_SOURCE=500 to XOPEN_SOURCE=600 gets rid of the XOPEN redefined error. But I do not know what the -std should be set to. I could be completely off track here but don't know what else to do.
Comment 1 Taurnil 2006-12-21 01:28:06 UTC
Created attachment 18999 [details]
kdebindings compile log

Attached is a log of the configure and make phases.
Comment 2 Andrew Crouthamel 2018-11-02 04:25:14 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Taurnil 2018-11-02 09:20:48 UTC
You can close this, that era is long gone.
Comment 4 Andrew Crouthamel 2018-11-02 22:35:44 UTC
Thanks for the update!