[Interest] update on building Qt/Linux with clang?

René J.V. Bertin rjvbertin at gmail.com
Mon Nov 5 18:55:21 CET 2018


On Monday November 05 2018 16:50:10 Jean-Michaël Celerier wrote:

>it's just the release / dynamic configuration that crashes, and I don't
>know how to instruct Qt's configure to keep debug symbols for release
>builds of the tools in order to get a proper stacktrace.

I use these arguments to configure: -no-strip -no-separate-debug-info --force-debug-info

Or skip the last, and just run `qmake -config force_debug_info /path/to/qtcomponent/qtcomponent.pro` in the build directory for the component(s) you want to have debug info for (useful if you only want it in qtbase).
Clang apparently also wants -fno-limit-debug-info if you really want to have useful debug info (though I can't tell if it really makes a difference).

>> clang sometimes segfaults while compiling, the crash usually goes if I try
>> again. It seems to just randomly crash once for every ~10 thousand files
>> compiled for no reason. The fact the crashes are random and not stable
>> doesn't
>> really raise my confidence in clang code quality though, but it is easy to
>> work around. Just keep calling make until it makes it.

My build with clang just completed fine, of all components except qt3d, qtwebengine and qtwebview. I've not seen clang crash when compiling Qt code on Mac for a long time, but there it uses a fully native libc++ which may make a difference.

I'd expect your build machine is probably much more powerful than mine, but what if those random crashes are due to some sort of resource depletion or contention? That's really the only thing that makes some kind of sense... and I'm almost certain I've already seen MacPorts ports that are built in non-parallel fashion because clang crashes otherwise.

R.



More information about the Interest mailing list