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

fedora 37:: Boost compile error due to wrong python used #4978

Open
adriansev opened this issue Apr 29, 2023 · 0 comments
Open

fedora 37:: Boost compile error due to wrong python used #4978

adriansev opened this issue Apr 29, 2023 · 0 comments

Comments

@adriansev
Copy link
Contributor

Seems that boost use python as dependency and given that is build before python, it will use system python. on fedora 37 this will break with messages related to Py_TYPE like:

2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics:     "g++"   -std=c++17 -fvisibility-inlines-hidden -fPIC -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"." -I"/usr/include/python3.11"  -c -o "build-boost/boost/bin.v2/libs/python/build/gcc-12.2.0/release/cxxstd-17-iso/python-3.11/threading-multi/visibility-hidden/object/life_support.o" "libs/python/src/object/life_support.cpp"
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics: 
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics: In file included from /usr/include/python3.11/Python.h:44,
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics:                  from ./boost/python/detail/wrap_python.hpp:178,
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics:                  from ./boost/python/detail/prefix.hpp:13,
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics:                  from ./boost/python/object/life_support.hpp:7,
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics:                  from libs/python/src/object/life_support.cpp:5:
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics: libs/python/src/object/life_support.cpp: In function 'PyObject* boost::python::objects::make_nurse_and_patient(PyObject*, PyObject*)':
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics: libs/python/src/object/life_support.cpp:96:9: error: lvalue required as left operand of assignment
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics:    96 |         Py_TYPE(&life_support_type) = &PyType_Type;
2023-04-29@09:28:17:DEBUG:O2Physics:boost:o2physics:       |         ^~~~~~~
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics: ...failed gcc.compile.c++ build-boost/boost/bin.v2/libs/python/build/gcc-12.2.0/release/cxxstd-17-iso/python-3.11/threading-multi/visibility-hidden/object/life_support.o...
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics: gcc.compile.c++ build-boost/boost/bin.v2/libs/python/build/gcc-12.2.0/release/cxxstd-17-iso/python-3.11/threading-multi/visibility-hidden/object/enum.o
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics: 
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:     "g++"   -std=c++17 -fvisibility-inlines-hidden -fPIC -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"." -I"/usr/include/python3.11"  -c -o "build-boost/boost/bin.v2/libs/python/build/gcc-12.2.0/release/cxxstd-17-iso/python-3.11/threading-multi/visibility-hidden/object/enum.o" "libs/python/src/object/enum.cpp"
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics: 
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics: In file included from /usr/include/python3.11/Python.h:44,
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:                  from ./boost/python/detail/wrap_python.hpp:178,
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:                  from ./boost/python/detail/prefix.hpp:13,
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:                  from ./boost/python/object_core.hpp:10,
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:                  from ./boost/python/object/enum_base.hpp:8,
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:                  from libs/python/src/object/enum.cpp:6:
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics: libs/python/src/object/enum.cpp: In function 'boost::python::api::object boost::python::objects::{anonymous}::new_enum_type(const char*, const char*)':
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics: libs/python/src/object/enum.cpp:156:11: error: lvalue required as left operand of assignment
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:   156 |           Py_TYPE(&enum_type_object) = incref(&PyType_Type);
2023-04-29@09:28:18:DEBUG:O2Physics:boost:o2physics:       |           ^~~~~~~
2023-04-29@09:28:19:DEBUG:O2Physics:boost:o2physics: ...failed gcc.compile.c++ build-boost/boost/bin.v2/libs/python/build/gcc-12.2.0/release/cxxstd-17-iso/python-3.11/threading-multi/visibility-hidden/object/enum.o...

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

No branches or pull requests

1 participant