[Gammaray-interest] Fwd: building GammaRay on OS X
Volker Krause
volker.krause at kdab.com
Thu May 28 09:34:18 CEST 2015
On Wednesday 27 May 2015 19:00:31 René J.V. Bertin wrote:
> I have some questions about building GammaRay on OS X (through a MacPorts
> port I'm creating), and using it.
>
> 1). Building on a case-sensitive file system left me with an app bundle that
> has
>
> GammaRay.app/Contents/MacOS/GammaRay
> GammaRay.app/Contents/MacOS/gammaray
>
> which evidently will lead to undefined results when you copy the bundle to a
> case-insensitive fs. Same, I guess, when building on such a fs though IIRC
> GammaRay is linked after gammaray and thus overwrites the previous
> executable. Has anyone noticed this? I'm guessing gammaray is the
> commandline executable that's not really intended to be used on OS X?
Yep, I would guess the CLI (lower-case) binary could just be dropped from the
bundle.
> 2). I tried pointing the build process to the qmake in my Qt 4 build tree
> (full patch to qt-everywhere*/bin/qmake). That worked, but qmake apparently
> still served the private header directory under the install prefix, and as
> a result the harfbuzz includes weren't found and I still end up without
> QPainter support. I think this may be related to the fact that I configured
> Qt to install the private headers; is that possible, and is that a
> supported configuration?
The only Qt4 configuration I know that gives you the QPainter analyzer is
having a full in-place build with install prefix == build dir == source dir.
Dirty, and usually hard to achieve with any form of packaging. With Qt5 this
got a lot easier though.
> 3) I've seen GammaRay trying to launch gdb. Even though it's not impossible
> to get gdb to function partially on OS X (not for C++, apparently) it's not
> a supported configuration. Is it possible to use lldb instead?
It does have lldb support as well. I don't know how it selects the right one
when both are found, I think we lack an explicit setting for that.
> 4) Is it possible to build a version that supports both Qt4 and Qt5? When I
> copy the qt4 plugin directory into the app bundle built for Qt5 it is
> recognised, but attempts to use it (launch a Qt4 application) fail on the
> aforementioned gdb issue.
Theoretically yes, but not without some manual work I think. The client can
connect to Qt4 and Qt5 targets (and also to remote targets on any other
platform), so you only need one version of that (Qt5 recommended, for getting
the QQ2 tools).
For the probe side you need one per ABI (on Mac, that's primarily the Qt
version), the install location and library names all contain the ABI
identifier for co-installation. There is no single build option to build all
possible configurations in one go yet though (there is the multi-build branch
with some experiments in that directions for MSVC). There are build options to
build only the probe, with the same install prefix you usually would end up
with something that should work with Qt4 and Qt5, but I have never tested that
in combination with the bundle on Mac.
The launcher (UI or CLI) can show you which versions it found, and it should
automatically pick the right one for a given target process.
Using GDB (or LLDB) for injecting on startup is needed prior to Qt 5.4, with
5.4 we can use the much superior (faster and more complete coverage) preload
injector.
regards,
Volker
--
Volker Krause | volker.krause at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5904 bytes
Desc: not available
URL: <http://mail.kdab.com/pipermail/gammaray-interest/attachments/20150528/69441b68/attachment.p7s>
More information about the Gammaray-interest
mailing list