If I try to install smesh on Fed34 it pulls in smesh 8.3.0 and vtk9.0.1 so maybe there are some code changes already applied there to deal with the API changes.
Perhaps it's worth getting the src.rpm from Fed34 and diffing against upstream.
dnf install smesh
Last metadata expiration check: 2:37:03 ago on Sun 09 May 2021 07:47:54 CEST.
Dependencies resolved.
====================================================================================================================================================================================
Package Architecture Version Repository Size
====================================================================================================================================================================================
Installing:
smesh x86_64 8.3.0.4-3.fc34 fedora 2.1 M
Installing dependencies:
double-conversion x86_64 3.1.5-4.fc34 fedora 48 k
libGLEW x86_64 2.1.0-9.fc34 fedora 172 k
libharu x86_64 2.3.0-13.fc34 fedora 564 k
netgen-mesher x86_64 6.2.2101-2.fc34 fedora 18 k
netgen-mesher-common noarch 6.2.2101-2.fc34 fedora 479 k
netgen-mesher-devel x86_64 6.2.2101-2.fc34 fedora 413 k
netgen-mesher-libs x86_64 6.2.2101-2.fc34 fedora 2.7 M
opencascade-foundation x86_64 7.5.0-3.fc34 fedora 13 M
opencascade-modeling x86_64 7.5.0-3.fc34 fedora 14 M
opencascade-ocaf x86_64 7.5.0-3.fc34 fedora 1.2 M
opencascade-visualization x86_64 7.5.0-3.fc34 fedora 2.0 M
openslide x86_64 3.4.1-18.fc34 fedora 109 k
vtk x86_64 9.0.1-3.fc34 fedora 18 M
Transaction Summary
====================================================================================================================================================================================
Install 14 Packages
I tried to use opencascade from repos too but there have been incompatible changes to the install directory sniffing which means /usr/ gets trucated to // and cmake can't find any of the opencascade libraries.
Now I remember why I was still building opencascade from source !
Ok, I've read your two last posts a few times and perhaps I need more coffee this morning but I'm struggling to figure out what you're trying to do and the relationship between F33/F34.
I had this working fine on Fed33 which I had just upgraded to from Fed31. Due to package version limitations on the latter I had to build a few things from source when I initially installed FC. ( Back before py2 went out of fashion and Fed did not have certain py3 packages ).
IIRC Coin4 and pivy are available as packages with suitable versions on Fed33 so I no longer built those from source.
I updated my opencascade source tree to 7.5.0 ( previously I had 7.3 ). I then realised that Fed33 had 7.5.0 too so there was probably little point in building it. I installed with dnf and tried to re-run cmake on my freecad-build dir. It spits out a load of msgs about missing libs and from the output, it seems the library detection is buggy. The install prefix seems to get lost somehow and it's looking in //lib64 and //include and not finding what it expects.
Now there may be and ENV-VAR that I can set but I got tired of messing and went back to by occt-build dir and ran make install.
2.
Fed33 was fine and I got a working FC master with my usual build method. Foolishly, I then decided to move to "current" Fed34. This only seems to offer vtk version 9. SMESH gets in a fine mess due to the changes in the vtk 9 API, as you know. If I try to use distro smesh it pulls in distro opencascade and I'm back to problem #1. FC cmake fails to find opencascade.
If I build with -DBUILD_SMESH=OFF I avoid the problem so the rest of the build seems fine.
I've not got a lot of need for meshes for most of what I do so it's not a show stopper but I'd like it available, so I was asking where you were with this since you all seem to have a lot of progress.
freman wrote: ↑Sun May 09, 2021 1:43 pm
I build FreeCAD from master. Two issues:
1.
I had this working fine on Fed33 which I had just upgraded to from Fed31. Due to package version limitations on the latter I had to build a few things from source when I initially installed FC. ( Back before py2 went out of fashion and Fed did not have certain py3 packages ).
IIRC Coin4 and pivy are available as packages with suitable versions on Fed33 so I no longer built those from source.
I updated my opencascade source tree to 7.5.0 ( previously I had 7.3 ). I then realised that Fed33 had 7.5.0 too so there was probably little point in building it. I installed with dnf and tried to re-run cmake on my freecad-build dir. It spits out a load of msgs about missing libs and from the output, it seems the library detection is buggy. The install prefix seems to get lost somehow and it's looking in //lib64 and //include and not finding what it expects.
Now there may be and ENV-VAR that I can set but I got tired of messing and went back to by occt-build dir and ran make install.
Well there must be some way to make it work since I'm using it for FreeCAD (I also maintain opencascade). I would review my spec file for hints:
Fed33 was fine and I got a working FC master with my usual build method. Foolishly, I then decided to move to "current" Fed34. This only seems to offer vtk version 9. SMESH gets in a fine mess due to the changes in the vtk 9 API, as you know. If I try to use distro smesh it pulls in distro opencascade and I'm back to problem #1. FC cmake fails to find opencascade.
If I build with -DBUILD_SMESH=OFF I avoid the problem so the rest of the build seems fine.
I've not got a lot of need for meshes for most of what I do so it's not a show stopper but I'd like it available, so I was asking where you were with this since you all seem to have a lot of progress.
I'm using the bundled smesh for now and I also have a patch for vtk9:
my tree is in FreeCAD not FreeCAD-0.19.2 , can you tell me where to put the patch in my tree and the patch command to apply it? It ties my head in knots trying work out the right level and the right P argument.
HT to wmayer for disentangling the API changes.
Thanks. That looks like the fix.
Presumably this needs integrating into master with the suitable #ifdefs on VTK9.
Just wanted to say thank you for this patch. I'm new to FreeCAD and am building the Assembly3 fork here locally on Fedora, your work saved the day! Hope it finds its way into the official build.