'; }
Bug 278578 - cad/opencascade: Fails to build
Summary: cad/opencascade: Fails to build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-25 13:29 UTC by ml
Modified: 2025-06-21 15:10 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (thierry)


Attachments
Build log (58.76 KB, text/plain)
2024-04-25 13:29 UTC, ml
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description ml 2024-04-25 13:29:29 UTC
Created attachment 250223 [details]
Build log

I'm running Poudriere with 2024Q2 branch and cad/opencascade fails to configure (tried for 14.0, 13.3 and 13.2).
I think this is somehow related to QT, but it worked with 2024Q1.
Comment 1 Thierry Thomas freebsd_committerfreebsd_triage 2024-06-02 09:51:29 UTC
I have not been able to reproduce this error, and it builds fine on pkg-fallout.

I have just upgraded OCCT to the latest, 7.8.1: could you please check it?
Comment 2 ml 2024-06-04 15:36:35 UTC
(In reply to Thierry Thomas from comment #1)

Thanks for the upgrade.
Unfortunately I'm getting the same error.
I guess I'll need to look into it myself; however it won't be that soon, given I have no spare time.
Or maybe hopefully the next month 2024Q3 will be out and it will autosolve :)
Comment 3 ml 2024-06-24 06:52:59 UTC
Hello.

I finally got around to solving this (for me); perhaps I'm going to write something really stupid, but...



The problem arises from adm/cmake/qt.cmake at line 27:
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml PATHS ${3RDPARTY_QT_DIR} NO_DEFAULT_PATH)

It works if I change this to a plain:
find_package(Qt5 QUIET COMPONENTS Widgets Quick Xml)

However, there's a simpler solution to patching the sources:
_ the Makefile sets 3RDPARTY_QT_DIR:PATH=${QT_LIBDIR};
_ it works if I change it to 3RDPARTY_QT_DIR:PATH=${LOCALBASE}/lib/cmake/Qt5

I'm not a cmake expert, but AFAICT:
_ ${3RDPARTY_QT_DIR} tells it where to find Qt5Config.cmake;
_ that file is in fact in /usr/local/lib/cmake/Qt5/;
_ it's not in ${QT_LIBDIR} (which is /usr/local/lib/qt5).



Now, why does the port, as it is, works for everyone except me... I'm puzzled... really no idea.
I'm fine with it and I'll just patch locally.

(Being able to compile without Qt would also be nice, but I understand adding the option would be some work).

Thanks.
Comment 4 Thierry Thomas freebsd_committerfreebsd_triage 2025-06-20 10:02:17 UTC
I'm working on the upgrade to the latest 7.9.1, and strangely I'm encountering the error you reported, and your fix on 3RDPARTY_QT_DIR works for me too!

(Upgrade in progress for this release)
Comment 5 Thierry Thomas freebsd_committerfreebsd_triage 2025-06-21 15:10:45 UTC
Committed, thanks!
Comment 6 commit-hook freebsd_committerfreebsd_triage 2025-06-21 15:10:53 UTC
A commit in branch main references this bug:

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

commit 3790cdde3756eb782aed0ab83d4858c3e9710da9
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2025-06-03 17:28:37 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2025-06-21 15:10:27 +0000

    cad/opencascade: upgrade to 7.9.1

    Announcement at
            https://dev.opencascade.org/content/open-cascade-technology-791-released

    A fix for Qt5 is needed: see PR 278578

    PR:             278578
    Reported by:    ml (at) netfence.it

 cad/opencascade/Makefile                           |  16 ++-
 cad/opencascade/distinfo                           |   6 +-
 cad/opencascade/files/patch-CMakeLists.txt         |   6 +-
 .../files/patch-adm_cmake_occt__csf.cmake          |   4 +-
 .../files/patch-adm_cmake_occt__macros.cmake       |  25 +----
 cad/opencascade/pkg-plist                          | 111 ++++++++++++---------
 6 files changed, 87 insertions(+), 81 deletions(-)