[KDE/Mac] Trojita on OSX/CI

Jan Kundrát jkt at kde.org
Sun Dec 7 19:43:49 UTC 2014


On Sunday, 7 December 2014 19:20:49 CEST, Marko Käning wrote:
> $ 
> /opt/kde/install/darwin/mavericks/clang/kf5-qt5/extragear/pim/trojita/inst/bin/trojita 
> 
> dyld: Library not loaded: libtrojita_plugins.dylib
>   Referenced from: 
> /opt/kde/install/darwin/mavericks/clang/kf5-qt5/extragear/pim/trojita/inst/bin/trojita
>   Reason: image not found
> Trace/BPT trap: 5
> ---
>
> The lib is here:
> ---
> $ find /opt/kde/install/darwin/mavericks/clang/kf5-qt5/ -name 
> libtrojita_plugins.dylib
> /opt/kde/install/darwin/mavericks/clang/kf5-qt5/extragear/pim/trojita/inst/lib64/libtrojita_plugins.dylib

Hi Marko, first of all, let me tell you that I appreciate your effort.

So far so good, this looks like it's supposed to look, AFAIK. I don't know 
anything about Mac packaging, of course, but Trojita's cmake bits use 
CMAKE_INSTALL_LIBDIR to determine where to put Trojita's single shared 
library.

(It will then put the actual plugins below $CMAKE_INSTALL_LIBDIR/trojita/ , 
and at least on Linux and Windows, cmake appears to do the right thing with 
rpath handling, AFAIK.)

The 64 suffix comes from -DLIB_SUFFIX=64 which is defined in 
websites/build.kde.org's config/build/global.cfg , Trojita just uses what 
you throw at it.

> And indeed, the full path is missing for it in the executable:

When I install stuff here on Linux, this is what cmake says:

-- Installing: 
/tmp/trojita-pwn/usr/local/lib/trojita/trojita_plugin_QtKeychainPasswordPlugin.so
-- Removed runtime path from 
"/tmp/trojita-pwn/usr/local/lib/trojita/trojita_plugin_QtKeychainPasswordPlugin.so"
-- Installing: /tmp/trojita-pwn/usr/local/lib/libtrojita_plugins.so
-- Removed runtime path from 
"/tmp/trojita-pwn/usr/local/lib/libtrojita_plugins.so"
-- Installing: /tmp/trojita-pwn/usr/local/bin/trojita
-- Removed runtime path from "/tmp/trojita-pwn/usr/local/bin/trojita"
-- Installing: /tmp/trojita-pwn/usr/local/bin/be.contacts
-- Removed runtime path from "/tmp/trojita-pwn/usr/local/bin/be.contacts"

On Linux, when you `readelf -d trojita` *from within your build tree*, this 
is what I get:

 0x000000000000000f (RPATH)              Library rpath: 
[/usr/lib64/qt4:/home/jkt/work/prog/_trojita-build/cmake-qt4-clang:]
 0x000000000000001d (RUNPATH)            Library runpath: 
[/usr/lib64/qt4:/home/jkt/work/prog/_trojita-build/cmake-qt4-clang:]

This is, however, removed by cmake during `make install`. The way I 
understand it, you as a person doing the install are supposed that you 
install stuff into a place where the system linker can find that stuff. 
This is concistent to the way the rest of the KDE software works (I fixed a 
bug related to this just the other day in KIO), and AFAIK it is also 
cmake's default.

That said, I have no idea whether it is a good thing or a bad thing on OS 
X. If it's a bad thing, though, a fix should probably not live in Trojita.

-> Can you lanuch some other app built through your CI insatnce which uses 
its own shared libraries?

Cheers,
Jan

-- 
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/


More information about the kde-mac mailing list