Skip to content

Build issues with Python 3.10 #152

Description

@kiefernforst

Dear Thiago,

I'm getting some build issues against Python 3.10:

In file included from /usr/include/python3.10/Python.h:8,
                 from ./openplc-runtime/core/src/plc_app/../drivers/python_plugin_bridge.h:13,
                 from ./openplc-runtime/core/src/plc_app/../drivers/plugin_driver.h:7,
                 from ./openplc-runtime/core/src/plc_app/plc_io_cycle.cpp:11:
/usr/include/python3.10/pyconfig.h:1643:9: error: '_POSIX_C_SOURCE' redefined [-Werror]
 1643 | #define _POSIX_C_SOURCE 200809L
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/15.2.1/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/include/c++/15.2.1/x86_64-pc-linux-gnu/bits/c++config.h:727,
                 from /usr/include/c++/15.2.1/bits/version.h:51,
                 from /usr/include/c++/15.2.1/atomic:50,
                 from ./openplc-runtime/core/src/plc_app/plc_io_cycle.cpp:7:
/usr/include/features.h:319:10: note: this is the location of the previous definition
  319 | # define _POSIX_C_SOURCE        202405L
      |          ^~~~~~~~~~~~~~~
/usr/include/python3.10/pyconfig.h:1658:9: error: '_XOPEN_SOURCE' redefined [-Werror]
 1658 | #define _XOPEN_SOURCE 700
      |         ^~~~~~~~~~~~~
/usr/include/features.h:234:10: note: this is the location of the previous definition
  234 | # define _XOPEN_SOURCE  800
      |          ^~~~~~~~~~~~~
In file included from /usr/include/python3.10/Python.h:8,
                 from ./openplc-runtime/core/src/plc_app/../drivers/python_plugin_bridge.h:13,
                 from ./openplc-runtime/core/src/plc_app/../drivers/plugin_driver.h:7,
                 from ./openplc-runtime/core/src/plc_app/unix_socket.c:12:
/usr/include/python3.10/pyconfig.h:1643:9: error: '_POSIX_C_SOURCE' redefined [-Werror]
 1643 | #define _POSIX_C_SOURCE 200809L
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/errno.h:25,
                 from ./openplc-runtime/core/src/plc_app/unix_socket.c:1:
/usr/include/features.h:319:10: note: this is the location of the previous definition
  319 | # define _POSIX_C_SOURCE        202405L
      |          ^~~~~~~~~~~~~~~
In file included from /usr/include/python3.10/Python.h:8,
                 from ./openplc-runtime/core/src/plc_app/../drivers/python_plugin_bridge.h:13,
                 from ./openplc-runtime/core/src/plc_app/../drivers/plugin_driver.h:7,
                 from ./openplc-runtime/core/src/plc_app/plc_state_manager.cpp:28:
/usr/include/python3.10/pyconfig.h:1643:9: error: '_POSIX_C_SOURCE' redefined [-Werror]
 1643 | #define _POSIX_C_SOURCE 200809L
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/c++/15.2.1/x86_64-pc-linux-gnu/bits/os_defines.h:39,
                 from /usr/include/c++/15.2.1/x86_64-pc-linux-gnu/bits/c++config.h:727,
                 from /usr/include/c++/15.2.1/bits/version.h:51,
                 from /usr/include/c++/15.2.1/atomic:50,
                 from ./openplc-runtime/core/src/plc_app/plc_state_manager.cpp:14:
/usr/include/features.h:319:10: note: this is the location of the previous definition
  319 | # define _POSIX_C_SOURCE        202405L
      |          ^~~~~~~~~~~~~~~
/usr/include/python3.10/pyconfig.h:1658:9: error: '_XOPEN_SOURCE' redefined [-Werror]
 1658 | #define _XOPEN_SOURCE 700
      |         ^~~~~~~~~~~~~
/usr/include/features.h:234:10: note: this is the location of the previous definition
  234 | # define _XOPEN_SOURCE  800
      |          ^~~~~~~~~~~~~

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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