Skip to content

compiler error on tensor_py.h #9722

@luotao1

Description

@luotao1
In file included from /home/luotao02/.jumbo/include/python2.7/Python.h:8:0,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/common.h:99,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/pytypes.h:12,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/cast.h:13,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/attr.h:13,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/pybind11.h:36,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/numpy.h:12,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py.h:23,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py_test.cc:15:
/home/luotao02/.jumbo/include/python2.7/pyconfig.h:1161:0: error: "_POSIX_C_SOURCE" redefined [-Werror]
 #define _POSIX_C_SOURCE 200112L
 ^
In file included from /home/luotao02/.jumbo/opt/gcc48/include/c++/4.8.3/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
                 from /home/luotao02/.jumbo/opt/gcc48/include/c++/4.8.3/x86_64-unknown-linux-gnu/bits/c++config.h:426,
                 from /home/luotao02/.jumbo/opt/gcc48/include/c++/4.8.3/string:38,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py.h:16,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py_test.cc:15:
/usr/include/features.h:162:0: note: this is the location of the previous definition
 # define _POSIX_C_SOURCE 200809L
 ^
In file included from /home/luotao02/.jumbo/include/python2.7/Python.h:8:0,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/common.h:99,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/pytypes.h:12,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/cast.h:13,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/attr.h:13,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/pybind11.h:36,
                 from /home/luotao02/Paddle/build/third_party/pybind/src/extern_pybind/include/pybind11/numpy.h:12,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py.h:23,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py_test.cc:15:
/home/luotao02/.jumbo/include/python2.7/pyconfig.h:1183:0: error: "_XOPEN_SOURCE" redefined [-Werror]
 #define _XOPEN_SOURCE 600
 ^
In file included from /home/luotao02/.jumbo/opt/gcc48/include/c++/4.8.3/x86_64-unknown-linux-gnu/bits/os_defines.h:39:0,
                 from /home/luotao02/.jumbo/opt/gcc48/include/c++/4.8.3/x86_64-unknown-linux-gnu/bits/c++config.h:426,
                 from /home/luotao02/.jumbo/opt/gcc48/include/c++/4.8.3/string:38,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py.h:16,
                 from /home/luotao02/Paddle/paddle/fluid/pybind/tensor_py_test.cc:15:
/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