Opened 14 years ago
Closed 14 years ago
#27215 closed defect (fixed)
qt4-mac 4.7.0_n +debug+demos+examples+mysql+odbc+psql91+quartz+universal: A nameless mess
Reported by: | neverlunch@… | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | Cc: | ||
Port: | qt4-mac |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
I have been using Qt from MacPorts for one and a half year without problem. Now, I'm going insane...
Six days of time waste. Everything seemed to work until I wanted to try qtscriptgenerator, but its compilation did not succeed.
I compiled around 7 times qt 4.7.0 (twice before it goes from _0 to _1) those last six days, including once after a full MacPorts cleaning. Without any change in my code, I got weird behaviors such as :
- Q_OS_MAC undefined ;
- A runtime error on MainWindow::show(): QWidget: Must construct a QApplication before a QPaintDevice.
Here, universal means "i386 x86_64 ppc". Anyway, it did not work with only "i386 x86_64". (I added ppc after cleaning.)
Working on Darwin Kernel Version 10.4.0: Fri Apr 23 18:27:12 PDT 2010; root:xnu-1504.7.4~1/RELEASE_X86_64 x86_64.
Change History (14)
comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to michaelld@… |
Port: | qt4-mac added |
comment:2 Changed 14 years ago by neverlunch@…
comment:3 Changed 14 years ago by michaelld (Michael Dickens)
Those patch files are not yet used, but they (or, rather, what they turn out to be) will be once I get +x11 variant working. I've got lots on my queue already, so I'm not concentrating on that variant until everything else stabilizes. The file "mkspecs/darwin-g++/qmake.conf" is not used if you're building Qt on OSX with +quartz. If you want to use it with your changes, I recommend (1) telling me what they are, so that I can add those changes to mine (you've now done this :); and (2) editing "${prefix}/share/qt4/mkspecs/darwin-g++/qmake.conf" and doing the change there. #2 will be -much- faster than recompiling Qt, so I'd stop the recompiling unless you're not running Qt with +quartz & hence are required to do so.
comment:4 Changed 14 years ago by michaelld (Michael Dickens)
I'm sorry to hear of your issues. Qt 4.7.0 made a number of small/subtle changes that require some projects to be updated to work correctly. Given how large Qt 4.7 is, I try to keep revision-bumps to a minimum, and I also try -- to the best of my ability -- to make sure the Portfile will work for as many folks as possible; I try to pre-test on 10.5 (i386 and ppc) and 10.6 (x86_64), with various of the features turned on an off. That said, there are -always- issue that arise since I cannot test for every possible condition.
As it turned out, some ports (e.g., Phonon, qtscriptgenerator, many KDE ports) did not like the upgrade to 4.7.0 (_0 or _1) -- so we've been scrambling to bring compatibility to those ports, as either we find the issues or they are reported here on a ticket.
comment:5 Changed 14 years ago by michaelld (Michael Dickens)
Given that your issue seems to be with a personal project (or, maybe, at least, one that I don't have access to help debug), the best I can do is provide advice; I really cannot help debug it further. That said, I'm glad you seem to have figured out what the issue is.
From your description (via 'umake -a') it seems as though you're running stock OSX 10.6.4 -- so, really, the main issue would then be whether you're trying to use "qt4-mac +quartz" to compile for X11 GUI. It is not designed to do this yet (that'll be the +x11 variant, once it works), so your project may or not work without significant modification of those mkspecs file(s).
All of that said, I'm certainly interested in how you've patched the darwin-g++ mkspecs to make it work with your project. Seems like I'll be needing to do similar patching.
Are you ready for this ticket to be closed?
comment:6 Changed 14 years ago by neverlunch@…
The only thing I did is to add
patchfiles-append patch-mkspecs_darwin-g++_qmake.conf.diff patchfiles-append patch-darwin-g++.diff
into the Portfile in order to have __APPLE__
& __GNUC__
defined.
Without that, Q_OS_MAC is undefined as it relies on them. How could it not be a problem for each "Qt on MacPorts" user ?
I did not have any look in any Qt source but I suppose that platform-specific operations could not be functional if Q_OS_WIN32 is defined (which is the case in my projects) instead of Q_OS_MAC. So, having the wrong OS defined when compiling Qt could be a disaster, even if it seems to succeed. Please, correct me if I am wrong.
I don't use x11 and don't wish to. I even added +no_x11
into variants.conf.
Although variant +quartz is implicit, I explicitly mentioned it for disambiguation.
You're right, I could have had added those defines into the installed qmake.conf. I haven't thought of it. I wanted to find a solution for the whole installation process.
So, qt4-mac @4.7.0_1 +debug+demos+examples+mysql+odbc+psql91+quartz is still building. I will leave comments after testing this new build.
comment:7 Changed 14 years ago by neverlunch@…
...And finally, it did not either work.
But it seems I got good results by erasing everything about patches in the Portfile. Q_OS_MAC
is back and no more runtime error. The future will tell me more.
comment:8 Changed 14 years ago by michaelld (Michael Dickens)
To add to your fun, I just bumped qt4-mac to 4.7.1.
comment:9 Changed 14 years ago by michaelld (Michael Dickens)
By "it did not either" do you mean that the MacPorts' install of qt4-mac failed? Or, that qt4-mac was installed but did not work with your project? I've seen the issues you mention elsewhere, but thought (hoped) it wasn't my patches creating them. Maybe I'm wrong? If you mean to say that in removing the patches you have corrected those issues, then I need to re-investigate what the patches are doing.
BTW> I find using ccache helps out -a lot- when you know you'll be building the same code over and again, such as it sounds like you're doing with qt4-mac. What you do is append "configure.ccache=yes" to the end of your 'port' command line (or, add/change it in the port config file).
comment:10 follow-up: 11 Changed 14 years ago by neverlunch@…
By "it did not either", i meant that my problems were not ended. The whole installation process ran without any error.
Removing all the patches-related stuff from Portfile gave me a functional Qt4. But, in the other hand, compiling Phonon failed due to an attempt to link against QuickTime framework (which is not 64-bit). I know that QTKit framework should be used instead, for some reasons related to the OS version. I saw both of them mentioned in the command line. It seems to be a consequence of deleting patches stuff: Phonon installed successfully prior to that.
The other issues I had were related to orc (universal i386 x86_64 ppc), which is needed for OpenCV. There can't be any link with your work, I think.
Thanks ! Ccache is a great new ! I remembered the time I was compiling Linux kernel over and over again, without losing any intermediate file. I wondered I could do the same here.
Wouldn't you still have the Portfile that was bundled with Qt 4.6.3 ?
comment:11 Changed 14 years ago by nerdling (Jeremy Lavergne)
Replying to neverlunch@…:
Wouldn't you still have the Portfile that was bundled with Qt 4.6.3 ?
The previous versions of qt4 should still be available on your system, just disabled. Check out port list
and then port deactivate
the current one and port activate
the previous one you'd like to use. activate will need a fully qualified portname and version: qt4-mac@4.6.3_X[+VARS].
comment:12 Changed 14 years ago by michaelld (Michael Dickens)
The last version of the 4.6.3 Portfile can be found at < http://trac.macports.org/browser/trunk/dports/aqua/qt4-mac/Portfile?rev=70730 >.
comment:13 Changed 14 years ago by neverlunch@…
Thanks for the info.
I just installed Qt 4.7.1 +debug+demos+examples+mysql+odbc+psql91+quartz+universal a few minutes ago. It works but, too, I removed the patch-related commands in the Portfile. I did not even want to try with them.
I still wonder how I could be the only one down here with that problem !
comment:14 Changed 14 years ago by michaelld (Michael Dickens)
Resolution: | → fixed |
---|---|
Status: | new → closed |
I was never really clear what this ticket is about except that qt4-mac starting with 4.7.0 was causing you issues. Hopefully you've resolved those issues. I just checked in r74980, with a few small changes (but no rev bump) so I'm closing this ticket. Please do reopen if you feel the original issue was not addressed -- and, if you do reopen, please try again to explain your issue.
I saw something: patch-mkspecs_darwin-g++_qmake.conf.diff and patch-darwin-g++.diff are not used.
mkspecs/darwin-g++/qmake.conf does not contain
QMAKE_COMPILER_DEFINES += __APPLE__ __GNUC__
. It seems to be the cause.I'm currently building it (without universal to gain time), in despite of this (minor?) failure.
__APPLE__ __GNUC__
are now defined inQMAKE_COMPILER_DEFINES
.