Opened 4 years ago

Last modified 4 years ago

#52862 new defect

qt4-mac +debug: non-debug QtWebkit links to debug frameworks, and QtWebkit_debug does not exist

Reported by: devernay (Frédéric Devernay) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens), RJVB (René Bertin), mkae (Marko Käning)
Port: qt4-mac

Description

The QtWebkit framework installed by the +debug variant, and only this one, links to debug frameworks, and the debug version (QtWebkit_debug) does not exist or is not installed.

Observed on Snow Leopard, can someone please confirm this on more recent systems?

$ port installed |fgrep qt4
  qt4-mac @4.8.7_4+debug+universal (active)
$ for i in Qt3Support QtCLucene QtCore QtDBus QtDeclarative QtDesigner QtDesignerComponents QtGui QtHelp QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns ; do echo $i; otool -L /opt/local/libexec/qt4/Library/Frameworks/${i}.framework/Versions/4/$i |fgrep debug; done
Qt3Support
QtCLucene
QtCore
QtDBus
QtDeclarative
QtDesigner
QtDesignerComponents
QtGui
QtHelp
QtMultimedia
QtNetwork
QtOpenGL
QtScript
QtScriptTools
QtSql
QtSvg
QtTest
QtUiTools
QtWebKit
	/opt/local/libexec/qt4/Library/Frameworks/QtGui.framework/Versions/4/QtGui_debug (compatibility version 4.8.0, current version 4.8.7)
	/opt/local/libexec/qt4/Library/Frameworks/QtCore.framework/Versions/4/QtCore_debug (compatibility version 4.8.0, current version 4.8.7)
	/opt/local/libexec/qt4/Library/Frameworks/QtNetwork.framework/Versions/4/QtNetwork_debug (compatibility version 4.8.0, current version 4.8.7)
QtXml
QtXmlPatterns
$ otool -L /opt/local/libexec/qt4/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit 
/opt/local/libexec/qt4/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit:
	/opt/local/libexec/qt4/Library/Frameworks/QtWebKit.framework/Versions/4/QtWebKit (compatibility version 4.9.0, current version 4.9.4)
	/opt/local/libexec/qt4/Library/Frameworks/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.7)
	/opt/local/libexec/qt4/Library/Frameworks/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.7)
	/opt/local/libexec/qt4/Library/Frameworks/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.7)
	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1038.36.0)
	/opt/local/libexec/qt4/Library/Frameworks/QtGui.framework/Versions/4/QtGui_debug (compatibility version 4.8.0, current version 4.8.7)
	/opt/local/libexec/qt4/Library/Frameworks/QtCore.framework/Versions/4/QtCore_debug (compatibility version 4.8.0, current version 4.8.7)
	/opt/local/libexec/qt4/Library/Frameworks/QtNetwork.framework/Versions/4/QtNetwork_debug (compatibility version 4.8.0, current version 4.8.7)
	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
	/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.43.0)
	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)
	/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.62.0)
$ ls /opt/local/libexec/qt4/Library/Frameworks/QtWebKit.framework/Versions/4/
Headers/  QtWebKit*
$ ls /opt/local/libexec/qt4/Library/Frameworks/QtCore.framework/Versions/4/
Headers/      QtCore*       QtCore_debug*

Change History (7)

comment:1 Changed 4 years ago by mkae (Marko Käning)

Cc: RJVB added
Version: 2.3.4

comment:2 Changed 4 years ago by mkae (Marko Käning)

Cc: mkae added

comment:3 Changed 4 years ago by RJVB (René Bertin)

If I may suggest, Qt's release + debug framework approach is nice and would be great if it worked reliably, but it never did in my testing. It's also mostly interesting for people working on Qt4, of which there are probably preciously few these days.

I find that most of the time I only need usable backtraces into Qt code because whatever bug I'm hunting comes from dependent ("client") code 95+% of the time.

That's why in my own Qt5 port I have refactored the debug variant so that it adds and changes a number of compiler options so that I get a true debug build, while my personal regular build already contains some form of debug information.

This approach is more than good enough with MacPorts where you can switch between regular/release and +debug builds with the port de/activate feature. As a bonus you cut the build time in half: you install the regular/release build from a binary package, and only build the debug version (actually, >2x faster because a -O0 build is a lot faster than a -O2 or -O3 build).

comment:4 Changed 4 years ago by RJVB (René Bertin)

PS: are you running on a 32bit machine?

There's a relevant comment in the Portfile:

If the library is QtWebKit,
# and the build is library (no-framework), universal, and debug, then
# the linkage is just -lQtWebKit, not -lQtWebKit_debug because the
# debug library for 32-bit system cannot be created (too large).

and further down

       if {[variant_isset debug]} {

            # but not if QtWebKit and +universal, since that one does
            # not exist (the 32-bit version of the debug library is
            # larger than fits into the 32-bit filespace).

which AFAICT means the distinction between framework and non-framework builds is moot as one would expect.

comment:5 Changed 4 years ago by mkae (Marko Käning)

Jesus, do we need to close this as "wontfix"? :~/

comment:6 Changed 4 years ago by RJVB (René Bertin)

Do we have someone under that pseudo? ;)

comment:7 Changed 4 years ago by michaelld (Michael Dickens)

Not sure who this "Jesus" is to which you're referring ... but, maybe s/he could help here? LOL

What does "uname -a" return? That should confirm whether the OP's computer is trying to run as 32 or 64 bit.

Note: See TracTickets for help on using tickets.