Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to load additional probes #669

Open
ergodaveh opened this issue Jan 7, 2022 · 1 comment
Open

Fails to load additional probes #669

ergodaveh opened this issue Jan 7, 2022 · 1 comment

Comments

@ergodaveh
Copy link

ergodaveh commented Jan 7, 2022

Using the latest release 2.11.3
Windows 10
Visual Studio 2019 CMake
After "Build All succeeded."

Ran the Qt5 target application
Ran the GammaRay - Launcher
Attempted to attach to the application process
GammaRay: Failed to load: C:\Users\xxxx\Documents\GammaRay\gammaray-2.11.3\out\build\x64-Debug\plugins\gammaray\2.11\qt5_12-MSVC-140-x86_64d\gammaray_probed.dll

This above mention probe works with QML project build with the corresponding version. However, How do we build probes for the later Qt version? Such as 5.15 and beyond.

I have noticed the install.txt guidance for same and attempted by adding -
set(DGAMMARAY_BUILD_UI=false)
set(DGAMMARAY_MULTI_BUILD=true)
set(DCMAKE_PREFIX_PATH=//C/Qt/5.15.2/)
without success.

any suggestions are appreciated.

@ergodaveh ergodaveh changed the title Fails to load probe Fails to load additional probes Jan 10, 2022
@ferdnyc
Copy link
Contributor

ferdnyc commented Jun 8, 2023

I have noticed the install.txt guidance for same and attempted by adding -
set(DGAMMARAY_BUILD_UI=false)
set(DGAMMARAY_MULTI_BUILD=true)
set(DCMAKE_PREFIX_PATH=//C/Qt/5.15.2/)

If you're using the same build directory, that won't work as Qt will have already been probed as the default 5.12 version.

I don't know exactly how GAMMARAY_MULTI_BUILD is supposed to work. In Fedora we build multiple probes for Linux using separate build directories:

  1. First we do a GAMMARAY_CLIENT_ONLY_BUILD=TRUE build in, say, build_client. Use whatever Qt version you want the client to use, for this version. (If you're using the repo code, you'll need my unmerged patches from Fix GAMMARAY_CLIENT_ONLY_BUILD #765 to successfully complete a client-only build. I'm not sure if it works in the 2.11.3 release code or not.)

  2. Then, in say build_probe5_12, do a GAMMARAY_PROBE_ONLY_BUILD=TRUE build against that same Qt version. It's probably not necessary to separate these two steps, but it's how we do it.

  3. After that, do any additional GAMMARAY_PROBE_ONLY_BUILD=TRUEs to separate build directories, e.g. build_probe5_15 if building against Qt 5.15.2, etc. Lather, rinse, repeat. Each probe build gets configured against the Qt version it's meant to probe for, which is why the build dirs have to be separate. Qt really doesn't like configuring multiple versions at once, which is why I'm doubtful that GAMMARAY_MULTI_BUILD could ever really work properly.

But, build everything separately and install it all to the same place, and hopefully things Just Work™. I definitely have a GammaRay I built locally (haven't submitted all of the patches to push it into our packaging system yet) based on the current development code here, which I built against our system Qt 6.5.1. It has probes for both Qt 6.5 and Qt 5.15, and can attach to or launch applications compiled with either version. I really wasn't sure that would work, but it seems to!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants