bugGNU Octave - Bugs: bug #64498, Qt 6 not detected correctly on...


bug #64498: Qt 6 not detected correctly on macOS

Submitter:  FX <fxcoudert>
Submitted:  Mon 31 Jul 2023 04:59:32 PM UTC
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Mac OS
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Thu 07 Sep 2023 09:01:22 AM UTC, comment #4: 

Forgot to include: You'd need to add the flags for the following Qt modules:
Qt6Core Qt6Gui Qt6Help Qt6Network Qt6OpenGL Qt6OpenGLWidgets Qt6PrintSupport Qt6Xml Qt6Core5Compat

Markus Mützel <mmuetzel>
Group Member
Thu 07 Sep 2023 08:57:19 AM UTC, comment #3: 

Setting the same (or very similar) flags than what you do for gnuplot should also work for Octave.

Potentially, you'd also need to set the following variables to point to the respective Qt tools:

configure --with-qt=6 \
  QT_CFLAGS="all necessary -I and -D flags" \
  QT_LIBS="all necessary -L and -l (and -F?) flags" \
  MOC_QTVER=/usr/lib/qt6/libexec/moc \
  UIC_QTVER=/usr/lib/qt6/libexec/uic \
  RCC_QTVER=/usr/lib/qt6/libexec/rcc \
  QHELPGENERATOR_QTVER=/usr/lib/qt6/libexec/qhelpgenerator \
  QCOLLECTIONGENERATOR_QTVER=/usr/lib/qt6/libexec/qhelpgenerator \

Your tools might be installed elsewhere.

Please, let us know if that works for you.

I don't know how the configure script could do that automatically though without pkg-config files.

Markus Mützel <mmuetzel>
Group Member
Thu 07 Sep 2023 06:25:47 AM UTC, comment #2: 

Other projects typically allow to bypass pkg-config detection through setting specific configure args / environment variables (thinks like QT_CFLAGS, QT_LIBS). gnuplot does that and easily transitioned from Qt5 to Qt6.

FX <fxcoudert>
Tue 01 Aug 2023 06:59:58 AM UTC, comment #1: 

Thanks for trying to test this. Be aware that building Octave with Qt6 is still in its early stages.
See: https://octave.discourse.group/t/transition-octave-to-qt6/3139

IIUC, the following commit added .pc files upstream (via KDE's mirror because I don't know where the "actual" upstream is):

Afaict, that change was before Qt6.4 was released.
I don't know the specifics when it comes to Frameworks and pkg-config. But it looks like generating those files is skipped if `QT_FEATURE_framework` is set.

How is this supposed to work without pkg-config (for projects that don't use CMake as their build system)?

I'd guess this needs to be solved upstream.

Markus Mützel <mmuetzel>
Group Member
Mon 31 Jul 2023 04:59:32 PM UTC, original submission:  

When building from HEAD on macOS, with Qt 6, we get:

checking Qt version 6... checking for Qt6Core Qt6Gui Qt6Help Qt6Network Qt6OpenGL Qt6OpenGLWidgets Qt6PrintSupport Qt6Xml Qt6Core5Compat... no

This is because on macOS, Qt 6 does not ship pkg-config style .pc files. For more context, see https://bugreports.qt.io/browse/QTBUG-86080

FX <fxcoudert>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by fxcoudert (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12