Porting to python3

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
iplayfast
Posts: 256
Joined: Sat Sep 07, 2019 6:55 am

Re: Porting to python3

Post by iplayfast »

It appears that I've got shiboken 1.2.2-5 and shiboken2 5.11.2-0ppa2~ub installed.
However, the python problem has been fixed. Another source was pulling it in. Uninstalling the old version and keeping the new one make it python3 only. (yeah! Thanks for the help!).


Next problem is pcl files seem to have a problem. I build pcl from source installed at /usr/local/include/pcl-1.11/pcl which seems to line up with the compile string(below).

error is:

Code: Select all

make VERBOSE=1 >out.txt
/home/chris/github/freecad-source/src/Mod/ReverseEngineering/App/RegionGrowing.cpp: In member function ‘void Reen::RegionGrowing::perform(int)’:
/home/chris/github/freecad-source/src/Mod/ReverseEngineering/App/RegionGrowing.cpp:64:146: error: invalid use of incomplete type ‘class boost::shared_ptr<pcl::search::Search<pcl::PointXYZ> >’
 Z>::Ptr tree = boost::shared_ptr<pcl::search::Search<pcl::PointXYZ> > (new pcl::search::KdTree<pcl::PointXYZ>);
                                                                                                              ^
In file included from /usr/include/boost/throw_exception.hpp:73:0,
                 from /usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:52,
                 from /usr/include/boost/dynamic_bitset.hpp:15,
                 from /home/chris/github/freecad-source/src/App/PropertyStandard.h:34,
                 from /home/chris/github/freecad-source/src/Mod/Points/App/Points.h:35,
                 from /home/chris/github/freecad-source/src/Mod/ReverseEngineering/App/RegionGrowing.cpp:27:
/usr/include/boost/exception/exception.hpp:15:44: note: declaration of ‘class boost::shared_ptr<pcl::search::Search<pcl::PointXYZ> >’
produced from:

Code: Select all

[ 58%] Building CXX object src/Mod/ReverseEngineering/App/CMakeFiles/ReverseEngineering.dir/RegionGrowing.cpp.o
cd /home/chris/github/freecad-source/build/src/Mod/ReverseEngineering/App && /usr/bin/c++  -DDISABLE_LIBUSB_1_0 -DDISABLE_PCAP -DDISABLE_PNG -DHAVE_CONFIG_H -DHAVE_LIMITS_H -DHAVE_PCL_FILTERS -DHAVE_PCL_SAMPLE_CONSENSUS -DHAVE_PCL_SEGMENTATION -DHAVE_PCL_SURFACE -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_NO_DEBUG -DQT_XML_LIB -DReverseEngineering_EXPORTS -D_OCC64 -Dqh_QHpointer -DvtkRenderingContext2D_AUTOINIT="1(vtkRenderingContextOpenGL2)" -DvtkRenderingCore_AUTOINIT="3(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingOpenGL2)" -I/home/chris/github/freecad-source/build -I/home/chris/github/freecad-source/build/src -I/home/chris/github/freecad-source/src -I/usr/include/opencascade -I/usr/include/python3.6m -I/usr/include/ni -I/usr/include/openni2 -isystem /usr/local/include/vtk-8.1 -isystem /usr/include/eigen3 -isystem /usr/local/include/pcl-1.11 -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtConcurrent  -Wall -Wextra -Wno-write-strings  -fPIC   -I/usr/include/openmpi -I/usr/include/hdf5/openmpi -pthread -I/usr/lib/x86_64-linux-gnu/openmpi/include -I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi -fPIC -march=native -msse4.2 -mfpmath=sse -std=gnu++14 -o CMakeFiles/ReverseEngineering.dir/RegionGrowing.cpp.o -c /home/chris/github/freecad-source/src/Mod/ReverseEngineering/App/RegionGrowing.cpp
src/Mod/ReverseEngineering/App/CMakeFiles/ReverseEngineering.dir/build.make:118: recipe for target 'src/Mod/ReverseEngineering/App/CMakeFiles/ReverseEngineering.dir/RegionGrowing.cpp.o' failed
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Porting to python3

Post by wmayer »

This means a class declaration is missing: Now boost::shared_ptr<pcl::search::Search<pcl::PointXYZ> > is a rather complex type and it could be that boost::shared_ptr, pcl::search::Search or pcl::PointXYZ is not known.
However, the two pcl types are defined in pcl/search/search.h and pcl/point_types.h and both are included. So, it remains boost::shared_ptr. Try to include <boost/shared_ptr.hpp> and check if fixes the issue.
User avatar
iplayfast
Posts: 256
Joined: Sat Sep 07, 2019 6:55 am

Re: Porting to python3

Post by iplayfast »

wmayer wrote: Wed Jun 17, 2020 8:05 pm This means a class declaration is missing: Now boost::shared_ptr<pcl::search::Search<pcl::PointXYZ> > is a rather complex type and it could be that boost::shared_ptr, pcl::search::Search or pcl::PointXYZ is not known.
However, the two pcl types are defined in pcl/search/search.h and pcl/point_types.h and both are included. So, it remains boost::shared_ptr. Try to include <boost/shared_ptr.hpp> and check if fixes the issue.
This is the result.

Code: Select all

[ 58%] Building CXX object src/Mod/ReverseEngineering/App/CMakeFiles/ReverseEngineering.dir/RegionGrowing.cpp.o
/home/chris/github/freecad-source/src/Mod/ReverseEngineering/App/RegionGrowing.cpp: In member function ‘void Reen::RegionGrowing::perform(int)’:
/home/chris/github/freecad-source/src/Mod/ReverseEngineering/App/RegionGrowing.cpp:64:59: error: conversion from ‘boost::shared_ptr<pcl::search::Search<pcl::PointXYZ> >’ to non-scalar type ‘pcl::search::Search<pcl::PointXYZ>::Ptr {aka std::shared_ptr<pcl::search::Search<pcl::PointXYZ> >}’ requested
     pcl::search::Search<pcl::PointXYZ>::Ptr tree = boost::shared_ptr<pcl::search::Search<pcl::PointXYZ> > (new pcl::search::KdTree<pcl::PointXYZ>);
                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I tried rebuilding without PCL thinking that pcl was the only problem....

Code: Select all

cmake .. -DBUILD_QT5=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
Other problems showed up. Maybe a general clue?
with make VERBOSE=1

Code: Select all

cd /home/chris/github/freecad-source/build/src/Main && /usr/bin/cmake -E cmake_link_script CMakeFiles/FreeCADMain.dir/link.txt --verbose=1
/usr/bin/c++  -Wall -Wextra -Wno-write-strings    CMakeFiles/FreeCADMain.dir/MainGui.cpp.o  -o ../../bin/FreeCAD   -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi  -L/usr/lib/openmpi/lib  -L/usr/lib/x86_64-linux-gnu/openmpi/lib  -Wl,-rpath,/usr/lib/x86_64-linux-gnu/hdf5/openmpi:/usr/lib/openmpi/lib:/usr/lib/x86_64-linux-gnu/openmpi/lib:/home/chris/github/freecad-source/build/lib: -lhdf5 -lmpi -lmpi_cxx -lmpi ../../lib/libFreeCADGui.so ../../lib/libFreeCADApp.so ../../lib/libFreeCADBase.so -lhdf5 -lmpi -lmpi_cxx -lmpi -lmpi_cxx /usr/lib/x86_64-linux-gnu/libxerces-c.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libpython3.6m.so -lutil -ldl /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5.9.5 /usr/lib/x86_64-linux-gnu/libCoin.so /usr/lib/libboost_filesystem.so.1.71.0 /usr/lib/libboost_program_options.so.1.71.0 /usr/lib/libboost_regex.so.1.71.0 /usr/lib/libboost_system.so.1.71.0 /usr/lib/libboost_thread.so.1.71.0 -lpthread -lpthread /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libQt5OpenGL.so.5.9.5 /usr/lib/x86_64-linux-gnu/libQt5PrintSupport.so.5.9.5 /usr/lib/x86_64-linux-gnu/libQt5Svg.so.5.9.5 /usr/lib/x86_64-linux-gnu/libQt5Network.so.5.9.5 /usr/lib/x86_64-linux-gnu/libQt5UiTools.a /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5.9.5 /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5.9.5 /usr/lib/x86_64-linux-gnu/libQt5Core.so.5.9.5 /usr/lib/libspnav.so /usr/lib/x86_64-linux-gnu/libshiboken2.cpython-36m-x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/libpyside2.cpython-36m-x86_64-linux-gnu.so 
../../lib/libFreeCADApp.so: undefined reference to `boost::re_detail_107300::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::match()'
../../lib/libFreeCADGui.so: undefined reference to `boost::re_detail_107300::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
../../lib/libFreeCADGui.so: undefined reference to `boost::re_detail_107300::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)'
../../lib/libFreeCADGui.so: undefined reference to `boost::re_detail_107300::perl_matcher<char const*, std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find()'
../../lib/libFreeCADGui.so: undefined reference to `boost::re_detail_107300::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find()'
collect2: error: ld returned 1 exit status
src/Main/CMakeFiles/FreeCADMain.dir/build.make:125: recipe for target 'bin/FreeCAD' failed
make[2]: *** [bin/FreeCAD] Error 1
make[2]: Leaving directory '/home/chris/github/freecad-source/build'
CMakeFiles/Makefile2:2602: recipe for target 'src/Main/CMakeFiles/FreeCADMain.dir/all' failed
make[1]: *** [src/Main/CMakeFiles/FreeCADMain.dir/all] Error 2
make[1]: Leaving directory '/home/chris/github/freecad-source/build'
Makefile:146: recipe for target 'all' failed
make: *** [all] Error 2
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Porting to python3

Post by wmayer »

==============
Summary report
==============

-- Build type:
-- Compiler: /usr/bin/c++ (7.5.0)
-- Flags: -Wall -Wextra -Wno-write-strings
-- Standard: Requires C++11
-- Python: [/usr/bin/python3] [.cpython-36m-x86_64-linux-gnu]
-- PCL: 1.8.1
-- pybind11: not enabled
-- Boost: 107300
...
Recently I have built FreeCAD using boost 1.73 which currently is the very latest release and there everything went fine.
Now when you check your linking options then it uses boost 1.71 instead of 1.73.
/usr/lib/libboost_filesystem.so.1.71.0
/usr/lib/libboost_program_options.so.1.71.0
/usr/lib/libboost_regex.so.1.71.0
/usr/lib/libboost_system.so.1.71.0
/usr/lib/libboost_thread.so.1.71.0
No idea how this can happen.
User avatar
iplayfast
Posts: 256
Joined: Sat Sep 07, 2019 6:55 am

Re: Porting to python3

Post by iplayfast »

you've got a good eye.
Turns out it was a bad boost install. Didn't fix all the problems but at least it's getting further.

Code: Select all

In file included from /usr/local/include/boost/variant/apply_visitor.hpp:17:0,
                 from /usr/local/include/boost/geometry/algorithms/append.hpp:26,
                 from /usr/local/include/boost/geometry/algorithms/detail/assign_values.hpp:33,
                 from /usr/local/include/boost/geometry/algorithms/detail/assign_indexed_point.hpp:21,
                 from /usr/local/include/boost/geometry/policies/relate/intersection_points.hpp:20,
                 from /usr/local/include/boost/geometry/strategies/intersection_strategies.hpp:20,
                 from /usr/local/include/boost/geometry/strategies/strategies.hpp:39,
                 from /usr/local/include/boost/geometry/geometry.hpp:58,
                 from /usr/local/include/boost/geometry.hpp:17,
                 from /home/chris/github/freecad-source/src/Mod/Path/App/Area.cpp:36:
/usr/local/include/boost/geometry/index/detail/rtree/node/variant_visitor.hpp: In instantiation of ‘void boost::geometry::index::detail::rtree::apply_visitor(Visitor&, boost::variant<boost::geometry::index::detail::rtree::variant_leaf<Value, Parameters, Box, Allocators, Tag>, boost::geometry::index::detail::rtree::variant_internal_node<Value, Parameters, Box, Allocators, Tag> >&) [with Visitor = boost::geometry::index::detail::rtree::visitors::insert<boost::geometry::index::detail::rtree::ptr_pair<boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::variant<boost::geometry::index::detail::rtree::variant_leaf<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::variant_internal_node<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16, 4>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16, 4>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag> >*>, boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder, boost::geometry::index::detail::rtree::insert_default_tag>; Value = std::pair<std::_List_iterator<WireInfo>, long unsigned int>; Parameters = boost::geometry::index::linear<16>; Box = boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >; Allocators = boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>; Tag = boost::geometry::index::detail::rtree::node_variant_static_tag]’:
/usr/local/include/boost/geometry/index/detail/rtree/visitors/remove.hpp:313:37:   required from ‘void boost::geometry::index::detail::rtree::visitors::remove<MembersHolder>::reinsert_node_elements(Node&, boost::geometry::index::detail::rtree::visitors::remove<MembersHolder>::size_type) [with Node = boost::geometry::index::detail::rtree::variant_internal_node<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>; MembersHolder = boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder; boost::geometry::index::detail::rtree::visitors::remove<MembersHolder>::size_type = long unsigned int]’
/usr/local/include/boost/geometry/index/detail/rtree/visitors/remove.hpp:274:43:   required from ‘void boost::geometry::index::detail::rtree::visitors::remove<MembersHolder>::reinsert_removed_nodes_elements() [with MembersHolder = boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder]’
/usr/local/include/boost/geometry/index/detail/rtree/visitors/remove.hpp:133:48:   required from ‘void boost::geometry::index::detail::rtree::visitors::remove<MembersHolder>::operator()(boost::geometry::index::detail::rtree::visitors::remove<MembersHolder>::internal_node&) [with MembersHolder = boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder; boost::geometry::index::detail::rtree::visitors::remove<MembersHolder>::internal_node = boost::geometry::index::detail::rtree::variant_internal_node<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>]’
/usr/local/include/boost/variant/variant.hpp:1028:24:   required from ‘typename boost::disable_if_c<(MoveSemantics && boost::is_same<Value2, Value2>::value), typename Visitor::result_type>::type boost::detail::variant::invoke_visitor<Visitor, MoveSemantics>::internal_visit(T&&, int) [with T = boost::geometry::index::detail::rtree::variant_internal_node<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>&; Visitor = boost::geometry::index::detail::rtree::visitors::remove<boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder>; bool MoveSemantics = false; typename boost::disable_if_c<(MoveSemantics && boost::is_same<Value2, Value2>::value), typename Visitor::result_type>::type = void]’
/usr/local/include/boost/variant/detail/visitation_impl.hpp:133:13:   required from ‘typename Visitor::result_type boost::detail::variant::visitation_impl_invoke_impl(int, Visitor&, VoidPtrCV, T*, mpl_::false_) [with Visitor = boost::detail::variant::invoke_visitor<boost::geometry::index::detail::rtree::visitors::remove<boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder>, false>; VoidPtrCV = void*; T = boost::geometry::index::detail::rtree::variant_internal_node<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>; typename Visitor::result_type = void; mpl_::false_ = mpl_::bool_<false>]’
/usr/local/include/boost/variant/detail/visitation_impl.hpp:157:41:   [ skipping 4 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
/usr/local/include/boost/variant/variant.hpp:2393:52:   required from ‘typename Visitor::result_type boost::variant<T0, TN>::apply_visitor(Visitor&) & [with Visitor = boost::geometry::index::detail::rtree::visitors::remove<boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder>; T0_ = boost::geometry::index::detail::rtree::variant_leaf<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>; TN = {boost::geometry::index::detail::rtree::variant_internal_node<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16, 4>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16, 4>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>}; typename Visitor::result_type = void]’
/usr/local/include/boost/variant/detail/apply_visitor_unary.hpp:48:72:   required from ‘typename Visitor::result_type boost::apply_visitor(Visitor&, Visitable&&) [with Visitor = boost::geometry::index::detail::rtree::visitors::remove<boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder>; Visitable = boost::variant<boost::geometry::index::detail::rtree::variant_leaf<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::variant_internal_node<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16, 4>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16, 4>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>, boost::geometry::index::detail::rtree::node_variant_static_tag> >&; typename Visitor::result_type = void]’
/usr/local/include/boost/geometry/index/detail/rtree/node/variant_visitor.hpp:51:25:   required from ‘void boost::geometry::index::detail::rtree::apply_visitor(Visitor&, boost::variant<boost::geometry::index::detail::rtree::variant_leaf<Value, Parameters, Box, Allocators, Tag>, boost::geometry::index::detail::rtree::variant_internal_node<Value, Parameters, Box, Allocators, Tag> >&) [with Visitor = boost::geometry::index::detail::rtree::visitors::remove<boost::geometry::index::rtree<std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, RGetter>::members_holder>; Value = std::pair<std::_List_iterator<WireInfo>, long unsigned int>; Parameters = boost::geometry::index::linear<16>; Box = boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >; Allocators = boost::geometry::index::detail::rtree::allocators<boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >, std::pair<std::_List_iterator<WireInfo>, long unsigned int>, boost::geometry::index::linear<16>, boost::geometry::model::box<boost::geometry::model::point<double, 3, boost::geometry::cs::cartesian> >, boost::geometry::index::detail::rtree::node_variant_static_tag>; Tag = boost::geometry::index::detail::rtree::node_variant_static_tag]’
/usr/local/include/boost/geometry/index/rtree.hpp:1573:37:   required from ‘boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::size_type boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::raw_remove(const value_type&) [with Value = std::pair<std::_List_iterator<WireInfo>, long unsigned int>; Parameters = boost::geometry::index::linear<16>; IndexableGetter = RGetter; EqualTo = boost::geometry::index::equal_to<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >; Allocator = boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >; boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::size_type = long unsigned int; boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::value_type = std::pair<std::_List_iterator<WireInfo>, long unsigned int>]’
/usr/local/include/boost/geometry/index/rtree.hpp:771:22:   required from ‘boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::size_type boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::remove(const value_type&) [with Value = std::pair<std::_List_iterator<WireInfo>, long unsigned int>; Parameters = boost::geometry::index::linear<16>; IndexableGetter = RGetter; EqualTo = boost::geometry::index::equal_to<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >; Allocator = boost::container::new_allocator<std::pair<std::_List_iterator<WireInfo>, long unsigned int> >; boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::size_type = long unsigned int; boost::geometry::index::rtree<Value, Options, IndexableGetter, EqualTo, Allocator>::value_type = std::pair<std::_List_iterator<WireInfo>, long unsigned int>]’
/home/chris/github/freecad-source/src/Mod/Path/App/Area.cpp:2743:52:   required from here
/usr/local/include/boost/variant/detail/apply_visitor_binary.hpp:180:1: note: candidate: template<class Visitor, class Visitable1, class Visitable2> typename Visitor::result_type boost::apply_visitor(Visitor&, Visitable1&&, Visitable2&&)
 apply_visitor( Visitor& visitor, Visitable1&& visitable1, Visitable2&& visitable2)
 ^~~~~~~~~~~~~
/usr/local/include/boost/variant/detail/apply_visitor_binary.hpp:180:1: note:   template argument deduction/substitution failed:
and it goes on and on. (I hate template error messages, just next to useless).
Any thoughts? (Perhaps I should continue this thread on the install/compile forum as it seems to have moved beyond python3 problems).
*edit* started thread in install/compile forum so please reply there https://forum.freecadweb.org/viewtopic.php?f=4&t=47797
User avatar
voskos
Posts: 67
Joined: Mon Dec 21, 2020 4:22 pm
Location: Greece

Re: Porting to python3

Post by voskos »

There is a memory leak fixed in PyCXX 7.1.3, related to python3. Would there be any objection to me trying to PR sometime in the next month?
jtm2020hyo
Posts: 594
Joined: Wed Aug 12, 2020 1:24 am

Re: Porting to python3

Post by jtm2020hyo »

looo wrote: Fri Oct 05, 2018 7:01 am
Firefox (Linux):

Code: Select all

part-image points to:            file:///home/lo/conda/envs/freecad/data/Mod/Part/Resources/icons/PartWorkbench.svg
airplane-design-image points to: file:///home/lo/images/freecad.png
pyrate-image points to:          file:///home/lo/:/icons/pyrate_logo_icon.svg
glider-image points to:          file:///home/lo/glider_workbench.svg

maybe this should be changed since:

Code: Select all

pyrate-image points to: file:///home/lo/:/icons/pyrate_logo_icon.svg
to:

Code: Select all

pyrate-image points to: file:///home/lo/icons/pyrate_logo_icon.svg
Image
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Porting to python3

Post by wmayer »

voskos wrote: Mon Feb 01, 2021 9:47 am There is a memory leak fixed in PyCXX 7.1.3, related to python3. Would there be any objection to me trying to PR sometime in the next month?
Which memory leak? If you mean this one then it's already fixed here. It's a bug I have found and reported upstream

Here the bug report: https://sourceforge.net/p/cxx/bugs/43/
But I don't know why this is still open.
Post Reply