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
   

Jump to the original submission

Tue 07 Nov 2023 09:47:19 AM UTC, comment #6: 

Not an actual fix for the automatic detection of necessary flags. But setting the following flags in CI using Homebrew (on Intel) seems to be working:

../configure \
  --with-qt=6 \
  QT_CPPFLAGS="-I/usr/local/opt/qt@6/include/QtCore -I/usr/local/opt/qt@6/include/QtGui -I/usr/local/opt/qt@6/include/QtHelp -I/usr/local/opt/qt@6/include/QtNetwork -I/usr/local/opt/qt@6/include/QtOpenGL -I/usr/local/opt/qt@6/include/QtOpenGLWidgets -I/usr/local/opt/qt@6/include/QtPrintSupport -I/usr/local/opt/qt@6/include/QtSql -I/usr/local/opt/qt@6/include/QtWidgets -I/usr/local/opt/qt@6/include/QtXml -I/usr/local/opt/qt@6/include/QtCore5Compat" \
   QT_LDFLAGS="-F/usr/local/opt/qt@6/Frameworks" \
   QT_LIBS="-framework QtCore -framework QtGui -framework QtHelp -framework QtNetwork -framework QtOpenGL -framework QtOpenGLWidgets -framework QtPrintSupport -framework QtSql -framework QtWidgets -framework QtXml -framework QtCore5Compat"


I don't know if the resulting GUI actually works though.

Markus Mützel <mmuetzel>
Group administrator
Sun 01 Oct 2023 02:07:55 PM UTC, comment #5: 

I'd like to add a test for Qt6 on macOS to the CI. However, I don't have physical access to a Mac computer.
@fxcoudert: Do you know which values I'd need to set for the below flags when using the qt@6 package from Homebrew?

Markus Mützel <mmuetzel>
Group administrator
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 administrator
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 \
  LRELEASE_QTVER=/usr/lib/qt6/bin/lrelease


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 administrator
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):
https://invent.kde.org/qt/qt/qtbase/-/commit/5b07f14a4ff6b08887473b1b583ee2f71dec6f76

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 administrator
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:
   
   
Comment:
   

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 group members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code