Registered Member
|
Hello,
I've successfully built koffice2.1 on Mac OS X. The apps (krita, kword,..) can be launched, but I get the following error at launch time (in a dialog box):
I can then click "Ok" and the app kinda works, until the errors shows again. I googled that error and apparently I'm not the first one to get it, but I couldn't find how to fix it. As far as I can tell, this is not a OSX-specific error. I use dbus to start the apps, ie:
And I do have "klauncher" in my "lib/kde4/libexec" dir ( that I have added to the $PATH env variable, just in case). Don't know if this helps, but my koffice build is not in a standard directory, but in a custom one (also added to $PATH). If someone knows where to look, I'd be very grateful. Here is a gdb backtrace (breaking on "KIO::buildErrorString"):
|
Administrator
|
Is the environment variable $KDEDIR set? If it isn't, set KDEDIR to where the main KDE installation is, and KDEDIRS to $KDEDIR:/path/to/koffice/install
Then use dbus-launch to run Krita.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thank you very much for your quick answer. I've tried different possibilities for KDEDIR(S) and launched kbuildsycoca4 afterwards, but no luck. I even changed my KDESYCOCA and KDEHOME...
Stupid question here: is kdebase required for koffice ? I only have compiled kdelibs, and koffice's cmake didn't complain.. PS: if anyone is interested in koffice on Mac, please contact me. I think I will release a binary once my build is stable |
KDE Developer
|
The 'runtime' part of kdebase is required at runtime, the workspace part is not.
Thomas Zander
KWord maintainer |
Registered Member
|
Hello,
Thank you for your help. I'll compile kdebase-runtime and see what happens. I'll post here as soon as I have a result. PS1: a while ago I posted a patch for kdelibs for Mac on the fink list (tho I didn't use fink to complie my build), but no one has reviewed it yet (it's for the file "kkeyserver_mac.cpp"). PS2: everything in kde is 100% llvm compliant I used llvm-gcc rather than gcc, for the challenge ^^ |
Registered Member
|
still the same error.. what else can I do ?
I've deleted my kde cache dir, and kbuildsycoca4 re-created it. Now I see the proper pictures in krita rather than just "[ ? ]" icons. So I think my paths are ok.. Maybe it's my dbus "session.conf" file ? Here is my script that starts krita
|
Administrator
|
Try this....
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thanks again for your help. I think this could be it... kdeinit4 outputs some errors, but once I can fix that I hope the message box won't show again.
Two things here: - kded4 and klauncher are inside bundles, which is a bit crazy but getBundle() apparently can find the executable anyways - I get a "No such file or directory" error, but the executables inside the brackets actually exist (.../MacOS/kded and klauncher) Maybe a little gdb will help. I'll keep on updating this post |
Administrator
|
INSTALL_DIR=/Library/koffice
Where do you have your main KDE installation? If that is not /Library/koffice you need to make a few changes.... $KDEDIR should be to the root of your main KDE installation $KDEDIRS should be as follows: $KDEDIR:/Library/koffice If $KDEDIR is /Library/koffice then $KDEDIRS needs only be set to $KDEDIR For $PATH, including libexec is not needed. KDE applications will locate and launch applications from here without problems if $KDEDIR is correctly set up.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Ok, thank you.
The CMAKE_INSTALL_PREFIX is "/Library/koffice" and the BUNDLE_INSTALL_DIR is "/Library/koffice/bin". I've tried to change the kdedir(s) to "bin" and to other things, but I always have the same error. I think I can find what the problem is by adding some printf to the code and with the help of gdb. I'll make some more tests... next year |
Registered Member
|
Ok I cannot resist, I'd really like to see koffice working on Mac. I have a few spare minutes, so here is what I have found so far.
- in kinit.cpp, the function launch() is trying to find a shared library. But on Mac, dynamic libs end with the extension ".dylib", not ".so" ! Therefor it cannot find the lib. - I've sym-linked the .dylibs to files of the same name but with a ".so" extension. Now kinit can find the lib, but it still has the same "not found" errors. - the line 499 "d.fork = fork();" fails and the "case" goes to "default" - running kdeinit4 with --nofork doesn't help - right now I'm recompiling kdelibs with a patch that makes it find libs with the "dylib" extension and I'll see what happens EDIT1: this may be linked to the fact the Mac OS 10.6 doesn't allow fork() without exec() for some reason... EDIT2: Confirmed ! This is indeed because Mac OS 10.6 doesn't allow fork() without exec(). I suspect this is not gonna be easy to fix this. I suppose I have to call execl() somewhere Final Edit: not much more I can do right now. As far as I can tell, start_klauncher() is called in the child process but then OSX makes it crash as soon as the process makes calls to the file manager. Final final edit: ok sorry for the flood. But the problem has already been reported here: https://bugs.kde.org/show_bug.cgi?id=209903 workaround here: http://trac.macports.org/attachment/tic ... rash.patch not yet tested, but if someone can review it, it would be great to officially add this patch to kdelibs |
Administrator
|
The issue of hardcoding of *.so is definitely a bug in KDEInit. Patches to fix that will more than likely be welcome.
I would recommend contacting the KDE Mac team, and working with them to have it submitted to KDE Trunk. Note that due to the critical nature of KDEInit ( many applications depend upon it simply to launch, which is what all the kdeinit_*.so libraries are for ) this will need to be reviewed on kde-core-devel.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Hi, and happy new year !
Ok no problem. I'll see if there is someone on the Mac team I can contact. I used the mentioned patch to fix the "fork" issue. Now kdeinit seems to work as intended. But I still can't get dbus to work.
The script is:
and dbus is indeed running in the background. Google says that this is something that could happen, but only if I am root (which I am not). That's where I'm stuck right now... something with dbus. I'll see if I can make a simple Qt-dbus program work |
Administrator
|
Check to see if dbus-launch is setting the variable $DBUS_SESSION_BUS_ADDRESS
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Yes
the output:
That's the path I set in the config file. I don't see any reference to DBUS_SESSION_BUS_ADDRESS in klauncher (only in kkernel_mac.cpp and process.cpp) |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan