Bug 278578

Summary: cad/opencascade: Fails to build
Product: Ports & Packages Reporter: ml
Component: Individual Port(s)Assignee: Thierry Thomas <thierry>
Status: Open ---    
Severity: Affects Only Me CC: agh, diizzy
Priority: --- Flags: bugzilla: maintainer-feedback? (thierry)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Build log none

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_committer freebsd_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.