GammaRay
GammaRay copied to clipboard
Is it possible to use GammaRay on FreeBSD OS?
I've recently started to use FreeBSD having been a long-term GNU/Linux user and I am trying to add it as a supported platform for a project I code for. I have tried to build both from 2.6 & 2.7 tarballs and most recently the master branch here.
Initially builds were aborting because of a linuxism at line 573 in the top level CMakeLists.txt
:
if(NOT WIN32 AND NOT QNXNTO AND NOT ANDROID)
set(DL_LIBRARY dl)
endif()
which was trying to include libld
but that is a Linux specific library and is not present in FreeBSD (the functionality is included within libc
) - by adding an extra test I managed to avoid the set(DL_LIBRARY dl)
being done on FreeBSD either. I was then able to compile to completion and appeared to get a working gammaray
:
Note that the ABI is recorded as: qt_5_7-amd64 {at the expected /usr/local/lib/gammaray/2.9/qt5_7-amd64/gammaray_probe.so
} - that probe is the only one that was built.
What is confusing me is that my project, built with the same (only) Qt Kit present on my system which is 5.7.1 and the compiler in both cases is the system provided clang++
compiler which reports a fixed ABI with Qt of x64-bsd-freebsd-elf-64bit
:
The trouble is, when I try to run my application it immediately aborts with a single:
No probe found for ABI qt5_7-x86_64
message - as far as I understand it x86_64
is a historic synonym for amd64
but I am not sure how this can be fixed/is fixable...
@SlySven Please create a PR for this change:
Initially builds were aborting because of a linuxism at line 573 in the top level CMakeLists.txt:
I'd like to do that but I am not sure of the recommended way for CMake to detect the Linux platform specifically - which is what the lines I am querying seems to be doing.
💡 Also I can get the probe to detect my project's use of the qt5_7-x86_64
ABI by making a symbolic link for a directory /usr/local/lib/gammaray/2.9/qt5_7-x86_64
to /usr/local/lib/gammaray/2.9/qt5_7-amd64
, it superficially seems to work but whether that is a good solution remains to be seen - and I will need to reboot to FreeBSD before I can return to investigating it further...
@SlySven You might need to add a new branch specifically for FreeBSD in cmake/GammaRayProbeABI.cmake -- i.e. some check like CMAKE_SYSTEM_PROCESSOR MATCHES "amd64"
. I can't work on that or test that myself unfortunately.
For the issue re. DL_LIBRARY
: I'm filing a fix.