Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-47146

OpenGL detection on OS X finds X11/GL, not system OpenGL framework

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 5.5.0
    • Build System
    • None
    • OS X 10.9.5
      Xcode 6.2
    • macOS

    Description

      When building Qt-5.5.0 on OS X (10.9), the OpenGL detection finds the GL libraries provided by Xquartz, instead of the system OpenGL.framework, and Qt5 ends up linking to the This is not the case on 5.4.2 with similar configure settings:

      OpenGL detection on 5.4.2

      OpenGL auto-detection... ()
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.7 -Wall -W -fPIC -DQ_OS_MAC -I. -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I../../../mkspecs/macx-clang -o opengldesktop.o opengldesktop.cpp
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.7 -o opengldesktop opengldesktop.o   -framework OpenGL -framework AGL 
      OpenGL enabled.
      ...
      qmake vars .......... QMAKE_CXXFLAGS = -MD QMAKE_LFLAGS = -L/sw/lib styles += mac fusion windows DEFINES += QT_NO_MTDEV QT_LIBS_DBUS = -L/sw/lib -ldbus-1 QT_CFLAGS_DBUS = -I/sw/include/dbus-1.0 -I/sw/lib/dbus-1.0/include QT_HOST_CFLAGS_DBUS = -I/sw/include/dbus-1.0 -I/sw/lib/dbus-1.0/include QT_CFLAGS_GLIB = -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include QT_LIBS_GLIB = -L/sw/lib -lgthread-2.0 -lglib-2.0 QMAKE_CFLAGS_FONTCONFIG = -I/sw/include -I/sw/include/freetype2 QMAKE_LIBS_FONTCONFIG = -L/sw/lib -lfontconfig -lfreetype DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_EVDEV sql-drivers =  sql-plugins =  sqlite qmake switches ......... 
      

      OpenGL detection on 5.5.0 (same machine)

      OpenGL auto-detection... ()
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.7 -Wall -W -fPIC -DQ_OS_MAC -I. -I/opt/X11/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/System/Library/Frameworks/AGL.framework/Headers -I../../../mkspecs/macx-clang -o opengldesktop.o opengldesktop.cpp
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.7 -o opengldesktop opengldesktop.o   -L/opt/X11/lib -lGL -framework OpenGL -framework AGL 
      OpenGL enabled.
      ...
      qmake vars .......... QMAKE_CXXFLAGS = -MD QMAKE_LFLAGS = -L/sw/lib styles += mac fusion windows DEFINES += QT_NO_MTDEV QT_LIBS_DBUS = -L/sw/lib -ldbus-1 QT_CFLAGS_DBUS = -I/sw/include/dbus-1.0 -I/sw/lib/dbus-1.0/include QT_HOST_CFLAGS_DBUS = -I/sw/include/dbus-1.0 -I/sw/lib/dbus-1.0/include QT_CFLAGS_GLIB = -I/sw/include/glib-2.0 -I/sw/lib/glib-2.0/include QT_LIBS_GLIB = -L/sw/lib -lgthread-2.0 -lglib-2.0 QMAKE_INCDIR_OPENGL =  "/opt/X11/include" QMAKE_LIBDIR_OPENGL =  "/opt/X11/lib" QMAKE_LIBS_OPENGL =  "-lGL" QMAKE_CFLAGS_OPENGL =  QMAKE_CFLAGS_FONTCONFIG = -I/sw/include -I/sw/include/freetype2 QMAKE_LIBS_FONTCONFIG = -L/sw/lib -lfontconfig -lfreetype DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_EVDEV DEFINES += QT_NO_TSLIB DEFINES += QT_NO_LIBINPUT sql-drivers =  sql-plugins =  sqlite qmake switches ......... 
      

      /opt/X11 is the location where Xquartz installs itself.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            nieder Hanspeter Niederstrasser
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes