Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
typhoonzero opened this issue Apr 6, 2018 · 1 comment · Fixed by #9681

Comments

@typhoonzero
Copy link
Contributor

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
 ^
@typhoonzero
Copy link
Contributor Author

Seems problem still exists, need to update paddle/fluid/pybind/tensor_py.h too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants