[KDE/Mac] KDE On Mac Lion

Patrice Kouame patrice.kouame at gmail.com
Tue Jul 19 17:33:45 CEST 2011


Hi - 
I posted the message below on kimageshop but as (boud) suggested most of my issues seem to be KDE related, so I hope some of you can help with my efforts to revive the KDE/Calligra effort on Mac.  I'm running a bleeding edge Lion Xcode 4.2 platform, so this may be of interest to some.  Basically all my KDE apps hang on a QMutex during startup.  Here is a trace of kdebugdialog.
Sampling process 396 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling kdebugdialog (pid 396) every 1 millisecond
Process:         kdebugdialog [396]
Path:            /Applications/KDE4/kdebugdialog.app/Contents/MacOS/kdebugdialog
Load Address:    0x106dbe000
Identifier:      kdebugdialog
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  launchd [159]

Date/Time:       2011-07-19 10:41:10.009 -0400
OS Version:      Mac OS X 10.7 (11A511)
Report Version:  7

Call graph:
    2906 Thread_32727   DispatchQueue_1: com.apple.main-thread  (serial)
    + 2906 start  (in kdebugdialog) + 52  [0x106dc1cd4]
    +   2906 main  (in kdebugdialog) + 1497  [0x106dc22b9]  main.cpp:111
    +     2906 KUniqueApplication::KUniqueApplication(bool, bool)  (in libkdeui.5.dylib) + 32  [0x106ee8a06]  kuniqueapplication.cpp:314
    +       2906 KUniqueApplication::Private::initHack(bool)  (in libkdeui.5.dylib) + 120  [0x106ee89a0]  qglobal.h:2193
    +         2906 KUniqueApplication::start(QFlags<KUniqueApplication::StartFlag>)  (in libkdeui.5.dylib) + 503  [0x106ee7aaf]  kuniqueapplication.cpp:145
    +           2906 mac_initialize_dbus()  (in libkdecore.5.dylib) + 291  [0x107676b53]  kkernel_mac.cpp:146
    +             2906 mac_set_dbus_address(QString)  (in libkdecore.5.dylib) + 219  [0x10767693b]  kdebug.h:272
    +               2906 KDebug::hasNullOutput(QtMsgType, bool, int, bool)  (in libkdecore.5.dylib) + 147  [0x107542ad1]  kdebug.cpp:842
    +                 2906 KDebugPrivate::areaData(QtMsgType, unsigned int, bool)  (in libkdecore.5.dylib) + 639  [0x10754649b]  kdebug.cpp:423
    +                   2906 KDebugPrivate::writeGroupForNamedArea(QByteArray const&, bool)  (in libkdecore.5.dylib) + 190  [0x107545620]  kdebug.cpp:681
    +                     2906 KConfig::sync()  (in libkdecore.5.dylib) + 219  [0x1074c86bf]  kconfig.cpp:103
    +                       2906 KConfigIniBackend::lock(KComponentData const&)  (in libkdecore.5.dylib) + 253  [0x1074d928f]  kconfigini.cpp:573
    +                         2906 KLockFile::lock(QFlags<KLockFile::LockFlag>)  (in libkdecore.5.dylib) + 230  [0x10767e380]  klockfile_unix.cpp:136
    +                           2906 KTemporaryFile::KTemporaryFile(KComponentData const&)  (in libkdecore.5.dylib) + 80  [0x10755b2b2]  ktemporaryfile.cpp:46
    +                             2906 KTemporaryFilePrivate::defaultPrefix() const  (in libkdecore.5.dylib) + 55  [0x10755bad7]  ktemporaryfile.cpp:37
    +                               2906 KStandardDirs::locateLocal(char const*, QString const&, KComponentData const&)  (in libkdecore.5.dylib) + 25  [0x107591315]  kstandarddirs.cpp:2107
    +                                 2906 KStandardDirs::locateLocal(char const*, QString const&, bool, KComponentData const&)  (in libkdecore.5.dylib) + 127  [0x107591123]  kstandarddirs.cpp:2118
    +                                   2906 KStandardDirs::saveLocation(char const*, QString const&, bool) const  (in libkdecore.5.dylib) + 374  [0x1075901be]  kstandarddirs.cpp:1507
    +                                     2906 KStandardDirs::resourceDirs(char const*) const  (in libkdecore.5.dylib) + 46  [0x10758fe2c]  qatomic_x86_64.h:115
    +                                       2906 KStandardDirs::KStandardDirsPrivate::resourceDirs(char const*, QString const&)  (in libkdecore.5.dylib) + 527  [0x10758ecf1]  kstandarddirs.cpp:1087
    +                                         2906 KStandardDirs::KStandardDirsPrivate::createSpecialResource(char const*)  (in libkdecore.5.dylib) + 865  [0x10758e1d7]  kstandarddirs.cpp:1038
    +                                           2906 KStandardDirs::findExe(QString const&, QString const&, QFlags<KStandardDirs::SearchOption>)  (in libkdecore.5.dylib) + 299  [0x10758b5b5]  kstandarddirs.cpp:1372
    +                                             2906 _ZL15checkExecutableRK7QStringb  (in libkdecore.5.dylib) + 40  [0x10758abf8]  kstandarddirs.cpp:1301
    +                                               2906 _ZL9getBundleRK7QStringb  (in libkdecore.5.dylib) + 45  [0x10758a67d]  kdebug.h:272
    +                                                 2906 KDebug::hasNullOutput(QtMsgType, bool, int, bool)  (in libkdecore.5.dylib) + 83  [0x107542a91]  qmutex.h:102
    +                                                   2906 QMutex::lock()  (in QtCore) + 234  [0x107a22d60]
    +                                                     2906 QMutexPrivate::wait(int)  (in QtCore) + 141  [0x107a25d61]
    +                                                       2906 _pthread_cond_wait  (in libsystem_c.dylib) + 840  [0x7fff8b86c274]
    +                                                         2906 __psynch_cvwait  (in libsystem_kernel.dylib) + 10  [0x7fff8b7febca]
    2906 Thread_32729   DispatchQueue_2: com.apple.libdispatch-manager  (serial)
      2906 _dispatch_mgr_thread  (in libdispatch.dylib) + 54  [0x7fff86b3619e]
        2906 _dispatch_mgr_invoke  (in libdispatch.dylib) + 923  [0x7fff86b3760e]
          2906 kevent  (in libsystem_kernel.dylib) + 10  [0x7fff8b7ff7e6]

Total number in stack (recursive counted multiple, when >=5):

Sort by top of stack, same collapsed (when >= 5):
        __psynch_cvwait  (in libsystem_kernel.dylib)        2906
        kevent  (in libsystem_kernel.dylib)        2906
===========
===========

Also printed out all that kde4info has to say about my current setup
[10:26:13] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --qt-prefix
/Users/Me/kde/inst/master/qt-kde

[10:27:25] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --qt-binaries
/Users/Me/kde/inst/master/qt-kde/bin

[10:27:31] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --qt-libraries
/Users/Me/kde/inst/master/qt-kde/lib

[10:27:36] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --qt-plugins
/Users/Me/kde/inst/master/qt-kde/plugins

[10:27:42] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --prefix
/Users/Me/kde/inst/master

[10:27:55] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --libsuffix

[10:28:08] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --localprefix
/Users/Me/Library/Preferences/KDE/.kde/

[10:28:15] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --kde-version
4.7.40 (4.7.40 (KDE 4.8 >= 200110623)

[10:28:29] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --types
apps - Applications menu (.desktop files)
cache - Cached information (e.g. favicons, web-pages)
cgi - CGIs to run from kdehelp
config - Configuration files
data - Where applications store data
emoticons - Emoticons
exe - Executables in $prefix/bin
html - HTML documentation
icon - Icons
include - Includes/Headers
kcfg - Configuration description files
lib - Libraries
locale - Translation files for KLocale
mime - Mime types
module - Loadable modules
pixmap - Legacy pixmaps
qtplugins - Qt plugins
services - Services
servicetypes - Service types
socket - UNIX Sockets (specific for both current host and current user)
sound - Application sounds
templates - Templates
tmp - Temporary files (specific for both current host and current user)
wallpaper - Wallpapers
xdgconf-autostart - XDG autostart directory
xdgconf-menu - XDG Menu layout (.menu files)
xdgdata-apps - XDG Application menu (.desktop files)
xdgdata-dirs - XDG Menu descriptions (.directory files)
xdgdata-icon - XDG Icons
xdgdata-mime - XDG Mime Types
xdgdata-pixmap - Legacy pixmaps
[10:28:40] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path apps
/Users/Me/Library/Preferences/KDE/.kde/share/applnk/:/Users/Me/kde/inst/master/share/applnk/

[10:29:46] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path  config
/Users/Me/Library/Preferences/KDE/.kde/share/config/:/Users/Me/kde/inst/master/share/config/

[10:30:11] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path xdgconf-autostart
/Users/Me/Library/Preferences/XDG/autostart/

[10:30:45] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path xdgconf-menu
/Users/Me/Library/Preferences/XDG/menus/:/Users/Me/kde/inst/master/etc/xdg/menus/

[10:30:57] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path xdgdata-apps
/Users/Me/.local/share/applications/:/Users/Me/kde/inst/master/share/applications/:/usr/local/share/applications/

[10:31:09] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path xdgdata-dirs
/Users/Me/.local/share/desktop-directories/:/Users/Me/kde/inst/master/share/desktop-directories/

[10:31:18] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path xdgdata-icon
/Users/Me/.local/share/icons/:/Users/Me/kde/inst/master/share/icons/

[10:31:22] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path xdgdata-mime
/Users/Me/.local/share/mime/:/Users/Me/kde/inst/master/share/mime/

[10:31:26] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path xdgdata-pixmap
/Users/Me/.local/share/pixmaps/

[10:31:30] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path libraries

[10:31:43] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path lib
/Users/Me/Library/Preferences/KDE/.kde/lib/:/Users/Me/kde/inst/master/lib/

[10:31:55] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path exe
/Users/Me/Library/Preferences/KDE/.kde/lib/kde4/libexec/:/Users/Me/kde/inst/master/lib/kde4/libexec/:/Users/Me/kde/inst/master/bin/

[10:32:11] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path icons

[10:32:33] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path icon
/Users/Me/Library/Preferences/KDE/.kde/share/icons/:/Users/Me/kde/inst/master/share/icons/

[10:32:44] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path include
/Users/Me/kde/inst/master/include/

[10:32:47] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ kde4-config --path kcfg
/Users/Me/Library/Preferences/KDE/.kde/share/config.kcfg/:/Users/Me/kde/inst/master/share/config.kcfg/
[10:32:56] [Me at Sol-Vishnu /Users/Me/kde/src/master]$ 
If some of you can share your configuration settings, it may put on the right track. Seems like trace points to something about finding the executables and the bundles...
As posted below, qt-kde compiles and runs fine (all bin apps and other kde-edu stuff like Marble).  Dbus is launched according to new instructions on this thread, and the minimal kde libraries have all been compiled and installed successfully.
Thanks in advance, Patrice
original message
================
On Sunday 17 July 2011 Jul, Patrice wrote:
> Hi -
> 
> I'm setting up (attempting to at least) a Kde/Krita development environment
> on Lion with the latest toolchain from Xcode 4.2 beta 3(superset of Lion
> toolchain Xcode 4.1 with llvm 3 etc...).  Need a little help getting past
> the installation hurdle and in return will share and contribute my
> experiences on this bleeding edge platform:
> 
> NOTE:
> - I have a fully operational  qt-kde up and running (all tools in bin run
> fine)
> - built kdesupport, base runtime and kdelibs according to instructions on
> support sites with success.
> - launched dbus (system and session)
> - before I build Calligra Creative decided to try some pure KDE apps like
> kate and konsole without success.

Hm... I'd try to get a simple app like kdebugdialog to run first. But the trace you \
put on the forum shows there's a problem initializing kapplication, somewhere in \
kstandarddirs. Maybe we'd best ask on kde-mac \
(https://mail.kde.org/mailman/listinfo/kde-mac) as well. I'm completely out of my \
depth here, it's so long since I last touched a mac...


> - I am avoiding DYLD_LIBRARY settings as it is not a very good idea on Mac
> and settling for DYLD_FALLBACK... Now at least kbuildsycoca4 and others find
> their libraries (especially attica and dbusmenuqt)
> - I had to build qt with dubs-linked to avoid the "missing libdbus-1" error
> - I meet all of the Krita and Karbon requirements (eigen, lcms ,exiv2 and
> qimageblitz )
> - I'm using build scripts as advised in techbase/kde.org pages
> 
> Questions:
> - I am building everything from git "master" branches.  Should I be pointing
> to a more appropriate branch?

Master is good.

> - Is kdeinit necessary ?  Especially if my interest is purely in running
> Krita and Karbon

Yes, you need it for the file dialogs to work, among other things, if I remember \
correctly.

> - There is talk of dbus incompatibilities and "special" dbus ports for kde.
> I installed the latest libdbus-1 from macports.  Am I ok?

I'm not sure...

> - Some start dbus via dbus-launch?  Which is the best way to start dbus on
> the mac.  The system bus is auto-launched for me correctly.

Not sure either, I'm afraid. 

> -  Can someone with a "working" OS X (SL at least) Krita development
> environment share their setup ?

I don't think there's anyone around, actually, you're boldly going where no hacker \
has gone in recent years :-)


-- 
Boudewijn Rempt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-mac/attachments/20110719/8ca96422/attachment-0001.htm 


More information about the kde-mac mailing list