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

clang>=16 is not supported #139

Open
efferre79 opened this issue Mar 7, 2024 · 29 comments
Open

clang>=16 is not supported #139

efferre79 opened this issue Mar 7, 2024 · 29 comments

Comments

@efferre79
Copy link

I am using the CMakeLists.txt file from the repository, I have successfully created the bindings using clang 17, pywrap from master branch and pybind 2.11.1 but later I get many errors when starting to build. I am here reporting just the first lines from the build failure:

ninja -v -j8 -l16
[1/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DH
AVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/
work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr
/include/python3.11 -isystem /usr/include/python3.12  -march=core2 -O2 -pipe -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden 
-fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AdvApp2Var_pre.cpp.o -MF OCP/CMakeFiles/OCP.dir/AdvApp2Var_pre.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AdvApp2Var_pre.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AdvApp2Var_pre.cpp
FAILED: OCP/CMakeFiles/OCP.dir/AdvApp2Var_pre.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -march=core2 -O2 -pipe -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AdvApp2Var_pre.cpp.o -MF OCP/CMakeFiles/OCP.dir/AdvApp2Var_pre.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AdvApp2Var_pre.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AdvApp2Var_pre.cpp
In file included from /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AdvApp2Var_pre.cpp:114:
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx: In function \u2018void register_template_NCollection_Sequence(pybind11::object&, const char*)\u2019:
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:838:60: error: expected unqualified-id before \u2018*\u2019 token
              (iterator (NCollection_Sequence<TheItemType>::*)() const) &NCollection_Sequence<TheItemType>::begin,
                                                            ^
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:838:61: error: expected primary-expression before \u2018)\u2019 token
              (iterator (NCollection_Sequence<TheItemType>::*)() const) &NCollection_Sequence<TheItemType>::begin,
                                                             ^
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:838:15: warning: there are no arguments to \u2018iterator\u2019 that depend on a template parameter, so a declaration of \u2018iterator\u2019 must be available [-fpermissive]
              (iterator (NCollection_Sequence<TheItemType>::*)() const) &NCollection_Sequence<TheItemType>::begin,
               ^~~~~~~~
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:838:64: error: expected \u2018)\u2019 before \u2018const\u2019
              (iterator (NCollection_Sequence<TheItemType>::*)() const) &NCollection_Sequence<TheItemType>::begin,
              ~                                                 ^~~~~~
                                                                )
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx: In function \u2018void register_template_NCollection_EBTree(pybind11::object&, const char*)\u2019:
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:970:21: warning: ISO C++ forbids declaration of \u2018type name\u2019 with no type [-fpermissive]
              (const TreeNode & (NCollection_EBTree<TheObjType,TheBndType>::*)( const TheObjType &  ) const) &NCollection_EBTree<TheObjType,TheBndType>::FindNode,
                     ^~~~~~~~
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:970:15: error: expected primary-expression before \u2018const\u2019
              (const TreeNode & (NCollection_EBTree<TheObjType,TheBndType>::*)( const TheObjType &  ) const) &NCollection_EBTree<TheObjType,TheBndType>::FindNode,
               ^~~~~

<OMITTED REMAINING PART OF BUILD LOG ERRORS>

I am using GCC 12 and opencascade 7.7.2. I have also tried using gcc-8 or clang to build the CXX code without success.

@adam-urbanczyk which are the versions of build tools you suggest to use?

@adam-urbanczyk
Copy link
Member

I actually doubt that this is a toolchain issue. Could you first verify that you can compile the released generated sources with your toolchain to confirm/reject my doubt?

@efferre79
Copy link
Author

I cannot find any repo with the pywrap generated C++ files in the OCP subdir, can you kindly point to where I can find it?

@adam-urbanczyk
Copy link
Member

@efferre79
Copy link
Author

efferre79 commented Mar 9, 2024

By using the released stubs OCP_src_stubs_ubuntu-20.04.zip you suggested. the building starts but I get another error:

[146/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r2/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -march=core2 -O2 -pipe -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/ChFi3d.cpp.o -MF OCP/CMakeFiles/OCP.dir/ChFi3d.cpp.o.d -o OCP/CMakeFiles/OCP.dir/ChFi3d.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r2/work/OCP-7.7.2.0/OCP/ChFi3d.cpp
FAILED: OCP/CMakeFiles/OCP.dir/ChFi3d.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r2/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -march=core2 -O2 -pipe -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/ChFi3d.cpp.o -MF OCP/CMakeFiles/OCP.dir/ChFi3d.cpp.o.d -o OCP/CMakeFiles/OCP.dir/ChFi3d.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r2/work/OCP-7.7.2.0/OCP/ChFi3d.cpp
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r2/work/OCP-7.7.2.0/OCP/ChFi3d.cpp: In function ‘void register_ChFi3d(pybind11::module&)’:
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r2/work/OCP-7.7.2.0/OCP/ChFi3d.cpp:125:155: error: invalid ‘static_cast’ from type ‘Standard_Boolean (*)(const TopoDS_Edge&, const TopoDS_Face&, const TopoDS_Face&, GeomAbs_Shape)’ {aka ‘bool (*)(const TopoDS_Edge&, const TopoDS_Face&, const TopoDS_Face&, GeomAbs_Shape)’} to type ‘Standard_Boolean (*)(const TopoDS_Edge&, const TopoDS_Face&, const TopoDS_Face&, Standard_Real, GeomAbs_Shape)’ {aka ‘bool (*)(const TopoDS_Edge&, const TopoDS_Face&, const TopoDS_Face&, double, GeomAbs_Shape)’}
  125 |                     (Standard_Boolean (*)( const TopoDS_Edge & ,  const TopoDS_Face & ,  const TopoDS_Face & ,  Standard_Real ,  const GeomAbs_Shape  ) ) static_cast<Standard_Boolean (*)( const TopoDS_Edge & ,  const TopoDS_Face & ,  const TopoDS_Face & ,  Standard_Real ,  const GeomAbs_Shape  ) >(&ChFi3d::IsTangentFaces),
      |                                                                                                                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Furthermore by comparing the OCP sources between the released archive and the pywrap generated ones, they look quite different, for instance in the NCollection_tmpl.hxx file all the iterator related methods in register_template_NCollection_Sequence() are not present (in OCP_src_stubs_ubuntu-20.04.zip)

@efferre79
Copy link
Author

efferre79 commented Mar 9, 2024

It looks like that shipped bindings OCP_src_stubs_ubuntu-20.04.zip were generated from an unpublished opencascade version (same error reported in #138). The function IsTangentFaces() for opencascade-7.7.2 has only four arguments

@adam-urbanczyk
Copy link
Member

Interesting, in the version that was used (occt 7.7.2 available in in the conda-forge channel) I see this:

//! creation of spatial fillets on a solid.
class ChFi3d 
{
public:

  DEFINE_STANDARD_ALLOC

  //! Defines the type of concavity in the edge of connection of two faces
  Standard_EXPORT static ChFiDS_TypeOfConcavity DefineConnectType (const TopoDS_Edge&     E,
                                                                   const TopoDS_Face&     F1,
                                                                   const TopoDS_Face&     F2,
                                                                   const Standard_Real    SinTol,
                                                                   const Standard_Boolean CorrectPoint);

  //! Returns true if theEdge between theFace1 and theFace2 is tangent
  Standard_EXPORT static Standard_Boolean IsTangentFaces (const TopoDS_Edge& theEdge,
                                                          const TopoDS_Face& theFace1,
                                                          const TopoDS_Face& theFace2,
                                                          const GeomAbs_Shape Order = GeomAbs_G1);
  
  Standard_EXPORT static Standard_Boolean IsTangentFaces (const TopoDS_Edge& theEdge,
                                                          const TopoDS_Face& theFace1,
                                                          const TopoDS_Face& theFace2,
                                                          Standard_Real G1Tol,
                                                          const GeomAbs_Shape Order = GeomAbs_G1);

So two overloads. I do not understand what happened here.

@efferre79
Copy link
Author

Interesting, in the version that was used (occt 7.7.2 available in in the conda-forge channel) I see this:

//! creation of spatial fillets on a solid.
class ChFi3d 
{
public:

  DEFINE_STANDARD_ALLOC

  //! Defines the type of concavity in the edge of connection of two faces
  Standard_EXPORT static ChFiDS_TypeOfConcavity DefineConnectType (const TopoDS_Edge&     E,
                                                                   const TopoDS_Face&     F1,
                                                                   const TopoDS_Face&     F2,
                                                                   const Standard_Real    SinTol,
                                                                   const Standard_Boolean CorrectPoint);

  //! Returns true if theEdge between theFace1 and theFace2 is tangent
  Standard_EXPORT static Standard_Boolean IsTangentFaces (const TopoDS_Edge& theEdge,
                                                          const TopoDS_Face& theFace1,
                                                          const TopoDS_Face& theFace2,
                                                          const GeomAbs_Shape Order = GeomAbs_G1);
  
  Standard_EXPORT static Standard_Boolean IsTangentFaces (const TopoDS_Edge& theEdge,
                                                          const TopoDS_Face& theFace1,
                                                          const TopoDS_Face& theFace2,
                                                          Standard_Real G1Tol,
                                                          const GeomAbs_Shape Order = GeomAbs_G1);

So two overloads. I do not understand what happened here.

The change has been introduced here, maybe the author @Michsior14 can explain while the occt code in conda-forge is diverging from upstream. If that is really important because it solves an important issue, than I would strongly suggest to integrate the patch upstream!

@efferre79
Copy link
Author

@adam-urbanczyk the building error of this issue is related to an incomplete parsing of the API by pywrap.

Here I am guessing because I am far from being a C++ expert. If the class methods are using local types (e.g. the iterator typedef defined in the template class NCollection_Vector<TheItemType>), pywrap should use fully qualified identifiers (prepending the class name and the scope resolution operator).

For instance:

        .def("begin",
             (iterator (NCollection_Vector<TheItemType>::*)() const) &NCollection_Vector<TheItemType>::begin,
             R"#(Returns an iterator pointing to the first element in the vector.)#" )
        .def("end",

should become

        .def("begin",
             (typename NCollection_Vector<TheItemType>::iterator (NCollection_Vector<TheItemType>::*)() const) &NCollection_Vector<TheItemType>::begin,
             R"#(Returns an iterator pointing to the first element in the vector.)#" )
        .def("end",

in the output file OCP/NCollection_tmpl.hxx generated by pywrap. At least this solves the error from gcc, I was not able to complete the building process because there are many other errors like that.

Another similar error, this time

/usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK 
-DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0/work/OCP-7.
7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/py
thon3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fop
enmp -MD -MT CMakeFiles/OCP.dir/AppDef_pre.cpp.o -MF CMakeFiles/OCP.dir/AppDef_pre.cpp.o.d -o CMakeFiles/OCP.dir/AppDef_pre.cpp.o -c /var/tmp/portage/dev-pyt
hon/cadquery-ocp-7.7.2.0/work/OCP-7.7.2.0/OCP/AppDef_pre.cpp
In file included from /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0/work/OCP-7.7.2.0/OCP/AppDef_pre.cpp:267:
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx: In function ?void register_template_NCollection_UBTree(pybind11::
object&, const char*)?:
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:292:32: error: expected primary-expression before ?(? token
  292 |              (Standard_Integer (NCollection_UBTree<TheObjType,TheBndType>::*)( Selector &  ) const) &NCollection_UBTree<TheObjType,TheBndType>::Select,
      |                                ^
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:292:76: error: expected unqualified-id before ?*? token
  292 |              (Standard_Integer (NCollection_UBTree<TheObjType,TheBndType>::*)( Selector &  ) const) &NCollection_UBTree<TheObjType,TheBndType>::Select,
      |                                                                            ^
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0/work/OCP-7.7.2.0/OCP/NCollection_tmpl.hxx:292:77: error: expected primary-expression before ?)? token
  292 |              (Standard_Integer (NCollection_UBTree<TheObjType,TheBndType>::*)( Selector &  ) const) &NCollection_UBTree<TheObjType,TheBndType>::Select,
      |                                                                             ^

here the argument to Select() method should be qualified to NCollection_UBTree<TheObjType,TheBndType>::Selector.

@adam-urbanczyk
Copy link
Member

Yes, that sounds more like it. If this one overload is blocking, I can update ocp.toml to wrap it manually and make a new release. Otherwise, please share the stdout of your pywrap call. Note that I'll have limited time to help with this kind of issue. CI is green, so you should be able to reproduce the build.

@Michsior14
Copy link

Michsior14 commented Mar 10, 2024

Interesting, in the version that was used (occt 7.7.2 available in in the conda-forge channel) I see this:

//! creation of spatial fillets on a solid.
class ChFi3d 
{
public:

  DEFINE_STANDARD_ALLOC

  //! Defines the type of concavity in the edge of connection of two faces
  Standard_EXPORT static ChFiDS_TypeOfConcavity DefineConnectType (const TopoDS_Edge&     E,
                                                                   const TopoDS_Face&     F1,
                                                                   const TopoDS_Face&     F2,
                                                                   const Standard_Real    SinTol,
                                                                   const Standard_Boolean CorrectPoint);

  //! Returns true if theEdge between theFace1 and theFace2 is tangent
  Standard_EXPORT static Standard_Boolean IsTangentFaces (const TopoDS_Edge& theEdge,
                                                          const TopoDS_Face& theFace1,
                                                          const TopoDS_Face& theFace2,
                                                          const GeomAbs_Shape Order = GeomAbs_G1);
  
  Standard_EXPORT static Standard_Boolean IsTangentFaces (const TopoDS_Edge& theEdge,
                                                          const TopoDS_Face& theFace1,
                                                          const TopoDS_Face& theFace2,
                                                          Standard_Real G1Tol,
                                                          const GeomAbs_Shape Order = GeomAbs_G1);

So two overloads. I do not understand what happened here.

The change has been introduced here, maybe the author @Michsior14 can explain while the occt code in conda-forge is diverging from upstream. If that is really important because it solves an important issue, than I would strongly suggest to integrate the patch upstream!

You would need to ask bloblfish or occt-feedstock maintainers. I've only updated the patch to v7.8.0 (it's been introduced some versions ago already).

@efferre79
Copy link
Author

The change has been introduced here, maybe the author @Michsior14 can explain while the occt code in conda-forge is diverging from upstream. If that is really important because it solves an important issue, than I would strongly suggest to integrate the patch upstream!

You would need to ask bloblfish or occt-feedstock maintainers. I've only updated the patch to v7.8.0 (it's been introduced some versions ago already).

already opened an issue

@adam-urbanczyk
Copy link
Member

@efferre79 any thoughts/updates?

[...] I can update ocp.toml to wrap it manually and make a new release. Otherwise, please share the stdout of your pywrap call. Note that I'll have limited time to help with this kind of issue. CI is green, so you should be able to reproduce the build.

@efferre79
Copy link
Author

@adam-urbanczyk sorry for the latency but up to now I was trying to patch pywrap to improve the generated code from the current ocp.toml. Here you can find the log I get during the source configuration done by cmake. Let me know if that is what you asked for.

@efferre79
Copy link
Author

efferre79 commented Mar 17, 2024

@adam-urbanczyk I have created a starting point to modify pywrap and fixing at least partially this issue, if you have time have a look at my branch innertypes.

Right now I am stuck because I am facing something weird probably depending on a libclang bug, the error I get is the following:

ninja -v -j16 -l16
[1/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/Adaptor2d_pre.cpp.o -MF OCP/CMakeFiles/OCP.dir/Adaptor2d_pre.cpp.o.d -o OCP/CMakeFiles/OCP.dir/Adaptor2d_pre.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/Adaptor2d_pre.cpp
[2/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AppCont_pre.cpp.o -MF OCP/CMakeFiles/OCP.dir/AppCont_pre.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AppCont_pre.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppCont_pre.cpp
[3/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AppBlend_pre.cpp.o -MF OCP/CMakeFiles/OCP.dir/AppBlend_pre.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AppBlend_pre.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppBlend_pre.cpp
[4/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AdvApprox_pre.cpp.o -MF OCP/CMakeFiles/OCP.dir/AdvApprox_pre.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AdvApprox_pre.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AdvApprox_pre.cpp
[5/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/Adaptor3d_pre.cpp.o -MF OCP/CMakeFiles/OCP.dir/Adaptor3d_pre.cpp.o.d -o OCP/CMakeFiles/OCP.dir/Adaptor3d_pre.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/Adaptor3d_pre.cpp
[6/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AppBlend.cpp.o -MF OCP/CMakeFiles/OCP.dir/AppBlend.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AppBlend.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppBlend.cpp
[7/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AppCont.cpp.o -MF OCP/CMakeFiles/OCP.dir/AppCont.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AppCont.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppCont.cpp
[8/630] /usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AppDef.cpp.o -MF OCP/CMakeFiles/OCP.dir/AppDef.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AppDef.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppDef.cpp
�[31mFAILED: �[0mOCP/CMakeFiles/OCP.dir/AppDef.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DHAVE_FFMPEG -DHAVE_FREETYPE -DHAVE_Inspector -DHAVE_OPENGL_EXT -DHAVE_QT -DHAVE_RAPIDJSON -DHAVE_TBB -DHAVE_TK -DHAVE_VTK -DHAVE_XLIB -DOCC_CONVERT_SIGNALS -DOCP_EXPORTS -DVTK_OPENGL2_BACKEND -Dkiss_fft_scalar=double -I/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP -isystem /usr/include/opencascade -isystem /usr/include/vtk-9.2 -isystem /usr/include/freetype2 -isystem /usr/include/SDL2 -isystem /usr/include/python3.11 -isystem /usr/include/python3.12  -O2 -pipe -march=znver3 -ggdb -std=gnu++17 -fPIC -fpermissive -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -MD -MT OCP/CMakeFiles/OCP.dir/AppDef.cpp.o -MF OCP/CMakeFiles/OCP.dir/AppDef.cpp.o.d -o OCP/CMakeFiles/OCP.dir/AppDef.cpp.o -c /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppDef.cpp
In file included from /usr/include/pybind11/pybind11.h:14,
                 from /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppDef.cpp:6:
/usr/include/pybind11/detail/init.h: In instantiation of ‘Class* pybind11::detail::initimpl::construct_or_initialize(Args&& ...) [with Class = AppDef_HArray1OfMultiPointConstraint; Args = {const int, const int, const int&}; typename std::enable_if<(! std::is_constructible<_Tp, _Args>::value), int>::type <anonymous> = 0]’:
/usr/include/pybind11/detail/init.h:206:70:   required from ‘static void pybind11::detail::initimpl::constructor<Args>::execute(Class&, const Extra& ...) [with Class = pybind11::class_<AppDef_HArray1OfMultiPointConstraint, opencascade::handle<AppDef_HArray1OfMultiPointConstraint>, Standard_Transient>; Extra = {pybind11::arg, pybind11::arg, pybind11::arg}; typename std::enable_if<(! Class::has_alias), int>::type <anonymous> = 0; Args = {const int, const int, const int&}]’
/usr/include/pybind11/pybind11.h:1613:21:   required from ‘pybind11::class_<type_, options>& pybind11::class_<type_, options>::def(const pybind11::detail::initimpl::constructor<Args ...>&, const Extra& ...) [with Args = {const int, const int, const int&}; Extra = {pybind11::arg, pybind11::arg, pybind11::arg}; type_ = AppDef_HArray1OfMultiPointConstraint; options = {opencascade::handle<AppDef_HArray1OfMultiPointConstraint>, Standard_Transient}]’
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppDef.cpp:810:13:   required from here
/usr/include/pybind11/detail/init.h:82:12: error: no matching function for call to ‘AppDef_HArray1OfMultiPointConstraint::AppDef_HArray1OfMultiPointConstraint(<brace-enclosed initializer list>)’
   82 |     return new Class{std::forward<Args>(args)...};
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/opencascade/TColgp_HArray1OfVec.hxx:21,
                 from /usr/include/opencascade/AppDef_MultiPointConstraint.hxx:27,
                 from /usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:20,
                 from /usr/include/opencascade/AppDef_MultiLine.hxx:24,
                 from /var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/AppDef.cpp:22:
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note: candidate: ‘AppDef_HArray1OfMultiPointConstraint::AppDef_HArray1OfMultiPointConstraint(const AppDef_Array1OfMultiPointConstraint&)’
   24 | DEFINE_HARRAY1(AppDef_HArray1OfMultiPointConstraint, AppDef_Array1OfMultiPointConstraint)
      | ^~~~~~~~~~~~~~
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note:   candidate expects 1 argument, 3 provided
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note: candidate: ‘AppDef_HArray1OfMultiPointConstraint::AppDef_HArray1OfMultiPointConstraint(Standard_Integer, Standard_Integer, const NCollection_Array1<AppDef_MultiPointConstraint>::value_type&)’
   24 | DEFINE_HARRAY1(AppDef_HArray1OfMultiPointConstraint, AppDef_Array1OfMultiPointConstraint)
      | ^~~~~~~~~~~~~~
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note:   no known conversion for argument 3 from ‘const int’ to ‘const NCollection_Array1<AppDef_MultiPointConstraint>::value_type&’ {aka ‘const AppDef_MultiPointConstraint&’}
   24 | DEFINE_HARRAY1(AppDef_HArray1OfMultiPointConstraint, AppDef_Array1OfMultiPointConstraint)
      | ^~~~~~~~~~~~~~
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note: candidate: ‘AppDef_HArray1OfMultiPointConstraint::AppDef_HArray1OfMultiPointConstraint(Standard_Integer, Standard_Integer)’
   24 | DEFINE_HARRAY1(AppDef_HArray1OfMultiPointConstraint, AppDef_Array1OfMultiPointConstraint)
      | ^~~~~~~~~~~~~~
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note:   candidate expects 2 arguments, 3 provided
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note: candidate: ‘AppDef_HArray1OfMultiPointConstraint::AppDef_HArray1OfMultiPointConstraint()’
   24 | DEFINE_HARRAY1(AppDef_HArray1OfMultiPointConstraint, AppDef_Array1OfMultiPointConstraint)
      | ^~~~~~~~~~~~~~
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note:   candidate expects 0 arguments, 3 provided
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note: candidate: ‘AppDef_HArray1OfMultiPointConstraint::AppDef_HArray1OfMultiPointConstraint(const AppDef_HArray1OfMultiPointConstraint&)’
   24 | DEFINE_HARRAY1(AppDef_HArray1OfMultiPointConstraint, AppDef_Array1OfMultiPointConstraint)
      | ^~~~~~~~~~~~~~
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note:   candidate expects 1 argument, 3 provided
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note: candidate: ‘AppDef_HArray1OfMultiPointConstraint::AppDef_HArray1OfMultiPointConstraint(AppDef_HArray1OfMultiPointConstraint&&)’
/usr/include/opencascade/AppDef_HArray1OfMultiPointConstraint.hxx:24:1: note:   candidate expects 1 argument, 3 provided

I have written a stupid python script to demonstrate the problem, the parsing of the args of AppDef_HArray1OfMultiPointConstraint class constructors is not correct and leads to the error above. I am using clang-17

@adam-urbanczyk
Copy link
Member

In the log dump that you shared you have this:

  0%|          | 0/314 [00:00<?, ?it/s][W 240314 09:52:14 translation_unit:52] ./opencascade/Standard_DefineException.hxx
[W 240314 09:52:14 translation_unit:53] /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/cstddef:50:10: fatal error: 'stddef.h' file not found

You'll need to specify correct/additional (I'm not sure what they are) include dirs for your env.

@adam-urbanczyk
Copy link
Member

Maybe #140 solves the issue, let's see

@efferre79
Copy link
Author

efferre79 commented Mar 17, 2024

Maybe #140 solves the issue, let's see

Almost, on my system I had to further patch the CMakeLists.txt your implicit-includes branch as follows (otherwise -i takes the separating space as first character of the path):

--- ./CMakeLists.txt    2024-03-17 22:02:52.569280098 +0100
+++ ./CMakeLists.txt.new    2024-03-17 22:05:24.544281844 +0100
@@ -34,7 +34,8 @@
 message( STATUS "Include dirs: ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}")
 
 foreach( inc IN LISTS CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)
-    list( APPEND CXX_INCLUDES "-i ${inc}/")
+    list( APPEND CXX_INCLUDES "-i" ) 
+    list( APPEND CXX_INCLUDES "${inc}/" )
 endforeach()
 
 if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")

But I would avoid forcing CXX_INCLUDES value with CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES (there is a reason they are not set, see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_IMPLICIT_INCLUDE_DIRECTORIES.html). When gcc is used as compiler, it already knows them so it is not needed. I will try later with clang as CXX.

So I think it is better to provide them to pywrap execution only, e.g. defining a new PYWRAP_CXX_INCLUDES variable.

Furthermore your #140 (patched as told above) is solving also my issue with AppDef_HArray1OfMultiPointConstraint class constructors described here. I still get another error in the methods definition for non templates but probably that can be solved by further improving the patch of my pywrap branch. Working on it right now.

@adam-urbanczyk
Copy link
Member

AFAIK CXX_INCLUDES has no special meaning as a cmake variable and is not used. Are you maybe confusing it with an env variable?

@efferre79
Copy link
Author

AFAIK CXX_INCLUDES has no special meaning as a cmake variable and is not used. Are you maybe confusing it with an env variable?

Yes, you are right. The name misled me, sorry for the noise.

@efferre79
Copy link
Author

efferre79 commented Mar 24, 2024

hello @adam-urbanczyk, I have improved the pywrap code to almost successfully compile OCP. You can find the changes in my innertypes branch. I haven't created a pull request yet because only one missing error must be solved but I don't know what to do from the C++ point of view. The error I get is the following:

/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/OpenGl.cpp:4269:15: error: \u2018template<class T, int N> class BVH_Set\u2019 used without tem
plate arguments
 4269 |              (BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const) static_cast<BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const>(&OpenGl_TriangleSet::Box),
      |               ^~~~~~~
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/OpenGl.cpp:4269:55: error: expected unqualified-id before \u2018*\u2019 token
 4269 |              (BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const) static_cast<BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const>(&OpenGl_TriangleSet::Box),
      |                                                       ^
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/OpenGl.cpp:4269:56: error: expected primary-expression before \u2018)\u2019 token
 4269 |              (BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const) static_cast<BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const>(&OpenGl_TriangleSet::Box),
      |                                                        ^
/var/tmp/portage/dev-python/cadquery-ocp-7.7.2.0-r1/work/OCP-7.7.2.0/OCP/OpenGl.cpp:4269:59: error: expected \u2018)\u2019 before \u2018const\u2019
 4269 |              (BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const) static_cast<BVH_Set::BVH_BoxNt (OpenGl_TriangleSet::*)() const>(&OpenGl_TriangleSet::Box),
      |              ~                                            ^~~~~~

where of course the BVH_Set::BVH_BoxNt qualification comes out with my patch (the original code provides BVH_BoxNt which leads to a similar error shown at the beginning of this issue). Now the problem is that BVH_Set is a template class used by a typedef in the regular class OpenGl_TriangleSet. If I produce BVH_Set<T,N>::BVH_BoxNt it doesn't work as well because used in a non-template register function.

So currently I added OpenGl_TriangleSet::Box to the excluded methods list for the OpenGl module. I have seen that there are many blacklisted things in ocp.toml so the bindings would be incomplete anyway.

Moreover this is the difference in the shipped includes vs upstream files, wondering if something else should be added to ocp.toml:

--- /dev/fd/63	2024-03-24 16:15:37.525863873 +0100
+++ /dev/fd/62	2024-03-24 16:15:37.525863873 +0100
@@ -402,6 +402,9 @@
 BOPDS_VectorOfPoint.hxx
 BOPDS_VectorOfShapeInfo.hxx
 BOPDS_VectorOfVectorOfPair.hxx
+BOPTest.hxx
+BOPTest_DrawableShape.hxx
+BOPTest_Objects.hxx
 BOPTools_AlgoTools.hxx
 BOPTools_AlgoTools2D.hxx
 BOPTools_AlgoTools3D.hxx
@@ -889,6 +892,9 @@
 BRepSweep_Tool.hxx
 BRepSweep_Translation.hxx
 BRepSweep_Trsf.hxx
+BRepTest.hxx
+BRepTest_DrawableHistory.hxx
+BRepTest_Objects.hxx
 BRepToIGESBRep_Entity.hxx
 BRepToIGES_BREntity.hxx
 BRepToIGES_BRShell.hxx
@@ -1363,6 +1369,34 @@
 Convert_SequenceOfArray1OfPoles2d.hxx
 Convert_SphereToBSplineSurface.hxx
 Convert_TorusToBSplineSurface.hxx
+DBRep.hxx
+DBRep_DrawableShape.hxx
+DBRep_Edge.hxx
+DBRep_Edge.lxx
+DBRep_Face.hxx
+DBRep_Face.lxx
+DBRep_HideData.hxx
+DBRep_IsoBuilder.hxx
+DBRep_ListIteratorOfListOfEdge.hxx
+DBRep_ListIteratorOfListOfFace.hxx
+DBRep_ListIteratorOfListOfHideData.hxx
+DBRep_ListOfEdge.hxx
+DBRep_ListOfFace.hxx
+DBRep_ListOfHideData.hxx
+DBRep_Params.hxx
+DDF.hxx
+DDF_AttributeBrowser.hxx
+DDF_Browser.hxx
+DDF_Data.hxx
+DDF_ListIteratorOfTransactionStack.hxx
+DDF_Transaction.hxx
+DDF_TransactionStack.hxx
+DDataStd.hxx
+DDataStd_DrawDriver.hxx
+DDataStd_DrawPresentation.hxx
+DDataStd_TreeBrowser.hxx
+DDocStd.hxx
+DDocStd_DrawDocument.hxx
 DEBRepCascade_ConfigurationNode.hxx
 DEBRepCascade_Provider.hxx
 DEXCAFCascade_ConfigurationNode.hxx
@@ -1371,6 +1405,21 @@
 DE_ConfigurationNode.hxx
 DE_Provider.hxx
 DE_Wrapper.hxx
+DNaming.hxx
+DNaming_BooleanOperationDriver.hxx
+DNaming_BoxDriver.hxx
+DNaming_CylinderDriver.hxx
+DNaming_DataMapIteratorOfDataMapOfShapeOfName.hxx
+DNaming_DataMapOfShapeOfName.hxx
+DNaming_FilletDriver.hxx
+DNaming_Line3DDriver.hxx
+DNaming_PointDriver.hxx
+DNaming_PrismDriver.hxx
+DNaming_RevolutionDriver.hxx
+DNaming_SelectionDriver.hxx
+DNaming_SphereDriver.hxx
+DNaming_TransformationDriver.hxx
+DPrsStd.hxx
 Draft.hxx
 Draft_EdgeInfo.hxx
 Draft_ErrorStatus.hxx
@@ -1380,6 +1429,70 @@
 Draft_IndexedDataMapOfVertexVertexInfo.hxx
 Draft_Modification.hxx
 Draft_VertexInfo.hxx
+Draw.hxx
+DrawDim.hxx
+DrawDim_Angle.hxx
+DrawDim_Dimension.hxx
+DrawDim_Distance.hxx
+DrawDim_PlanarAngle.hxx
+DrawDim_PlanarDiameter.hxx
+DrawDim_PlanarDimension.hxx
+DrawDim_PlanarDistance.hxx
+DrawDim_PlanarRadius.hxx
+DrawDim_Radius.hxx
+DrawFairCurve_Batten.hxx
+DrawFairCurve_MinimalVariation.hxx
+DrawTrSurf.hxx
+DrawTrSurf_BSplineCurve.hxx
+DrawTrSurf_BSplineCurve2d.hxx
+DrawTrSurf_BSplineSurface.hxx
+DrawTrSurf_BezierCurve.hxx
+DrawTrSurf_BezierCurve2d.hxx
+DrawTrSurf_BezierSurface.hxx
+DrawTrSurf_Curve.hxx
+DrawTrSurf_Curve2d.hxx
+DrawTrSurf_Drawable.hxx
+DrawTrSurf_Params.hxx
+DrawTrSurf_Point.hxx
+DrawTrSurf_Polygon2D.hxx
+DrawTrSurf_Polygon3D.hxx
+DrawTrSurf_Surface.hxx
+DrawTrSurf_Triangulation.hxx
+DrawTrSurf_Triangulation2D.hxx
+Draw_Appli.hxx
+Draw_Axis2D.hxx
+Draw_Axis3D.hxx
+Draw_Box.hxx
+Draw_Chronometer.hxx
+Draw_Circle2D.hxx
+Draw_Circle3D.hxx
+Draw_Color.hxx
+Draw_ColorKind.hxx
+Draw_Display.hxx
+Draw_Drawable2D.hxx
+Draw_Drawable3D.hxx
+Draw_Failure.hxx
+Draw_Grid.hxx
+Draw_Grid.lxx
+Draw_Interpretor.hxx
+Draw_Main.hxx
+Draw_MapOfAsciiString.hxx
+Draw_Marker2D.hxx
+Draw_Marker3D.hxx
+Draw_MarkerShape.hxx
+Draw_Number.hxx
+Draw_PInterp.hxx
+Draw_PluginMacro.hxx
+Draw_Printer.hxx
+Draw_ProgressIndicator.hxx
+Draw_Segment2D.hxx
+Draw_Segment3D.hxx
+Draw_SequenceOfDrawable3D.hxx
+Draw_Text2D.hxx
+Draw_Text3D.hxx
+Draw_View.hxx
+Draw_Viewer.hxx
+Draw_Window.hxx
 DsgPrs.hxx
 DsgPrs_AnglePresentation.hxx
 DsgPrs_ArrowSide.hxx
@@ -2166,6 +2279,9 @@
 Geom_UndefinedValue.hxx
 Geom_Vector.hxx
 Geom_VectorWithMagnitude.hxx
+GeometryTest.hxx
+GeometryTest_DrawableQualifiedCurve2d.hxx
+GeomliteTest.hxx
 Graphic3d_AlphaMode.hxx
 Graphic3d_ArrayFlags.hxx
 Graphic3d_ArrayOfPoints.hxx
@@ -2430,6 +2546,15 @@
 HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf.hxx
 HLRBRep_TypeOfResultingEdge.hxx
 HLRBRep_VertexList.hxx
+HLRTest.hxx
+HLRTest_DrawableEdgeTool.hxx
+HLRTest_DrawablePolyEdgeTool.hxx
+HLRTest_DrawablePolyEdgeTool.lxx
+HLRTest_OutLiner.hxx
+HLRTest_OutLiner.lxx
+HLRTest_Projector.hxx
+HLRTest_ShapeData.hxx
+HLRTest_ShapeData.lxx
 HLRTopoBRep_DSFiller.hxx
 HLRTopoBRep_Data.hxx
 HLRTopoBRep_Data.lxx
@@ -3090,6 +3215,9 @@
 IMeshTools_Parameters.hxx
 IMeshTools_ShapeExplorer.hxx
 IMeshTools_ShapeVisitor.hxx
+IVtkDraw.hxx
+IVtkDraw_HighlightAndSelectionPipeline.hxx
+IVtkDraw_Interactor.hxx
 IVtkOCC_SelectableObject.hxx
 IVtkOCC_Shape.hxx
 IVtkOCC_ShapeMesher.hxx
@@ -3673,6 +3801,8 @@
 Media_PlayerContext.hxx
 Media_Scaler.hxx
 Media_Timer.hxx
+MeshTest.hxx
+MeshTest_CheckTopology.hxx
 MeshVS_Array1OfSequenceOfInteger.hxx
 MeshVS_Buffer.hxx
 MeshVS_BuilderPriority.hxx
@@ -3771,6 +3901,7 @@
 Message_SequenceOfPrinters.hxx
 Message_Status.hxx
 Message_StatusType.hxx
+ModelDefinitions.hxx
 MoniTool_AttrList.hxx
 MoniTool_CaseData.hxx
 MoniTool_DataInfo.hxx
@@ -3945,6 +4076,7 @@
 OSD_Timer.hxx
 OSD_WNT.hxx
 OSD_WhoAmI.hxx
+OpenGlTest.hxx
 OpenGl_ArbDbg.hxx
 OpenGl_ArbFBO.hxx
 OpenGl_ArbIns.hxx
@@ -4231,6 +4363,19 @@
 PrsMgr_PresentationManager3d.hxx
 PrsMgr_Presentations.hxx
 PrsMgr_TypeOfPresentation3d.hxx
+QABugs.hxx
+QABugs_PresentableObject.hxx
+QADNaming.hxx
+QADraw.hxx
+QANCollection.hxx
+QANCollection_Common.hxx
+QANCollection_DataMapIteratorOfDataMapOfRealPnt.hxx
+QANCollection_DataMapOfRealPnt.hxx
+QANCollection_DoubleMapIteratorOfDoubleMapOfRealInteger.hxx
+QANCollection_DoubleMapOfRealInteger.hxx
+QANCollection_IndexedDataMapOfRealPnt.hxx
+QANCollection_ListIteratorOfListOfPnt.hxx
+QANCollection_ListOfPnt.hxx
 Quantity_Array1OfColor.hxx
 Quantity_Color.hxx
 Quantity_ColorHasher.hxx
@@ -5066,6 +5211,15 @@
 STEPSelections_SelectInstances.hxx
 STEPSelections_SequenceOfAssemblyComponent.hxx
 STEPSelections_SequenceOfAssemblyLink.hxx
+SWDRAW.hxx
+SWDRAW_ShapeAnalysis.hxx
+SWDRAW_ShapeCustom.hxx
+SWDRAW_ShapeExtend.hxx
+SWDRAW_ShapeFix.hxx
+SWDRAW_ShapeProcess.hxx
+SWDRAW_ShapeProcessAPI.hxx
+SWDRAW_ShapeTool.hxx
+SWDRAW_ShapeUpgrade.hxx
 Select3D_BVHBuilder3d.hxx
 Select3D_BVHIndexBuffer.hxx
 Select3D_BndBox3d.hxx
@@ -7179,6 +7333,7 @@
 TNaming_Translator.hxx
 TNaming_UsedShapes.hxx
 TNaming_UsedShapes.lxx
+TObjDRAW.hxx
 TObj_Application.hxx
 TObj_Assistant.hxx
 TObj_CheckModel.hxx
@@ -7749,6 +7904,14 @@
 V3d_View.hxx
 V3d_Viewer.hxx
 V3d_ViewerPointer.hxx
+ViewerTest.hxx
+ViewerTest_AutoUpdater.hxx
+ViewerTest_CmdParser.hxx
+ViewerTest_ContinuousRedrawer.hxx
+ViewerTest_DoubleMapIteratorOfDoubleMapOfInteractiveAndName.hxx
+ViewerTest_DoubleMapOfInteractiveAndName.hxx
+ViewerTest_EventManager.hxx
+ViewerTest_V3dView.hxx
 Vrml.hxx
 VrmlAPI.hxx
 VrmlAPI_CafReader.hxx
@@ -7950,6 +8113,15 @@
 XCAFPrs_Texture.hxx
 XCAFView_Object.hxx
 XCAFView_ProjectionType.hxx
+XDEDRAW.hxx
+XDEDRAW_Colors.hxx
+XDEDRAW_Common.hxx
+XDEDRAW_GDTs.hxx
+XDEDRAW_Layers.hxx
+XDEDRAW_Notes.hxx
+XDEDRAW_Props.hxx
+XDEDRAW_Shapes.hxx
+XDEDRAW_Views.hxx
 XSAlgo.hxx
 XSAlgo_AlgoContainer.hxx
 XSAlgo_AlgoContainer.lxx
@@ -7969,6 +8141,19 @@
 XSControl_Vars.hxx
 XSControl_WorkSession.hxx
 XSControl_Writer.hxx
+XSDRAW.hxx
+XSDRAWIGES.hxx
+XSDRAWSTEP.hxx
+XSDRAWSTLVRML.hxx
+XSDRAWSTLVRML_CoordsMap.hxx
+XSDRAWSTLVRML_DataMapIteratorOfCoordsMap.hxx
+XSDRAWSTLVRML_DataMapIteratorOfElemNodesMap.hxx
+XSDRAWSTLVRML_DataSource.hxx
+XSDRAWSTLVRML_DataSource3D.hxx
+XSDRAWSTLVRML_DrawableMesh.hxx
+XSDRAWSTLVRML_ElemNodesMap.hxx
+XSDRAW_Functions.hxx
+XSDRAW_Vars.hxx
 XmlDrivers.hxx
 XmlDrivers_DocumentRetrievalDriver.hxx
 XmlDrivers_DocumentStorageDriver.hxx
@@ -8138,6 +8323,7 @@
 gp_XY.hxx
 gp_XYZ.hxx
 igesread.h
+inspector
 math.hxx
 math_Array1OfValueAndWeight.hxx
 math_BFGS.hxx

@adam-urbanczyk
Copy link
Member

Too many changes at once, I'm afraid. What is the problem you are facing, can you generate code without warnings other than seen in the CI. If so, what is the delta of the generated code wrt to the released one [other than related to the patches of blobfish]?

@efferre79
Copy link
Author

here is the diff between the generated bindings (which don't compile) and the contents of OCP_src_stubs_ubuntu-20.04.zip

@adam-urbanczyk
Copy link
Member

How about warnings?

@efferre79
Copy link
Author

Here is the output from cmake

-- The C compiler identification is GNU 12.3.1
-- The CXX compiler identification is GNU 12.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test HAVE_FFI_CALL
-- Performing Test HAVE_FFI_CALL - Success
-- Found FFI: /usr/lib64/libffi.so  
-- Performing Test Terminfo_LINKABLE
-- Performing Test Terminfo_LINKABLE - Success
-- Found Terminfo: /usr/lib64/libtinfo.so  
-- Found ZLIB: /usr/lib64/libz.so (found version "1.3")  
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.12.5") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found OGG: /usr/lib64/libogg.so  
-- Found THEORA: /usr/lib64/libtheora.so  
-- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "2.1.1") 
-- Found PEGTL: /usr/include/tao (found suitable version "2.8.3", minimum required is "2.0.0") 
-- Found FFMPEG: /usr/include (found suitable version "4.4.4", minimum required is "4.4") found components: avformat avcodec avutil swscale swresample 
-- Found GL2PS: /usr/lib64/libgl2ps.so (found suitable version "1.4.2", minimum required is "1.4.2") 
-- Found LibHaru: /usr/lib64/libhpdf.so (found suitable version "2.4.2", minimum required is "2.4.0") 
-- Found JsonCpp: /usr/lib64/libjsoncpp.so (found suitable version "1.9.5", minimum required is "0.7.0") 
-- Found NetCDF: /usr/include (found version "4.9.2") 
-- Found CGNS: /usr/include (found suitable version "4.30", minimum required is "4.10") 
-- Found HDF5: /usr/lib64/libhdf5.so;/usr/lib64/libz.so;/usr/lib64/libdl.a;/usr/lib64/libm.so (found version "1.14.3") found components: C HL 
-- Found Boost: /usr/lib64/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable exact version "1.84.0")  
-- Found Boost: /usr/lib64/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable exact version "1.84.0") found components: serialization 
-- Found LibPROJ: /usr/lib64/libproj.so (found version "9.2.1") 
-- Found SQLite3: /usr/include (found version "3.45.1") 
-- Found nlohmann_json: /usr/share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake (found version "3.11.2") 
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found GLEW: /usr/lib64/libGLEW.so  
-- Found OpenGL: /usr/lib64/libOpenGL.so  found components: OpenGL GLX 
-- Found Python3: /usr/bin/python3.12 (found suitable version "3.12.2", minimum required is "3.11") found components: Interpreter Development.Module Development.Embed 
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.5.0") 
-- Found LZMA: /usr/lib64/liblzma.so (found version "5.4.6") 
-- Found LZ4: /usr/lib64/liblz4.so (found version "1.9.4") 
-- Found double-conversion: /usr/lib64/libdouble-conversion.so  
-- Found Eigen3: /usr/include/eigen3 (found version "3.4.0") 
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.6.0")  
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.43+apng") 
-- Found JPEG: /usr/lib64/libjpeg.so (found version "62") 
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.13.2") 
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found utf8cpp: /usr/include/utf8cpp  
-- RapidJSON found. Headers: /usr/include
-- Found Python: /usr/bin/python3.11 (found suitable version "3.11.8", minimum required is "3.9") found components: Interpreter Development Development.Module Development.Embed 
[I 240324 22:23:31 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKernel.so.7.7.2
[I 240324 22:23:31 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKMath.so.7.7.2
[I 240324 22:23:31 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKG2d.so.7.7.2
[I 240324 22:23:31 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKG3d.so.7.7.2
[I 240324 22:23:31 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKGeomBase.so.7.7.2
[I 240324 22:23:32 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKBRep.so.7.7.2
[I 240324 22:23:32 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKGeomAlgo.so.7.7.2
[I 240324 22:23:32 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKTopAlgo.so.7.7.2
[I 240324 22:23:32 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKPrim.so.7.7.2
[I 240324 22:23:32 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKBO.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKShHealing.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKBool.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKHLR.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKFillet.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKOffset.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKFeat.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKMesh.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXMesh.so.7.7.2
[I 240324 22:23:33 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKService.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKV3d.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKOpenGl.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKMeshVS.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKIVtk.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKCDF.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKLCAF.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKCAF.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKBinL.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXmlL.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKBin.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXml.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKStdL.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKStd.so.7.7.2
[I 240324 22:23:34 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKTObj.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKBinTObj.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXmlTObj.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKVCAF.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXDE.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXSBase.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKSTEPBase.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKSTEPAttr.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKSTEP209.so.7.7.2
[I 240324 22:23:35 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKSTEP.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKIGES.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXCAF.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXDEIGES.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXDESTEP.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKSTL.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKVRML.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKRWMesh.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXmlXCAF.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKBinXCAF.so.7.7.2
[I 240324 22:23:36 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXDECascade.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKDraw.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKTopTest.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKOpenGlTest.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKViewerTest.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXSDRAW.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKDCAF.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKXDEDRAW.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKTObjDRAW.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKQADraw.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKIVtkDraw.so.7.7.2
[I 240324 22:23:37 dump_symbols:14] Analyzing /usr/lib64/opencascade/libTKExpress.so.7.7.2
-- Include dirs: /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12;/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/x86_64-pc-linux-gnu;/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/backward;/usr/lib/gcc/x86_64-pc-linux-gnu/12/include;/usr/lib/gcc/x86_64-pc-linux-gnu/12/include-fixed;/usr/include
-- Running pywrap
'/usr/bin/python3.11' '-m' 'bindgen' '-n' '16' '-l' '/usr/lib/llvm/17/lib64/libclang.so.17.0.6' '-i' '/usr/lib/llvm/17/include/' '-i' '/usr/include/vtk-9.2/' '-i' '/usr/lib/llvm/17/include' '-i' '/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/' '-i' '/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/x86_64-pc-linux-gnu/' '-i' '/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/backward/' '-i' '/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/' '-i' '/usr/lib/gcc/x86_64-pc-linux-gnu/12/include-fixed/' '-i' '/usr/include/' 'all' 'ocp.toml' 'Linux'
[W 240324 22:25:24 translation_unit:57] ./opencascade/Standard_WarningsRestore.hxx
[W 240324 22:25:24 translation_unit:58] dummy.cxx:42:31: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
[W 240324 22:27:18 translation_unit:57] ./opencascade/BRepExtrema_ProximityValueTool.hxx
[W 240324 22:27:18 translation_unit:58] dummy.cxx:12:1: error: unexpected character <U+FEFF>
100%|| 314/314 [08:22<00:00,  1.60s/it]
[W 240324 22:33:51 translation_unit:57] ./opencascade/IVtkTools_DisplayModeFilter.hxx
[W 240324 22:33:51 translation_unit:58] ./opencascade/IVtkTools_SubPolyDataFilter.hxx:38:8: warning: 'PrintSelf' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
[W 240324 22:33:51 translation_unit:58] dummy.cxx:49:8: warning: 'PrintSelf' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
[W 240324 22:33:54 translation_unit:57] ./opencascade/IVtkTools_SubPolyDataFilter.hxx
[W 240324 22:33:54 translation_unit:58] dummy.cxx:49:8: warning: 'PrintSelf' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
/usr/lib/python3.11/site-packages/bindgen/__init__.py:49: FutureWarning: The 'delim_whitespace' keyword in pd.read_csv is deprecated and will be removed in a future version. Use ``sep='\s+'`` instead
  sym = pd.read_csv(p,header=None,names=['name'],delim_whitespace=True,
100%|| 314/314 [02:25<00:00,  2.16it/s]
[I 240324 22:37:29 __init__:284] sorting
[I 240324 22:37:29 __init__:302] removing duplicate typedefs
Processing module Standard                        
Processing module gp
Processing module math
Processing module BVH
Processing module NCollection
Processing module TColgp
Processing module OSD
Processing module Quantity
Processing module Storage
Processing module FSD
Processing module MMgt
Processing module TCollection
Processing module TColStd
Processing module Message
Processing module StdFail
Processing module TShort
Processing module Plugin
Processing module Resource
Processing module Units
Processing module UnitsAPI
Processing module TopLoc
Processing module Poly
Processing module Precision
Processing module Expr
Processing module ExprIntrp
Processing module GeomAbs
Processing module PLib
Processing module BSplCLib
Processing module BSplSLib
Processing module Bnd
Processing module CSLib
Processing module Convert
Processing module ElCLib
Processing module ElSLib
Processing module Adaptor2d
Processing module Geom2d
Processing module Geom2dAdaptor
Processing module Geom2dEvaluator
Processing module LProp
Processing module Geom2dLProp
Processing module TColGeom2d
Processing module Adaptor3d
Processing module AdvApprox
Processing module GProp
Processing module Geom
Processing module GeomAdaptor
Processing module GeomEvaluator
Processing module GeomLProp
Processing module LProp3d
Processing module TColGeom
Processing module TopAbs
Processing module AdvApp2Var
Processing module AppCont
Processing module AppParCurves
Processing module Approx
Processing module AppDef
Processing module BndLib
Processing module CPnts
Processing module Extrema
Processing module FEmTool
Processing module GC
Processing module GCE2d
Processing module GCPnts
Processing module Geom2dConvert
Processing module GeomConvert
Processing module GeomLib
Processing module GeomProjLib
Processing module GeomTools
Processing module Hermit
Processing module IntAna
Processing module IntAna2d
Processing module ProjLib
Processing module gce
Processing module TopoDS
Processing module BRep
Processing module BRepAdaptor
Processing module BRepLProp
Processing module TopTools
Processing module BRepTools
Processing module BinTools
Processing module TopExp
Processing module AppBlend
Processing module FairCurve
Processing module GccAna
Processing module GccEnt
Processing module GccInt
Processing module Geom2dAPI
Processing module Geom2dGcc
Processing module IntRes2d
Processing module Intf
Processing module Geom2dInt
Processing module Geom2dHatch
Processing module GeomAPI
Processing module GeomFill
Processing module GeomInt
Processing module GeomPlate
Processing module Hatch
Processing module HatchGen
Processing module IntCurve
Processing module IntCurveSurface
Processing module IntImp
Processing module IntImpParGen
Processing module IntPatch
Processing module IntPolyh
Processing module IntStart
Processing module IntSurf
Processing module Law
Processing module LocalAnalysis
Processing module NLPlate
Processing module Plate
Processing module TopClass
Processing module TopTrans
Processing module BRepApprox
Processing module BRepBndLib
Processing module BRepBuilderAPI
Processing module BRepCheck
Processing module BRepClass
Processing module BRepClass3d
Processing module BRepExtrema
Processing module BRepGProp
Processing module BRepIntCurveSurface
Processing module BRepLib
Processing module BRepMAT2d
Processing module BRepTopAdaptor
Processing module Bisector
Processing module IntCurvesFace
Processing module MAT
Processing module MAT2d
Processing module BRepPrim
Processing module BRepPrimAPI
Processing module BRepSweep
Processing module Sweep
Processing module ShapeAlgo
Processing module ShapeAnalysis
Processing module ShapeBuild
Processing module ShapeConstruct
Processing module ShapeCustom
Processing module ShapeExtend
Processing module ShapeFix
Processing module ShapeProcess
Processing module ShapeProcessAPI
Processing module ShapeUpgrade
Processing module Contap
Processing module HLRAlgo
Processing module HLRAppli
Processing module HLRBRep
Processing module HLRTopoBRep
Processing module Intrv
Processing module TopBas
Processing module TopCnx
Processing module BRepMesh
Processing module XBRepMesh
Processing module BOPAlgo
Processing module BOPDS
Processing module BOPTools
Processing module BRepAlgoAPI
Processing module IntTools
Processing module BRepAlgo
Processing module BRepFill
Processing module BRepProj
Processing module TopOpeBRep
Processing module TopOpeBRepBuild
Processing module TopOpeBRepDS
Processing module TopOpeBRepTool
Processing module BRepFeat
Processing module LocOpe
Processing module Blend
Processing module BRepBlend
Processing module BRepFilletAPI
Processing module BlendFunc
Processing module ChFi2d
Processing module ChFi3d
Processing module ChFiDS
Processing module FilletSurf
Processing module BRepOffset
Processing module BRepOffsetAPI
Processing module BiTgte
Processing module Draft
Processing module Aspect
Processing module Font
Processing module Image
Processing module InterfaceGraphic
Processing module SelectBasics
Processing module Graphic3d
Processing module Prs3d
Processing module PrsMgr
Processing module SelectMgr
Processing module AIS
Processing module DsgPrs
Processing module Select3D
Processing module StdPrs
Processing module StdSelect
Processing module V3d
Processing module OpenGl
Processing module MeshVS
Processing module NIS
Processing module Voxel
Processing module CDM
Processing module CDF
Processing module LDOM
Processing module PCDM
Processing module UTL
Processing module TDF
Processing module TDataStd
Processing module TDocStd
Processing module AppStdL
Processing module TFunction
Processing module BinLDrivers
Processing module BinMDF
Processing module BinMDataStd
Processing module BinMDocStd
Processing module BinMFunction
Processing module BinObjMgt
Processing module AppStd
Processing module TDataXtd
Processing module TNaming
Processing module TObj
Processing module XmlLDrivers
Processing module XmlMDF
Processing module XmlMDataStd
Processing module XmlMDocStd
Processing module XmlMFunction
Processing module XmlObjMgt
Processing module StdLDrivers
Processing module StdObjMgt
Processing module StdLPersistent
Processing module BinDrivers
Processing module BinMDataXtd
Processing module BinMNaming
Processing module BinTObjDrivers
Processing module TPrsStd
Processing module XmlDrivers
Processing module XmlMDataXtd
Processing module XmlMNaming
Processing module XmlTObjDrivers
Processing module StdDrivers
Processing module StdObject
Processing module StdPersistent
Processing module StdStorage
Processing module RWStl
Processing module StlAPI
Processing module RWStepBasic
Processing module RWStepGeom
Processing module RWStepRepr
Processing module RWStepShape
Processing module StepBasic
Processing module StepGeom
Processing module StepRepr
Processing module StepShape
Processing module RWStepDimTol
Processing module RWStepVisual
Processing module StepDimTol
Processing module StepVisual
Processing module RWStepElement
Processing module RWStepFEA
Processing module StepElement
Processing module StepFEA
Processing module GeomToStep
Processing module RWStepAP203
Processing module RWStepAP214
Processing module RWStepAP242
Processing module STEPConstruct
Processing module STEPControl
Processing module STEPEdit
Processing module STEPSelections
Processing module StepAP203
Processing module StepAP209
Processing module StepAP214
Processing module StepAP242
Processing module StepToGeom
Processing module StepToTopoDS
Processing module TopoDSToStep
Processing module BRepToIGES
Processing module BRepToIGESBRep
Processing module Geom2dToIGES
Processing module GeomToIGES
Processing module IGESAppli
Processing module IGESBasic
Processing module IGESControl
Processing module IGESConvGeom
Processing module IGESData
Processing module IGESDefs
Processing module IGESDimen
Processing module IGESDraw
Processing module IGESFile
Processing module IGESGeom
Processing module IGESGraph
Processing module IGESSelect
Processing module IGESSolid
Processing module IGESToBRep
Processing module Interface
Processing module Transfer
Processing module StepData
Processing module XSControl
Processing module IFSelect
Processing module IFGraph
Processing module STEPCAFControl
Processing module XCAFApp
100%|| 314/314 [00:02<00:00, 152.23it/s]
Processing module XCAFDimTolObjects
Processing module XCAFDoc
Processing module XCAFNoteObjects
Processing module XCAFPrs
Processing module XCAFView
Processing module BinXCAFDrivers
Processing module XmlXCAFDrivers
Processing module Vrml
Processing module VrmlAPI
Processing module RWGltf
Processing module IVtk
Processing module IVtkOCC
Processing module IVtkTools
Processing module IVtkVTK
Processing module DE
Processing module Xw
-- Found Python: /usr/bin/python3.11 (found version "3.11.8") found components: Interpreter Development Development.Module Development.Embed 
-- Python lib: /usr/lib64/libpython3.11.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Found pybind11: /usr/include (found version "2.11.1")
-- Found Boost: /usr/lib64/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable exact version "1.84.0")  
-- Found Boost: /usr/lib64/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable exact version "1.84.0") found components: serialization 
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 

@efferre79
Copy link
Author

@adam-urbanczyk a quick update of what I discovered.

First of all I have finally managed to build OCP with clang 14 and 15. But this bug is still valid when using clang 16 or greater. See also below.

I am using a Gentoo-based system, they partially backported the clang 16 functionality of system config files in clang15. So building OCP with clang 15 didn't work out of the box on my system because the system config files have some -I clang directives which are causing parsing errors with OCP build system. The option --no-default-config is not backported but I had to find another workaround by setting the CLANG_NO_DEFAULT_CONFIG env variable in the Gentoo build receipt. In the commit I unconditionally added --no-default-config but that is wrong because it can be used only with clang 16 or later (causing errors when using clang 15). Of course --no-default-config may still be needed on a generic system when using newer versions of clang, so I created an improved PR.

Then the bad news. Unfortunately, starting from clang version 16 the behaviour is changed (probably the reason is explained here) so it is not possible to get the same kind of information required for types qualification of function arguments/return values.

@adam-urbanczyk
Copy link
Member

Thanks, so for the time being the solution is to use the configuration specified in this repo (i.e. clang 15).

I do not understand the story with --no-default-config and Gentoo. I'd rather remove this completely from pywrap to be honest, especially that you apparently found a way to specify the correct headers.

@efferre79
Copy link
Author

Thanks, so for the time being the solution is to use the configuration specified in this repo (i.e. clang 15).

I do not understand the story with --no-default-config and Gentoo. I'd rather remove this completely from pywrap to be honest, especially that you apparently found a way to specify the correct headers.

The commit using --no-default-config is not Gentoo specific in the sense it might potentially address the same problem with other distributions. Basically if you do

$ clang 2>&1 -v | grep -i config
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
System configuration file directory: /etc/clang

you can see if clang supports system configuration files. This is enabled upstream from clang-16, on Gentoo since clang-15. On Gentoo, they addressed another issue and since then one of the config files contains a clang --include directive passed implicitely to the compiler. Include files specified on command line lead to a AttributeError: 'NoneType' object has no attribute 'name' error in pywrap (here) because they don't have a valid Path() object associated in your code. It took a lot of time to understand the source of the problem and for that reason I proposed the change by using --no-default-config option to overcome that issue.

If you decide to remove the previous commit, I would strongly suggest to make pywrap more robust. For instance you can filter out the invalid HeaderInfo() objects or printing a warning or in alternative, you could foresee an user defined clang command line option to be added when parsing the translation units.

@efferre79 efferre79 changed the title build failure with gcc: NCollection_tmpl.hxx:838:60: error: expected unqualified-id before * token clang>=16 is not supported Apr 2, 2024
@adam-urbanczyk
Copy link
Member

Alright, I'll update the README to say something about the deps (i.e. essentially take the versions from the devenv file or be on your own).

Would you happen to know why includes added via --include would not have a file name according to libclang? Sounds like a bug to me.

Last, but not least, shall I get rid of the problematic overload coming from the blobfish patch? AFAICT this way everyone will be able to use the generated sources directly? Does that fit your use case?

@efferre79
Copy link
Author

Would you happen to know why includes added via --include would not have a file name according to libclang? Sounds like a bug to me.

I have no idea.

Last, but not least, shall I get rid of the problematic overload coming from the blobfish patch? AFAICT this way everyone will be able to use the generated sources directly? Does that fit your use case?

I am using directly opencascade headers from my distribution and I don't use conda at all. In my opinion having to ship the generated sources is quite limiting, it should be a backup option and considered as last option.

To be honest I don't see the reason of keeping blobfish patch, even the maintainers don't know what is its purpose. The most famous software using opencascade seems to be freecad and its build system can be used directly with upstream opencascade.

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

3 participants