Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#34864 closed defect (fixed)

qt4-mac: Broken links

Reported by: mojca (Mojca Miklavec) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.1.1
Keywords: Cc: mkae (Marko Käning)
Port: qt4-mac

Description

With qt4-mac +framework I get the following symlinks:

> ll /opt/local/include/ | grep Qt
lrwxr-xr-x     1 root      admin      187 14 jun 11:29 Qt3Support -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/Qt3Support.framework/Headers
lrwxr-xr-x     1 root      admin      186 14 jun 11:29 QtCLucene -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtCLucene.framework/Headers
lrwxr-xr-x     1 root      admin      183 14 jun 11:29 QtCore -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtCore.framework/Headers
lrwxr-xr-x     1 root      admin      183 14 jun 11:29 QtDBus -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtDBus.framework/Headers
lrwxr-xr-x     1 root      admin      190 14 jun 11:29 QtDeclarative -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtDeclarative.framework/Headers
lrwxr-xr-x     1 root      admin      187 14 jun 11:29 QtDesigner -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtDesigner.framework/Headers
lrwxr-xr-x     1 root      admin      197 14 jun 11:29 QtDesignerComponents -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtDesignerComponents.framework/Headers
lrwxr-xr-x     1 root      admin      182 14 jun 11:29 QtGui -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtGui.framework/Headers
lrwxr-xr-x     1 root      admin      183 14 jun 11:29 QtHelp -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtHelp.framework/Headers
lrwxr-xr-x     1 root      admin      189 14 jun 11:29 QtMultimedia -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtMultimedia.framework/Headers
lrwxr-xr-x     1 root      admin      186 14 jun 11:29 QtNetwork -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtNetwork.framework/Headers
lrwxr-xr-x     1 root      admin      185 14 jun 11:29 QtOpenGL -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtOpenGL.framework/Headers
lrwxr-xr-x     1 root      admin      185 14 jun 11:29 QtScript -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtScript.framework/Headers
lrwxr-xr-x     1 root      admin      190 14 jun 11:29 QtScriptTools -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtScriptTools.framework/Headers
lrwxr-xr-x     1 root      admin      182 14 jun 11:29 QtSql -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtSql.framework/Headers
lrwxr-xr-x     1 root      admin      182 14 jun 11:29 QtSvg -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtSvg.framework/Headers
lrwxr-xr-x     1 root      admin      183 14 jun 11:29 QtTest -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtTest.framework/Headers
lrwxr-xr-x     1 root      admin      186 14 jun 11:29 QtUiTools -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtUiTools.framework/Headers
lrwxr-xr-x     1 root      admin      185 14 jun 11:29 QtWebKit -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtWebKit.framework/Headers
lrwxr-xr-x     1 root      admin      182 14 jun 11:29 QtXml -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtXml.framework/Headers
lrwxr-xr-x     1 root      admin      190 14 jun 11:29 QtXmlPatterns -> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_aqua_qt4-mac/qt4-mac/work/destroot/opt/local/Library/Frameworks/QtXmlPatterns.framework/Headers

As well as somewhat fishy list of files inside /opt/local/Library/Frameworks (those *.la files should probably not be there):

Qt3Support.framework
Qt3Support.la
QtCLucene.framework
QtCLucene.la
QtCore.framework
QtCore.la
QtDBus.framework
QtDBus.la
QtDeclarative.framework
QtDeclarative.la
QtDesigner.framework
QtDesigner.la
QtDesignerComponents.framework
QtDesignerComponents.la
QtGui.framework
QtGui.la
QtHelp.framework
QtHelp.la
QtMultimedia.framework
QtMultimedia.la
QtNetwork.framework
QtNetwork.la
QtOpenGL.framework
QtOpenGL.la
QtScript.framework
QtScript.la
QtScriptTools.framework
QtScriptTools.la
QtSql.framework
QtSql.la
QtSvg.framework
QtSvg.la
QtTest.framework
QtTest.la
QtUiTools.framework
QtUiTools.la
QtWebKit.framework
QtWebKit.la
QtXml.framework
QtXml.la
QtXmlPatterns.framework
QtXmlPatterns.la

There are a few more items that probably need a fix, but I first need to resolve these before being able to test any further.

Change History (19)

comment:1 Changed 12 years ago by michaelld (Michael Dickens)

I tried to fix the symlink issue; guess I need to go back and revisit that.

comment:2 Changed 12 years ago by michaelld (Michael Dickens)

What's wrong with having .la files in Library/Frameworks? Those are used by GNU libtool, and in my testing did what they were supposed to do for ports using that means of compiling. Either way, I don't think it hurts to have them there, and especially if their contents are correct.

comment:3 Changed 12 years ago by michaelld (Michael Dickens)

Yup; I messed up the post-destroot symlinks. The best laid plans ...

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

Cc: mk@… added

Cc Me!

comment:5 Changed 12 years ago by michaelld (Michael Dickens)

Here's the patch that works for me. You can just edit the qt4-mac Portfile and add the extra "sed" yourself; or, make a file with this patch and apply it. Then you can do "sudo port destroot qt4-mac +framework" to verify. I'll need to rev-bump qt4-mac for this change to be effective for those using +framework; I'll do that once I know it works and I/we've resolve other immediate issues -- try to avoid having to re-build qt4-mac any more than necessary 'cause it takes forever.

% svn diff Portfile 
Index: Portfile
===================================================================
--- Portfile    (revision 94313)
+++ Portfile    (working copy)
@@ -583,7 +583,8 @@
         # if they are already there first
 
         foreach fixfile [exec find ${destroot}${qt_frameworks_dir} \
-                             -name "*.framework"] {
+                             -name "*.framework" | \
+                             sed -e "s@${destroot}@@g"] {
             set tf_full [strsed ${fixfile} {s@\\.framework@@}]
             set tf [strsed ${tf_full} {g@.*\/@@}]
             set inc_file ${destroot}${qt_includes_dir}/${tf}

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: michaelld@… removed
Owner: changed from macports-tickets@… to michaelld@…
Summary: Broken links in qt4-macqt4-mac: Broken links

comment:7 in reply to:  2 Changed 12 years ago by mojca (Mojca Miklavec)

Replying to michaelld@…:

What's wrong with having .la files in Library/Frameworks? Those are used by GNU libtool, and in my testing did what they were supposed to do for ports using that means of compiling. Either way, I don't think it hurts to have them there, and especially if their contents are correct.

I'm not sure what .la files are used for, but I simply find it ugly to see them there. In my opinion they should end up in /opt/local/lib, not in /opt/local/Library/Frameworks.

comment:8 in reply to:  5 Changed 12 years ago by mojca (Mojca Miklavec)

Replying to michaelld@…:

Here's the patch that works for me.

I'm sorry that it took me so long to test this. This particular issue works now, but it still fails in a different way: it tries to use -lQtGui flag for example. Here is some debugging info. I'm not 100% sure, but there seems to be a problem with /opt/local/share/qt4/mkspecs/features/qt_functions.prf which mistakenly adds the flag.

DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt.prf:197 : Entering block 4 (0). [else {]
DEBUG 1: Running project expand: upper(QT_gui_LIB) [19]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt.prf:198 :DEFINES: :*=: (QT_GUI_LIB)
DEBUG 1: Running project expand: upper(QT_gui_LIB) [19]
DEBUG 1: Running project test: isEqual(QTLIB::opengl) [4]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt.prf:199 : Test (isEqual(QTLIB, opengl)) failed.
DEBUG 1: Running project test: isEqual(QTLIB::openvg) [4]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt.prf:200 : Test (isEqual(QTLIB, openvg)) failed.
DEBUG 1: Running project test: isEqual(QTLIB::qt3support) [4]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt.prf:201 : Test (isEqual(QTLIB, qt3support)) failed.
DEBUG 1: Running project test: isEqual(QTLIB::testlib) [4]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt.prf:202 : Test (isEqual(QTLIB, testlib)) failed.
DEBUG 1: Running project test: isEqual(QTLIB::dbus) [4]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt.prf:203 : Test (isEqual(QTLIB, dbus)) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:24 :INCLUDEPATH: :-=: (/opt/local/include)
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:25 :INCLUDEPATH: :-=: (/opt/local/include/QtGui)
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:26 :INCLUDEPATH: :+=: (/opt/local/include/QtGui /opt/local/include)
DEBUG 1: Running project test: contains(QT_CONFIG::qt_framework) [16]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:31 : Entering block 5 (0). [mac:!static:contains(QT_CONFIG, qt_framework) {]
DEBUG 1: Running project test: isEmpty(QMAKE_FRAMEWORKDIR_QT) [19]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:32 : Entering block 6 (0). [isEmpty(QMAKE_FRAMEWORKDIR_QT) {]
DEBUG 1: Running project test: contains(LIBS::-F/opt/local/Library/Frameworks) [16]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:33 : Entering block 7 (0). [!contains(LIBS,-F$$[QT_INSTALL_PREFIX]/Library/Frameworks) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:34 :LIBS: :=: (-g -L/path/to/project/lib/sis3150_calls -L/path/to/project/lib/sis3100_calls -l_sis3100 -lgsl -lgslcblas -lboost_filesystem -lboost_system -F/opt/local/Library/Frameworks)
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:35 : Leaving block 7
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:36 : Leaving block 6
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:36 : Else excluded.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:36 : Test (else) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:36 : Entering block 6 (1). [} else {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:37 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:38 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:39 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:40 : Leaving block 6
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:40 : Ignored due to block being false.
DEBUG 1: Running project test: isEmpty(QMAKE_LIBDIR_QT) [19]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:41 : Test (isEmpty(QMAKE_LIBDIR_QT)) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:41 : Entering block 6 (1). [isEmpty(QMAKE_LIBDIR_QT) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:42 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:43 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:44 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:45 : Leaving block 6
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:45 : Else considered.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:45 : Entering block 6 (0). [else {]
DEBUG 1: Running project test: contains(LIBS::-F/opt/local/lib) [16]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:46 : Entering block 7 (0). [!contains(LIBS,-F$$QMAKE_LIBDIR_QT) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:47 :LIBS: :=: (-g -L/path/to/project/lib/sis3150_calls -L/path/to/project/lib/sis3100_calls -l_sis3100 -lgsl -lgslcblas -lboost_filesystem -lboost_system -F/opt/local/Library/Frameworks -F/opt/local/lib)
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:48 : Leaving block 7
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:49 : Leaving block 6
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:50 : Leaving block 5
DEBUG 1: Running project test: isEmpty(QMAKE_LIBDIR_QT) [19]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:51 : Test (isEmpty(QMAKE_LIBDIR_QT)) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:51 : Entering block 5 (1). [isEmpty(QMAKE_LIBDIR_QT) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:52 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:53 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:54 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:55 : Leaving block 5
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:55 : Else considered.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:55 : Entering block 5 (0). [else {]
DEBUG 1: Running project test: contains(LIBS::-L/opt/local/lib) [16]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:56 : Entering block 6 (0). [!contains(LIBS,-L$$QMAKE_LIBDIR_QT) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:57 :LIBS: :=: (-g -L/path/to/project/lib/sis3150_calls -L/path/to/project/lib/sis3100_calls -l_sis3100 -lgsl -lgslcblas -lboost_filesystem -lboost_system -F/opt/local/Library/Frameworks -F/opt/local/lib -L/opt/local/lib)
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:58 : Leaving block 6
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:59 : Leaving block 5
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:61 :LIB_NAME: :=: (QtGui)
DEBUG 1: Running project test: unset(LINKAGE) [8]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:63 : Entering block 5 (0). [mac:!qt_no_framework {]
DEBUG 1: Running project expand: list(/opt/local/lib /opt/local/lib) [7]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:64 : Entering block 6 (0). [for(frmwrk_dir, $$list($$QMAKE_FRAMEWORKDIR_QT $$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH))) {]
DEBUG 1: Running project test: exists(/opt/local/lib/QtGui.framework) [5]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:65 : Test (exists($${frmwrk_dir}/$${LIB_NAME}.framework)) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:65 : Entering block 7 (1). [exists($${frmwrk_dir}/$${LIB_NAME}.framework) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:66 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:67 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:68 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:69 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:70 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:71 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:72 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:73 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:74 : Leaving block 7
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:74 : Ignored due to block being false.
DEBUG 1: Running project test: exists(/opt/local/lib/QtGui.framework) [5]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:65 : Test (exists($${frmwrk_dir}/$${LIB_NAME}.framework)) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:65 : Entering block 7 (1). [exists($${frmwrk_dir}/$${LIB_NAME}.framework) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:66 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:67 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:68 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:69 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:70 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:71 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:72 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:73 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:74 : Leaving block 7
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:74 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:75 : Leaving block 6
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:76 : Leaving block 5
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:77 : Test (symbian) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:77 : Entering block 5 (1). [symbian {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:78 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:80 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:81 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:83 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:84 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:86 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:87 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:88 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:89 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:90 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:92 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:93 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:94 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:95 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:96 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:97 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:98 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:99 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:100 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:101 : Leaving block 5
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:101 : Ignored due to block being false.
DEBUG 1: Running project test: isEmpty(LINKAGE) [19]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:102 : Entering block 5 (0). [isEmpty(LINKAGE) {]
DEBUG 1: Running project test: if(!debug_and_release|build_pass) [26]
DEBUG 1: Running project test: CONFIG(debug::debug|release) [10]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:103 : Test (CONFIG(debug, debug|release)) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:103 : Entering block 6 (1). [if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:104 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:108 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:109 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:110 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:111 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:112 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:113 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:114 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:115 : Leaving block 6
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:115 : Ignored due to block being false.
DEBUG 1: Running project test: isEmpty(LINKAGE) [19]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:116 :LINKAGE: :=: (-lQtGui)
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:117 : Leaving block 5
DEBUG 1: Running project test: isEmpty(QMAKE_LSB) [19]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:118 : Test (!isEmpty(QMAKE_LSB)) failed.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:118 : Entering block 5 (1). [!isEmpty(QMAKE_LSB) {]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:119 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:120 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:121 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:122 : Leaving block 5
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:122 : Ignored due to block being false.
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:123 :LIBS: :+=: (-lQtGui)
DEBUG 1: Running project test: export(LIBS) [6]
DEBUG 1: Running project test: export(INCLUDEPATH) [6]
DEBUG 1: Running project test: export(QMAKE_FRAMEWORKPATH) [6]
DEBUG 1: Running project test: export(QMAKE_LFLAGS) [6]
DEBUG 1: Running project test: return(true) [12]

Or do you want a separate ticket for this?

comment:9 Changed 12 years ago by mojca (Mojca Miklavec)

It looks like the most relevant part that fails is this one:

    mac:!qt_no_framework {
       for(frmwrk_dir, $$list($$QMAKE_FRAMEWORKDIR_QT $$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH))) {
           exists($${frmwrk_dir}/$${LIB_NAME}.framework) {
               QMAKE_FRAMEWORKPATH *= $${frmwrk_dir}
                FRAMEWORK_INCLUDE = $$frmwrk_dir/$${LIB_NAME}.framework/Headers
                !qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
                  INCLUDEPATH -= $$FRAMEWORK_INCLUDE
                  INCLUDEPATH = $$FRAMEWORK_INCLUDE $$INCLUDEPATH
                }
                LINKAGE = -framework $${LIB_NAME}
                break()
              }
         }
    }

and the corresponding log showing that Qt was trying to look for /opt/local/lib/QtGui.framework instead of cheking for the proper path of framework (and it loops over "exists($${frmwrk_dir}/$${LIB_NAME}.framework)" inside "for(frmwrk_dir, $$list($$QMAKE_FRAMEWORKDIR_QT $$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH))) {" twice):

DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:64 : Entering block 6 (0). [for(frmwrk_dir, $$list($$QMAKE_FRAMEWORKDIR_QT $$QMAKE_LIBDIR_QT $$QMAKE_LIBDIR $$(DYLD_FRAMEWORK_PATH))) {]
DEBUG 1: Running project test: exists(/opt/local/lib/QtGui.framework) [5]
DEBUG 1: Project Parser: /opt/local/share/qt4/mkspecs/features/qt_functions.prf:65 : Test (exists($${frmwrk_dir}/$${LIB_NAME}.framework)) failed.

and subsequently the code

isEmpty(LINKAGE)

fails.

Maybe QMAKE_FRAMEWORKDIR_QT is not properly set?

comment:10 Changed 12 years ago by mojca (Mojca Miklavec)

It seems that all of the following lines are true/executed (QT_CONFIG contains qt_framework, but QMAKE_FRAMEWORKDIR_QT is actually empty; it still adds -F$$[QT_INSTALL_PREFIX]/Library/Frameworks, but this doesn't help in the code following later on which is not aware of this path):

mac:!static:contains(QT_CONFIG, qt_framework) {
  isEmpty(QMAKE_FRAMEWORKDIR_QT) {
     !contains(LIBS,-F$$[QT_INSTALL_PREFIX]/Library/Frameworks) {
       LIBS = $$LIBS -F$$[QT_INSTALL_PREFIX]/Library/Frameworks
     }
  }

comment:11 Changed 12 years ago by mojca (Mojca Miklavec)

One more thought: I would be a lot more happy if the issue was fixed in sources (configuring the frameworks path in some different way), not by "post-processing broken symlinks". There is a chance that the issue with "-lQtGui" as well as broken symlinks would be solved simultaneously. Also, I still claim that *.la files should go inside "lib".

It might be also interesting to test how +frameworks behaves if frameworks are not placed under standard location. The code above (which is actually being used) apparently uses hardcoded Library/Frameworks, so I'm almost sure that it would break.

comment:12 Changed 12 years ago by mojca (Mojca Miklavec)

There's another ticket here: #34947.

comment:13 Changed 12 years ago by michaelld (Michael Dickens)

Lots to parse through there! I did basic testing using "qt4-mac +framework" and some ports that depend on qt4-mac, and they seemed to work for me. It's not what I use, but to each, ya know. It's certainly possible that I messed up some parts of it, since getting the frameworks separated from libraries required adding in the FRAMEWORKS stuff in multiple files. And, we require these 2 separate locations, because otherwise everything ends up in $[prefix}/lib, which is undesirable for frameworks -- though it might be a better place for the .la files; or maybe the actual framework directory would be better (where the .prl file ends up).

I am always open to patches to fix such issues and correct various behavior.

I will look into these issues and work towards fixing them, but you could keep debugging this issue too if you have time. What I'm going to do is (1) "install qt4-mac +framework"; (2) tweak the "for(frmwrk_dir" loop to print out variables as they come in, as well as re-enable (or add) printouts before and after this loop; then (3) try to compile a dependent port, with debug output, to see what's happening.

BTW> What does "qmake -query" return for you?

comment:14 Changed 12 years ago by mojca (Mojca Miklavec)

qmake -query returns me

QT_INSTALL_PREFIX:/opt/local
QT_INSTALL_DATA:/opt/local/share/qt4
QT_INSTALL_DOCS:/opt/local/share/doc/qt4
QT_INSTALL_HEADERS:/opt/local/include
QT_INSTALL_LIBS:/opt/local/lib
QT_INSTALL_FRAMEWORKS:/opt/local/Library/Frameworks
QT_INSTALL_BINS:/opt/local/bin
QT_INSTALL_PLUGINS:/opt/local/share/qt4/plugins
QT_INSTALL_IMPORTS:/opt/local/share/qt4/imports
QT_INSTALL_TRANSLATIONS:/opt/local/share/qt4/translations
QT_INSTALL_CONFIGURATION:/opt/local/etc/qt4
QT_INSTALL_EXAMPLES:/opt/local/share/qt4/examples
QT_INSTALL_DEMOS:/opt/local/share/qt4/demos
QMAKE_MKSPECS:/opt/local/share/qt4/mkspecs
QMAKE_VERSION:2.01a
QT_VERSION:4.8.2

There seems to be no QMAKE_FRAMEWORKDIR_QT variable.

comment:15 Changed 12 years ago by michaelld (Michael Dickens)

That looks correct. QMAKE_FRAMEWORKDIR_QT is set internally to QMake; I just don't know -when- it is set internally: before or after qt_functions.prf . I thought it was before, but maybe I'm wrong.

comment:16 Changed 12 years ago by robsonpeixoto@…

The quake -query are correct, but the all links are wrong.

News?

comment:17 Changed 12 years ago by michaelld (Michael Dickens)

Apply the patch above to the Portfile to fix the links. I'm trying to find time to work on this still. Hopefully the next week or so.

comment:18 Changed 12 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: newclosed

I've fixed the original topic in r96486. I'm closing this ticket as fixed; please open a new ticket if the other issue described here is still a problem.

comment:19 Changed 12 years ago by michaelld (Michael Dickens)

I'm working to fix the framework issue you describe, in ticket #35506. Should be simple once I get enough debugging comments in place :)

Note: See TracTickets for help on using tickets.