Opened 6 months ago

Closed 4 months ago

#72729 closed defect (fixed)

qt5-qtbase fails to compile on MacOS 26 Public Beta: "ERROR: The OpenGL functionality tests failed!"

Reported by: acjones8 (Alex Jones) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: tahoe Cc: markemer (Mark Anderson), jaredwsmith (Jared Smith), hnarayanan (Harish Narayanan)
Port: qt5-qtbase

Description

Hello,

I've been trying out the MacOS 26 Public Beta, and as part of that process, I'm currently migrating the installed ports over. qt5-qtbase now fails to build after upgrading. I'll paste the build logs in below:

(...)
> /usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=26.0 -Wl,-rpath,@executable_path/../Frameworks -o cups main.o   -lcups   
 => source accepted.
test config.qtbase_printsupport.libraries.cups succeeded
Done running configuration tests.

Configure summary:

Build type: macx-clang (arm64, CPU features: cx16 neon crc32)
Compiler: clang (Apple) 17.0.0
Configuration: compile_examples largefile neon optimize_size shared shared qt_framework release c++11 c++14 c++17 c++1z concurrent dbus reduce_exports stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ yes
  Building shared libraries .............. yes
  Using C standard ....................... C11
  Using C++ standard ..................... C++17
  Using ccache ........................... no
  Relocatable ............................ yes
  Using precompiled headers .............. no
  Using LTCG ............................. no
  Target compiler supports:
    NEON ................................. yes
  Build parts ............................ libs tools
  App store compliance ................... no
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... yes
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  udev ................................... no
  Using system zlib ...................... yes
  Zstandard support ...................... yes
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ yes
  GLib ................................... yes
  iconv .................................. no
  ICU .................................... no
  Built-in copy of the MIME database ..... yes
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. yes
    Using system PCRE2 ................... yes
Qt Network:
  CoreWLan ............................... yes
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  SecureTransport ........................ no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ yes
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... no
  GSSAPI ................................. yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
  Fontconfig ............................. no
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... no
    MarkdownWriter ....................... yes
  EGL .................................... no
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. no
  libinput ............................... no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. no
  X11 specific:
    XLib ................................. no
    XCB Xlib ............................. no
    EGL on X11 ........................... no
    xkbcommon-x11 ........................ no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. no
  LinuxFB ................................ no
  VNC .................................... no
Qt Sql:
  SQL item models ........................ yes
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion macOS Windows
Qt PrintSupport:
  CUPS ................................... yes
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. no
  SQLite2 ................................ no
  SQLite ................................. no
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... no
Qt Testlib:
  Tester for item models ................. yes

Note: When linking against OpenSSL, you can override the default
library names through OPENSSL_LIBS.
For example:
    OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked

WARNING: On OS X, AAT is supported only with -qt-harfbuzz.

ERROR: Feature 'icu' was enabled, but the pre-condition 'libs.icu' failed.

ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
Command failed:  cd "/opt/local/var/macports/build/qt5-qtbase-ff179007/work/qtbase-everywhere-src-5.15.15" && ./configure -prefix /opt/local/libexec/qt5 -bindir /opt/local/libexec/qt5/bin -headerdir /opt/local/libexec/qt5/include -libdir /opt/local/libexec/qt5/lib -archdatadir /opt/local/libexec/qt5 -plugindir /opt/local/libexec/qt5/plugins -importdir /opt/local/libexec/qt5/imports -qmldir /opt/local/libexec/qt5/qml -datadir /opt/local/libexec/qt5 -docdir /opt/local/libexec/qt5/doc -translationdir /opt/local/libexec/qt5/translations -sysconfdir /opt/local/libexec/qt5/etc/xdg -examplesdir /opt/local/libexec/qt5/examples -testsdir /opt/local/libexec/qt5/tests -hostdatadir /opt/local/libexec/qt5 -release -opensource -confirm-license -shared -accessibility -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-sql-tds -platform macx-clang -optimize-size -no-testcocoon -no-gcov -force-pkg-config -system-zlib -no-mtdev -no-journald -no-syslog -system-libpng -system-libjpeg -system-freetype -system-harfbuzz -no-libproxy -system-pcre -glib -no-gtk QMAKE_CXXFLAGS_GNUCXX11=-std=c++17 -make libs -make tools -nomake examples -nomake tests -gui -widgets -no-rpath -verbose -cups -no-iconv -no-evdev -no-tslib -icu -no-fontconfig -strip -no-pch -no-ltcg -dbus-linked -no-use-gold-linker -no-separate-debug-info -no-xcb -no-eglfs -no-gbm -no-directfb -no-linuxfb -no-kms -no-libinput -no-xkbcommon -no-system-proxies -no-feature-vulkan -framework -sdk macosx -no-libudev -no-egl -openssl-linked 
Exit code: 3
Error: Failed to configure qt5-qtbase: consult /opt/local/var/macports/build/qt5-qtbase-ff179007/work/qtbase-everywhere-src-5.15.15/config.log
Error: Failed to configure qt5-qtbase: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt5/qt5-qtbase/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port qt5-qtbase failed

I also see an ICU error akin to #72174, but the OpenGL error seems to be new to this platform. I included only the trailing part of the build log where the error occurs, but I can attach and upload the full build log if desired.

Change History (13)

comment:1 Changed 6 months ago by jmroot (Joshua Root)

Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:2 Changed 4 months ago by markemer (Mark Anderson)

I'm seeing this same thing. I wonder what they did to OpenGL

comment:3 Changed 4 months ago by markemer (Mark Anderson)

Cc: markemer added

comment:4 Changed 4 months ago by markemer (Mark Anderson)

Keywords: tahoe added

comment:5 Changed 4 months ago by markemer (Mark Anderson)

So here is what is going on, so far as I can see:

Trying source 1 (type makeSpec) of library opengl_es2 ...
header entry 'config.qtbase_gui.libraries.opengl_es2.headers.0' failed condition '!config.darwin'.
header entry 'config.qtbase_gui.libraries.opengl_es2.headers.0' failed condition '!config.darwin'.
+ cd /opt/local/var/macports/build/qt5-qtbase-b8f35de6/work/qtbase-everywhere-src-5.15.15/config.tests/opengl_es2 && /opt/local/var/macports/build/qt5-qtbase-b8f35de6/work/qtbase-everywhere-src-5.15.15/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" QMAKE_CXXFLAGS_GNUCXX11=-std=c++17 'QMAKE_USE += opengl_es2' 'QMAKE_LIBS_OPENGL_ES2 = ' /opt/local/var/macports/build/qt5-qtbase-b8f35de6/work/qtbase-everywhere-src-5.15.15/config.tests/opengl_es2
> Project WARNING: Qt has only been tested with version 13 of the platform SDK, you're using 26.
> Project WARNING: This is an unsupported configuration. You may experience build issues, and by using
> Project WARNING: the 26.0 SDK you are opting in to new features that Qt has not been prepared for.
> Project WARNING: Please downgrade the SDK you use to build your app to version 13, or configure
> Project WARNING: with CONFIG+=sdk_no_version_check when running qmake to silence this warning.
+ cd /opt/local/var/macports/build/qt5-qtbase-b8f35de6/work/qtbase-everywhere-src-5.15.15/config.tests/opengl_es2 && MAKEFLAGS= /usr/bin/make
> /usr/bin/clang++ -c -pipe -stdlib=libc++ -O2  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=26.0 -w -fPIC  -I. -I/opt/local/var/macports/build/qt5-qtbase-b8f35de6/work/qtbase-everywhere-src-5.15.15/mkspecs/macx-clang -o main.o main.cpp
> main.cpp:3:12: fatal error: 'OpenGLES/ES2/gl.h' file not found
>     3 | #  include <OpenGLES/ES2/gl.h>
>       |            ^~~~~~~~~~~~~~~~~~~
> 1 error generated.
> make: *** [main.o] Error 1
 => source failed verification.

comment:6 Changed 4 months ago by markemer (Mark Anderson)

Even stranger, -no-egl is on the command line for the qt configuration

comment:7 Changed 4 months ago by jaredwsmith (Jared Smith)

Cc: jaredwsmith added

comment:8 Changed 4 months ago by jwhowarth

Homebrew seems to be successfully building qt5. I notice to particular differences.

1) They are building qt 5.15.17 sources

2) They are patching qtbase/mkspecs/common/mac.conf to remove the fully deprecated -framework AGL from -QMAKE_LIBS_OPENGL and to remove /System/Library/Frameworks/AGL.framework/Headers/ from QMAKE_INCDIR_OPENGL

https://github.com/Homebrew/homebrew-core/commit/9ef09378761c7d975da890566451726fba53ea51]

Last edited 4 months ago by jwhowarth (previous) (diff)

comment:9 Changed 4 months ago by markemer (Mark Anderson)

This would make sense, since qt6 builds no problem in Tahoe

# Fix build with Xcode 26 with backport from Qt6
# https://github.com/qt/qtbase/commit/cdb33c3d5621ce035ad6950c8e2268fe94b73de5
Last edited 4 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:11 Changed 4 months ago by jwhowarth

FYI, qt5-qtbase builds fine when the 5.15.17 qt sources under Tahoe with your proposed changes. You have to drop the qtbase-qmake-xcode-15.patch as it is the 5.15.17 sources and regenerate qtbase-5.15.9-work-around-pyside2-brokenness.patch to apply.

comment:12 Changed 4 months ago by hnarayanan (Harish Narayanan)

Cc: hnarayanan added

comment:13 Changed 4 months ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

In 6d2aa781a3d018ce2aeecb30f029beb8b36e6c53/macports-ports (master):

qt5-qtbase: Fix build on macOS 26

AGL.framework no longer exists, but is apparently also not needed — just
remove it.

Additionally, the configure test for ICU fails because ICU now required
C++17, but the config test did not pass the required flag. Some attempts
seem to have been made to fix this, but they weren't sufficient in my
testing unless the qmake project file also declared 'CONFIG += c++11'.
Add a patch that does that.

Closes: #72729
Closes: #72174

Note: See TracTickets for help on using tickets.