I'm trying to rebuild FreeCAD but I've run into the following and I don't know how to fix it.
--- In file included from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/ExtensionPyImp.cpp:34: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/ExtensionPy.cpp:76:1: warning: missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 76 | }; | ^ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/PropertyContainerPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/Expression.cpp:32: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/Base/PersistencePy.h:67:9: error: 'Int' in namespace 'Py' does not name a type 67 | Py::Int getMemSize(void) const; | ^~~ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/Expression.cpp:32: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:179:9: error: 'Int' in namespace 'Py' does not name a type 179 | Py::Int getUndoMode(void) const; | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:183:26: error: 'Py::Int' has not been declared 183 | void setUndoMode(Py::Int arg); | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:187:9: error: 'Int' in namespace 'Py' does not name a type 187 | Py::Int getUndoRedoMemSize(void) const; | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:194:9: error: 'Int' in namespace 'Py' does not name a type 194 | Py::Int getUndoCount(void) const; | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:201:9: error: 'Int' in namespace 'Py' does not name a type 201 | Py::Int getRedoCount(void) const; | ^~~ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/PropertyContainerPyImp.cpp:40: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/PropertyContainerPy.cpp:76:1: warning: missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 76 | }; | ^ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/PropertyContainerPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/ExtensionContainerPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentObjectPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/FeaturePython.cpp:35: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/Base/PersistencePy.h:67:9: error: 'Int' in namespace 'Py' does not name a type 67 | Py::Int getMemSize(void) const; | ^~~ ---
Full log here: https://kojipkgs.fedoraproject.org//work/tasks/7099/45227099/build.log
Thanks, Richard
On 2020-06-01 19:20, Richard Shaw wrote:
I'm trying to rebuild FreeCAD but I've run into the following and I don't know how to fix it.
The "Py::Int" is not Python API; it probably comes from C++. Do you know where it's defined? I haven't been able to find the definition, and searching for "Py::Int" it on the internet gives me general results for "py" and "int".
In file included from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/ExtensionPyImp.cpp:34: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/ExtensionPy.cpp:76:1: warning: missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 76 | }; | ^ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/PropertyContainerPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/Expression.cpp:32: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/Base/PersistencePy.h:67:9: error: 'Int' in namespace 'Py' does not name a type 67 | Py::Int getMemSize(void) const; | ^~~ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/Expression.cpp:32: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:179:9: error: 'Int' in namespace 'Py' does not name a type 179 | Py::Int getUndoMode(void) const; | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:183:26: error: 'Py::Int' has not been declared 183 | void setUndoMode(Py::Int arg); | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:187:9: error: 'Int' in namespace 'Py' does not name a type 187 | Py::Int getUndoRedoMemSize(void) const; | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:194:9: error: 'Int' in namespace 'Py' does not name a type 194 | Py::Int getUndoCount(void) const; | ^~~ /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentPy.h:201:9: error: 'Int' in namespace 'Py' does not name a type 201 | Py::Int getRedoCount(void) const; | ^~~ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/PropertyContainerPyImp.cpp:40: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/PropertyContainerPy.cpp:76:1: warning: missing initializer for member '_typeobject::tp_vectorcall' [-Wmissing-field-initializers] 76 | }; | ^ In file included from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/PropertyContainerPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/ExtensionContainerPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/build/src/App/DocumentObjectPy.h:7, from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/FeaturePython.cpp:35: /builddir/build/BUILD/FreeCAD-0.18.4/build/src/Base/PersistencePy.h:67:9: error: 'Int' in namespace 'Py' does not name a type 67 | Py::Int getMemSize(void) const; | ^~~
Full log here: https://kojipkgs.fedoraproject.org//work/tasks/7099/45227099/build.log
Thanks, Richard
python-devel mailing list -- python-devel@lists.fedoraproject.org To unsubscribe send an email to python-devel-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje...
On Tuesday, June 2, 2020 9:33:20 AM EDT Petr Viktorin wrote:
On 2020-06-01 19:20, Richard Shaw wrote:
I'm trying to rebuild FreeCAD but I've run into the following and I don't know how to fix it.
The "Py::Int" is not Python API; it probably comes from C++. Do you know where it's defined? I haven't been able to find the definition, and searching for "Py::Int" it on the internet gives me general results for "py" and "int".
Search using quotation marks:
https://docs.scipy.org/doc/scipy-0.16.1/reference/tutorial/weave.html
On 2020-06-02 16:38, Garry T. Williams wrote:
On Tuesday, June 2, 2020 9:33:20 AM EDT Petr Viktorin wrote:
On 2020-06-01 19:20, Richard Shaw wrote:
I'm trying to rebuild FreeCAD but I've run into the following and I don't know how to fix it.
The "Py::Int" is not Python API; it probably comes from C++. Do you know where it's defined? I haven't been able to find the definition, and searching for "Py::Int" it on the internet gives me general results for "py" and "int".
Search using quotation marks:
https://docs.scipy.org/doc/scipy-0.16.1/reference/tutorial/weave.html
Ah, thanks! It seems that weave was deprecated in 2015 and removed from scipy in 2017. It was never ported to Python 3. The Freecad wiki says "You should compile against Python 3 and Qt5," so I assume weave should not be used.
How is the weave code getting in? I see the file "DocumentPy.h" doesn't appear directly in upstream sources. Do you know how it is generated?
On Tue, 2 Jun 2020, Petr Viktorin wrote:
I'm trying to rebuild FreeCAD but I've run into the following and I don't know how to fix it.
The "Py::Int" is not Python API; it probably comes from C++. Do you know where it's defined? I haven't been able to find the definition, and searching for "Py::Int" it on the internet gives me general results for "py" and "int".
Search using quotation marks:
https://docs.scipy.org/doc/scipy-0.16.1/reference/tutorial/weave.html
Ah, thanks! It seems that weave was deprecated in 2015 and removed from scipy in 2017. It was never ported to Python 3. The Freecad wiki says "You should compile against Python 3 and Qt5," so I assume weave should not be used.
How is the weave code getting in? I see the file "DocumentPy.h" doesn't appear directly in upstream sources. Do you know how it is generated?
Actually, the Py::Int is coming from PyCXX. The bundled copy of PyCXX defines PYCXX_PYTHON_2TO3 which in turn causes some Python 2 compatibility things to be defined, like Py::Int. So this broke when moving to using the unbundled copy of PyCXX.
I submitted a PR with a fix: https://src.fedoraproject.org/rpms/freecad/pull-request/4
Scott
On Wed, 3 Jun 2020, Scott Talbert wrote:
I'm trying to rebuild FreeCAD but I've run into the following and I don't know how to fix it.
The "Py::Int" is not Python API; it probably comes from C++. Do you know where it's defined? I haven't been able to find the definition, and searching for "Py::Int" it on the internet gives me general results for "py" and "int".
Search using quotation marks:
https://docs.scipy.org/doc/scipy-0.16.1/reference/tutorial/weave.html
Ah, thanks! It seems that weave was deprecated in 2015 and removed from scipy in 2017. It was never ported to Python 3. The Freecad wiki says "You should compile against Python 3 and Qt5," so I assume weave should not be used.
How is the weave code getting in? I see the file "DocumentPy.h" doesn't appear directly in upstream sources. Do you know how it is generated?
Actually, the Py::Int is coming from PyCXX. The bundled copy of PyCXX defines PYCXX_PYTHON_2TO3 which in turn causes some Python 2 compatibility things to be defined, like Py::Int. So this broke when moving to using the unbundled copy of PyCXX.
I submitted a PR with a fix: https://src.fedoraproject.org/rpms/freecad/pull-request/4
And of course the build fails for a different reason (I checked in mock but not koji), sigh. So it's probably something that recently landed in Rawhide, I'm guessing boost related now?
[ 55%] Building CXX object src/Mod/PartDesign/App/CMakeFiles/PartDesign.dir/FeaturePolarPattern.cpp.o cd /builddir/build/BUILD/FreeCAD-0.18.4/build/src/Mod/PartDesign/App && /usr/bin/c++ -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DPYCXX_6_2_COMPATIBILITY -DPYCXX_PYTHON_2TO3 -DPartDesign_EXPORTS -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -D_OCC64 -I/builddir/build/BUILD/FreeCAD-0.18.4/build -I/builddir/build/BUILD/FreeCAD-0.18.4/build/src -I/builddir/build/BUILD/FreeCAD-0.18.4/src -I/builddir/build/BUILD/FreeCAD-0.18.4/build/src/Mod/PartDesign/App -I/usr/include/opencascade -I/usr/include/python3.9 -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtXml -Wall -Wextra -Wno-write-strings -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=c++11 -D_OCC64 -fPIC -fPIC -o CMakeFiles/PartDesign.dir/FeaturePolarPattern.cpp.o -c /builddir/build/BUILD/FreeCAD-0.18.4/src/Mod/PartDesign/App/FeaturePolarPattern.cpp /builddir/build/BUILD/FreeCAD-0.18.4/src/Gui/DAGView/DAGView.cpp: In constructor 'Gui::DAG::View::View(QWidget*)': /builddir/build/BUILD/FreeCAD-0.18.4/src/Gui/DAGView/DAGView.cpp:55:100: error: '_1' was not declared in this scope 55 | Application::Instance->signalActiveDocument.connect(boost::bind(&View::slotActiveDocument, this, _1)); | ^~ /builddir/build/BUILD/FreeCAD-0.18.4/src/Gui/DAGView/DAGView.cpp:55:100: note: suggested alternatives: In file included from /usr/include/boost/mpl/aux_/include_preprocessed.hpp:37, from /usr/include/boost/mpl/placeholders.hpp:43, from /usr/include/boost/iterator/iterator_categories.hpp:16, from /usr/include/boost/iterator/iterator_facade.hpp:13, from /usr/include/boost/filesystem/path.hpp:29, from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/PropertyStandard.h:34, from /builddir/build/BUILD/FreeCAD-0.18.4/src/App/Document.h:32, from /builddir/build/BUILD/FreeCAD-0.18.4/src/Gui/DAGView/DAGView.cpp:33: /usr/include/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp:29:16: note: 'mpl_::_1'
Scott
On Wednesday, 3 June 2020 19.05.03 WEST Scott Talbert wrote:
And of course the build fails for a different reason (I checked in
mock
but not koji), sigh. So it's probably something that recently landed in Rawhide, I'm guessing boost related now?
Yes, see: https://lists.fedoraproject.org/archives/list/ devel@lists.fedoraproject.org/message/ SSKNR5UC5QW7LMBQWTEMSBD6RB25PHLO/
python-devel@lists.fedoraproject.org