Bug 277308 - graphics/f3d: patch needed to support opencascade-7.8.0
Summary: graphics/f3d: patch needed to support opencascade-7.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Thierry Thomas
URL: https://github.com/f3d-app/f3d/releas...
Keywords:
Depends on:
Blocks: 277294
  Show dependency treegraph
 
Reported: 2024-02-25 17:19 UTC by Thierry Thomas
Modified: 2024-03-23 17:49 UTC (History)
1 user (show)

See Also:
yuri: maintainer-feedback+


Attachments
Upgrade to 2.3.0, but no fix for OCCT 7.8.0 (2.16 KB, patch)
2024-03-08 18:29 UTC, Thierry Thomas
no flags Details | Diff
Upgrade to 2.3.0, with a fix for OCCT 7.8.0 (19.37 KB, patch)
2024-03-09 21:13 UTC, Thierry Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2024-02-25 17:19:34 UTC
If built against opencascade-7.8.0, f3d-2.2.1 fails with the following error:

-- Plugin: OpenCASCADE 7.8.0 found
CMake Error at plugins/occt/CMakeLists.txt:31 (message):
  occt plugin: TKXDESTEP and TKXDEIGES OCCT modules are not found.  Turn off
  F3D_PLUGIN_OCCT_COLORING_SUPPORT or enable them in your OpenCascade build.


-- Configuring incomplete, errors occurred!
*** Error code 1
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2024-02-25 18:07:22 UTC
Approved.
Please commit it.
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2024-02-26 18:04:36 UTC
Upstream released a new version v. 2.3.0. Could you please check if it is compatible with OCCT 7.8.0?

See <https://github.com/f3d-app/f3d/releases/tag/v2.3.0>.
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2024-03-08 18:29:43 UTC
Created attachment 249034 [details]
Upgrade to 2.3.0, but no fix for OCCT 7.8.0

I tried the latest release, v.2.3.0: see the attached patch. You may commit it if you want.

But unfortunately it does not include anything to support OpenCascade 7.8.0!

I opened an issue to report the problem:
<https://github.com/f3d-app/f3d/issues/1304>.
Comment 4 Thierry Thomas freebsd_committer freebsd_triage 2024-03-09 21:13:46 UTC
Created attachment 249057 [details]
Upgrade to 2.3.0, with a fix for OCCT 7.8.0

This second patch upgrades f3d to 2.3.0, and it also fix the problem with OpenCascade 7.8.0.

A PR has been submitted upstream: see <https://github.com/f3d-app/f3d/pull/1306>.

Note: this patch allows to build with the previous releases of OpenCascade, and it can be committed right now.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-03-21 18:03:00 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fea222604fc0b3ed6bcdd48324d1a7a462128dd7

commit fea222604fc0b3ed6bcdd48324d1a7a462128dd7
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2024-03-08 10:07:26 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2024-03-21 18:01:17 +0000

    graphics/f3d: upgrade to 2.3.0

    Release notes at <https://github.com/f3d-app/f3d/releases/tag/v2.3.0>.

    Also fix with OpenCascade 7.8.0:
    See <https://github.com/f3d-app/f3d/issues/1304>.

    PR:             277308
    Approved by:    yuri (maintainer)

 graphics/f3d/Makefile                              |  11 +-
 graphics/f3d/distinfo                              |   6 +-
 .../files/patch-plugins_occt_CMakeLists.txt (new)  |  35 ++
 ...-plugins_occt_module_vtkF3DOCCTReader.cxx (new) | 381 +++++++++++++++++++++
 graphics/f3d/pkg-plist                             |   5 +-
 5 files changed, 432 insertions(+), 6 deletions(-)
Comment 6 Thierry Thomas freebsd_committer freebsd_triage 2024-03-21 18:11:43 UTC
Committed, thanks!
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-21 19:28:50 UTC
Maybe make mpi optional dependency, but default?
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-22 17:49:55 UTC
f3d doesn't link with libmpich and with several other libraries:
====> Running Q/A tests (stage-qa)
Warning: you might not need LIB_DEPENDS on libexpat.so
Warning: you might not need LIB_DEPENDS on libjpeg.so
Warning: you might not need LIB_DEPENDS on libpng.so
Warning: you might not need LIB_DEPENDS on libtiff.so
Warning: you might not need LIB_DEPENDS on libGLU.so
Warning: you might not need LIB_DEPENDS on libmpich.so
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
===> No pkg-plist issues found (check-plist)
=>> Checking for staging violations... done
Comment 9 Thierry Thomas freebsd_committer freebsd_triage 2024-03-23 11:13:12 UTC
I've just uploaded my build log at <https://people.freebsd.org/~thierry/f3d-2.3.0.log>.

If you look the configure step, you can read:

-- Found OpenGL: /usr/local/lib/libOpenGL.so  found components: OpenGL GLX 
-- Found HDF5: hdf5-shared (found version "1.12.2") found components: C HL 
-- Found NetCDF: netcdf (found version "4.9.2") 
-- Found ZLIB: /usr/lib/libz.so (found version "1.3.1")  
-- Found PNG: /usr/local/lib/libpng.so (found version "1.6.42") 
-- Found MPI_C: /usr/local/lib/libmpi.so (found version "4.0") 
-- Found MPI: TRUE (found version "4.0") found components: C 
-- Found X11: /usr/local/include   

Actually, you are right, MPICH is not inherited from VTK but from OpenCascade.

The messages "Warning: you might not need LIB_DEPENDS on xxx" are just warnings, and may be false: some libraries are checked during configure and just used through ld_open, and the resulting built may vary if they are not found.

In this case, I don't know f3d, and I'll let Yuri decide.
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2024-03-23 13:04:45 UTC
(In reply to Thierry Thomas from comment #9)
> MPICH is not inherited from VTK but from OpenCascade.
openmpi installed by VTK. OpenCascade does not depend on openmpi.

If replace USES=mpi with USES=mpi:openmpi:
-- Found MPI_C: /usr/local/mpi/openmpi/lib/libmpi.so (found version "3.1")
-- Found MPI: TRUE (found version "3.1") found components: C

USES=mpi pulls huge tree of deps - maybe create option OPENMPI:
OPENMPI_USES=mpi:openmpi
And add:
OCCT_IMPLIES=OPENMPI

So we prevent silently grab any mpi if OCCT is on.

If you want I can create patch.
Comment 11 Thierry Thomas freebsd_committer freebsd_triage 2024-03-23 17:49:21 UTC
(In reply to Vladimir Druzenko from comment #10)
Yes please, do!

And it is always better to avoid a mix of OpenMPI and MPICH.