Skip to content

develop branch build using manylinux image error /opt/python/cp27-cp27mu/include/python2.7/pyconfig.h:1194:0: error: "_POSIX_C_SOURCE" redefined [-Werror] #9680

@typhoonzero

Description

@typhoonzero

build error message:

In file included from /opt/python/cp27-cp27mu/include/python2.7/Python.h:8:0,
                 from /paddle/paddle/fluid/pybind/protobuf.h:17,
                 from /paddle/paddle/fluid/pybind/pybind.cc:22:
/opt/python/cp27-cp27mu/include/python2.7/pyconfig.h:1194:0: error: "_POSIX_C_SOURCE" redefined [-Werror]
 #define _POSIX_C_SOURCE 200112L
 ^
In file included from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39:0,
                 from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                 from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/utility:68,
                 from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/algorithm:60,
                 from /paddle/paddle/fluid/pybind/pybind.cc:14:
/usr/include/features.h:162:0: note: this is the location of the previous definition
 # define _POSIX_C_SOURCE 200809L
 ^
In file included from /opt/python/cp27-cp27mu/include/python2.7/Python.h:8:0,
                 from /paddle/paddle/fluid/pybind/protobuf.h:17,
                 from /paddle/paddle/fluid/pybind/pybind.cc:22:
/opt/python/cp27-cp27mu/include/python2.7/pyconfig.h:1216:0: error: "_XOPEN_SOURCE" redefined [-Werror]
 #define _XOPEN_SOURCE 600
 ^
In file included from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/os_defines.h:39:0,
                 from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/x86_64-redhat-linux/bits/c++config.h:2097,
                 from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/utility:68,
                 from /opt/rh/devtoolset-2/root/usr/include/c++/4.8.2/algorithm:60,
                 from /paddle/paddle/fluid/pybind/pybind.cc:14:
/usr/include/features.h:164:0: note: this is the location of the previous definition
 # define _XOPEN_SOURCE 700
 ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions