ppd / freecad-ppd

5 stars 1 forks source link

Ship latest OCCT #21

Closed luzpaz closed 2 years ago

luzpaz commented 2 years ago

It would be very good to Snap work with the latest OCC version

ppd commented 2 years ago

It simply uses what the freecad-maintainers/occt-releases PPA contains:

https://github.com/ppd/freecad-ppd/blob/12769f0166c16ee12515615affa94523c9654cc5/snap/snapcraft.yaml#L87-L93

Core20 itself has 7.3.3, so very outdated. Core22 has 7.5.1 atm.

It is possible to build OCCT from source and include it in the snap, but that requires work. If you want to give it a try, I'd be happy to review it. For the sake of reducing redundant work, helping kkremitzki to update the package in the PPA (and in the repos in general) would be more beneficial to FreeCAD as a whole.

luzpaz commented 2 years ago

Thanks for the answer. Looked at repology and it bummed me out

Packaging status

luzpaz commented 2 years ago

@kkremitzki is part of the Debian Science team that manages the package over at https://salsa.debian.org/science-team/opencascade

ppd commented 2 years ago

OCCT seems easy enough to build. Maybe we should just build it from source. I'll look into it over my break later.

ppd commented 2 years ago

@luzpaz There's a build including OCCT 7.6.1 (upstream, no patches applied) @ https://github.com/ppd/freecad-ppd/actions/runs/1852643291 to play around with.

It increases build time by about an hour if we don't build it as a separate snap. I think that's okay for the sake of simplicity. Do you think building OCCT instead of relying on the PPA's packages is a worthwhile improvement?

luzpaz commented 2 years ago

Do you think building OCCT instead of relying on the PPA's packages is a worthwhile improvement?

Absolutely! I think it also serves a dual purpose as a way to show other downstream packagers that it's possible. It would be good if there was a way to show that it's built by snap packages so that if we're troubleshooting on the forum we can understand that point. Is it possible?

ppd commented 2 years ago

Is it possible?

Certainly, see https://github.com/ppd/freecad-ppd/tree/occt for the changes. We can try it for the edge releases first if you think it's a good idea. Can we use upstream 7.6.1, or are there important patches missing to your knowledge?

ppd commented 2 years ago

I misread your comment. Are you saying you'd like to have a FreeCAD version with a snap specific suffix?

luzpaz commented 2 years ago

Hi @blobfish sorry to poke you. Do you know if there are any patches that FC is using to patch OCC prebuild (separate question: what patches do you use?)

luzpaz commented 2 years ago

CC @realthunder JIC you're interested in having an OCC edge dependency for Link

blobfish commented 2 years ago

On Thursday, February 17, 2022 12:17:54 PM EST luzpaz wrote:

Hi @blobfish sorry to poke you. Do you know if there are any patches that FC is using to patch OCC prebuild (separate question: what patches do you use?)

hi luzpaz. I am not involved with freecad much anymore, so I have no clue about it's packaging. I use my own branch that I keep on gitlab. https://gitlab.com/blobfish/occt

realthunder commented 2 years ago

Yes, I'd like to have the option for an OCCT-edge dependency. @ppd, are there some kind of build cache in snap? I mean when the build is triggered, does it have to build OCCT every time from scratch? Also, we may need to build netgen and gmsh also, as they depends on OCCT.

ppd commented 2 years ago

@realthunder yes, we can simply put external dependencies in a separate snap and stage this snap (= copy) in the FreeCAD snaps. Gmsh is already built in the snap.

ppd commented 2 years ago

See https://github.com/ppd/freecad-deps-core20 This is OCCT 7.6.1 + gmsh 4.9.4.

Here's a freecad build that makes use of this external snap: https://github.com/ppd/freecad-ppd/actions/runs/1865229978

@luzpaz The snap: https://github.com/ppd/freecad-ppd/suites/5362756175/artifacts/168144171

ppd commented 2 years ago

This has landed in https://github.com/ppd/freecad-ppd/commit/d747dfe0198b13564843bf93f7625a72c1057625 The first edge release should be ready in ~2 hours: https://github.com/ppd/freecad-ppd/actions/runs/1868669943

ppd commented 2 years ago

This is now live with revision 163 in edge; please test. If no problems arise, we can switch the stable snap to this approach too.

luzpaz commented 2 years ago

@yorikvanhavre just a heads up. This may be worth your time to test as well

ppd commented 2 years ago

@luzpaz Shall we switch the stable snap to OCCT 7.6.1? I've been playing around with the edge builds, and everything seems to be working OK.

ppd commented 2 years ago

https://github.com/ppd/freecad-ppd/actions/runs/1903550382

Seems we need at least one fix on stable: https://github.com/FreeCAD/FreeCAD/commit/77b198048a

ppd commented 2 years ago

Hmm. Seems like 0.19.3 needs quite a few changes to be compatible with OCCT 7.6. I don't want to go patch hunting and create a Frankenstein monster; I'll keep 0.19.3 on the current OCCT version.

luzpaz commented 2 years ago

Sorry, i could of told you that. I was thinking you were only going to apply this to edge