|
From: Mojca M. <moj...@gm...> - 2012-01-04 22:46:33
|
On Wed, Jan 4, 2012 at 23:09, Ethan A Merritt wrote: > Mojca Miklavec wrote > > >> There are at least the following issues: >> - configure script is unable to find Qt > > It uses pkg-config. If your Qt installation does not come with a set of > *.pc files then the configuration script will not work. Even if it would come with *.pc scripts, Mac OS X doesn't ship pkg-config by default, so it would be useless. But the good news is that it is installed at a default location (with default binary installer) and many programs, like Geant4 for example, take this into account. Again, I don't know how to use autotools, but the algorithm is simple enough: - check if pkg-config finds Qt - if not, check if flags that I mentioned work fine >> - MOC and UIC are set to an empty string; here "moc" and "uic" >> commands work fine, but I don't know why configure script doesn't find >> them > > Because it queries pkg-config to find out where they are. > MOC=`pkg-config --variable=moc_location QtCore` > > By the way, what version of Qt are you trying to use? I just realized that I had no Qt installed at all (I only had developer tools which are installed at some weird location), so I installed the latest version, 4.8.0, but I don't think that it really matters. I was testing it long ago (around July when 4.8.0 wasn't available yet, see "Any chance to fix gnuplot on mac?" thread, but there was some additional private conversation with Jérôme Lodewyck who helped me solve some issues) with exactly the same outcome. If needed, I can probably figure out how to uninstall 4.8.0 and install 4.7.*, but that won't help solve the two problems with compiling (and last time when I tried it there were exactly the same problems with running it). > I've just been debugging configuration problems with Qt 4.7.4, where it turns > out that I need to do the same thing in order to pick up locations for > the rcc and lrelease utilities. > >> - if I fix the two above, qt terminal compiles fine, but I cannot plot anything: >> >> gnuplot> plot sin(x) >> The process has forked and you cannot use this CoreFoundation >> functionality safely. You MUST exec(). >> Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() >> to debug. > > No idea what that's about. It is clearly some OSX weirdness. > Googling that error message turns up this totally bizarre advice: Last time I didn't find anything useful either. However google now pointed me to the following: http://gitorious.org/~friesoft/dinjam/friesoft-development/blobs/master/src/sources/data/standarddirs_mac.cpp /** Calling CoreFoundation APIs (which is unavoidable in Qt/Mac) has always had issues on Mac OS X, but as of 10.5 is explicitly disallowed with an exception. As a result, in the case where we would normally fork and then dlopen code, or continue to run other code, we must now fork-and-exec. See "CoreFoundation and fork()" at http://developer.apple.com/releasenotes/CoreFoundation/CoreFoundation.html */ (The link is not particularly useful since it now points to Release Notes of 10.7 instead of 10.5.) or http://stackoverflow.com/questions/3835247/do-work-out-of-process-in-a-cocoa-app I would be willing to debug, but I have no idea how to do so. I created a ticket: https://sourceforge.net/tracker/?func=detail&aid=3469233&group_id=2055&atid=102055 where I attached crash report (I just realized where systems stores crash reports) if that is of any help, but I'm not sure neither how to debug nor how to fix anything. If you tell me how exactly to "exec()" after fork in qt_term.cpp, I can test it, but I don't fully understand the code, so I'm not sure what exactly to change and how. It is pretty clear that problems start at this line in qt_term.cpp: QtGnuplotApplication application(argc, (char**)( NULL)); but after this line gets executed, I cannot even printf (whatever I put into print, it doesn't get displayed until something semi-crashes and printf sometimes starts working afer QApplication* application = new QApplication(argc, (char**)( NULL)); again). Mojca |