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