I've been trying without success to build official packages for Fedora. There's quite the web of issues so I'll try to be succinct but thorough at the same time (wish me luck).
0.17 bundles smesh 5.X, Fedora has 6.7.5 from the fork provided by the OCE guys[1].
The bundled smesh requires libmed which is not in Fedora, when using system smesh its not explicitly required (but probably a good idea long term).
There is a pull request[2] that was accepted to make FreeCAD compliant with smesh 7.
The pull request fixes some of the compilation issues with smesh 6.X but causes others
I added some logic[3] around smesh in cmake for linking with the right libraries but now that patch is all interwoven with the pull request.
So I've been trying for over a month to get this sorted out but at this point I've largely given up. Hopefully some people smarter than me can help
I am currently using this patch [1] to link to the full paths of smesh. THis is needed for osx-conda-packages. Maybe you can try if this solves any issues for you.
hobbes1096 wrote:
The pull request fixes some of the compilation issues with smesh 6.X but causes others
I'm currently trying to build with a slight modification to your pull request, some of the conditionals you added around what headers to include appear to be OK for smesh 6 as well. I'm trying a build but I still expect a failure due to the commit to the bundled smesh to implement a single smesh generator per session of Freecad[4,5].
Perhaps you could come up with an additional conditional that would be appropriate for smesh 6?
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp: In member function 'void Fem::FemMesh::copyMeshData(const Fem::FemMesh&)':
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:178:65: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
BUILDSTDERR: static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
BUILDSTDERR: ^~~~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:178:65: error: expected '>' before 'SMDS_VtkVolume'
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:178:65: error: expected '(' before 'SMDS_VtkVolume'
BUILDSTDERR: static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
BUILDSTDERR: ^~~~~~~~~~~~~~
BUILDSTDERR: (
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:178:65: error: 'SMDS_VtkVolume' was not declared in this scope
BUILDSTDERR: static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
BUILDSTDERR: ^~~~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:178:65: note: suggested alternative: 'SMDS_MeshVolume'
BUILDSTDERR: static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
BUILDSTDERR: ^~~~~~~~~~~~~~
BUILDSTDERR: SMDS_MeshVolume
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:178:80: error: expected primary-expression before '>' token
BUILDSTDERR: static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
BUILDSTDERR: ^
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:178:89: error: 'const class SMDS_MeshElement' has no member named 'GetQuantities'
BUILDSTDERR: static_cast<const SMDS_VtkVolume*>(elem)->GetQuantities(),
BUILDSTDERR: ^~~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:181:18: error: 'SMDSEntity_Ball' was not declared in this scope
BUILDSTDERR: case SMDSEntity_Ball:
BUILDSTDERR: ^~~~~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:181:18: note: suggested alternative: 'SMDSEntity_Last'
BUILDSTDERR: case SMDSEntity_Ball:
BUILDSTDERR: ^~~~~~~~~~~~~~~
BUILDSTDERR: SMDSEntity_Last
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:183:35: error: 'ElemFeatures' is not a member of 'SMESH_MeshEditor'
BUILDSTDERR: SMESH_MeshEditor::ElemFeatures elemFeat;
BUILDSTDERR: ^~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:184:17: error: 'elemFeat' was not declared in this scope
BUILDSTDERR: elemFeat.Init(static_cast<const SMDS_BallElement*>(elem)->GetDiameter());
BUILDSTDERR: ^~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:184:17: note: suggested alternative: 'qMemSet'
BUILDSTDERR: elemFeat.Init(static_cast<const SMDS_BallElement*>(elem)->GetDiameter());
BUILDSTDERR: ^~~~~~~~
BUILDSTDERR: qMemSet
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:184:49: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
BUILDSTDERR: elemFeat.Init(static_cast<const SMDS_BallElement*>(elem)->GetDiameter());
BUILDSTDERR: ^~~~~~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:184:49: error: expected '>' before 'SMDS_BallElement'
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:184:49: error: expected '(' before 'SMDS_BallElement'
BUILDSTDERR: elemFeat.Init(static_cast<const SMDS_BallElement*>(elem)->GetDiameter());
BUILDSTDERR: ^~~~~~~~~~~~~~~~
BUILDSTDERR: (
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/Fem/App/FemMesh.cpp:184:49: error: 'SMDS_BallElement' was not declared in this scope
BUILDSTDERR: elemFeat.Init(static_cast<const SMDS_BallElement*>(elem)->GetDiameter());
BUILDSTDERR: ^~~~~~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/MeshPart/App/Mesher.cpp: In member function 'Mesh::MeshObject* MeshPart::Mesher::createMesh() const':
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/MeshPart/App/Mesher.cpp:327:37: error: 'get' is not a member of 'SMESH_Gen'
BUILDSTDERR: SMESH_Gen* meshgen = SMESH_Gen::get();
BUILDSTDERR: ^~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/MeshPart/App/Mesher.cpp:410:9: error: 'StdMeshers_TrianglePreference' was not declared in this scope
BUILDSTDERR: StdMeshers_TrianglePreference* hyp2d_1 = new StdMeshers_TrianglePreference(hyp++,0,meshgen);
BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/MeshPart/App/Mesher.cpp:410:9: note: suggested alternative: 'StdMeshers_QuadranglePreference'
BUILDSTDERR: StdMeshers_TrianglePreference* hyp2d_1 = new StdMeshers_TrianglePreference(hyp++,0,meshgen);
BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BUILDSTDERR: StdMeshers_QuadranglePreference
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/MeshPart/App/Mesher.cpp:410:40: error: 'hyp2d_1' was not declared in this scope
BUILDSTDERR: StdMeshers_TrianglePreference* hyp2d_1 = new StdMeshers_TrianglePreference(hyp++,0,meshgen);
BUILDSTDERR: ^~~~~~~
BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/Mod/MeshPart/App/Mesher.cpp:410:54: error: expected type-specifier before 'StdMeshers_TrianglePreference'
BUILDSTDERR: StdMeshers_TrianglePreference* hyp2d_1 = new StdMeshers_TrianglePreference(hyp++,0,meshgen);
BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hobbes1069 wrote: ↑Tue Jun 12, 2018 6:41 pm
It doesn't look like smesh 6 has 'SMDS_VtkVolume'...
It looks like it is mandatory.
Maybe it's easier to use the internal smesh. I guess you should be able to run an external smesh and the internal smesh of FreeCAD side by side if you install freecad to /usr/lib/freecad like it is done for ubuntu.
In file included from /home/build/rpmbuild/SMESH/BUILD/SMESH-8.3.0-b0/inc/SMESH_MeshVSLink.hxx:31,
from /home/build/rpmbuild/SMESH/BUILD/SMESH-8.3.0-b0/src/SMESH/SMESH_MeshVSLink.cxx:28:
/home/build/rpmbuild/SMESH/BUILD/SMESH-8.3.0-b0/inc/Handle_SMESH_MeshVSLink.hxx:45:1: error: 'SMESH_EXPORT' does not name a type
SMESH_EXPORT Handle(Standard_Type)& STANDARD_TYPE(SMESH_MeshVSLink);
^~~~~~~~~~~~