A follow-up from what I posted earlier. I think *mesa* still needs to be fixed, and I am inclined to prefer a release build (on the philosophical basis that a release ought to default to the options used in releases).
First, a reminder of what cmake apparently supports (on the basis that at least some of our cmake recipes build release versions) - From http://www.brianlheim.com/2018/04/09/cmake-cheat-sheet.html (that might be out of date, the links to cmake point to 3.11.something, but cmake is vague about what the various options actually do!) In that, there are the following list of build types and the flags they add: none (normally the default) : no flags Debug : -g Release : -O3 -DNDEBUG RelWithDebInfo : -O2 -g -DNDEBUG MinSizeRel : -Os -DNDEBUG Compared to meson, a much greater use of -DNDEBUG. I have no idea if CFLAGS, CXXFLAGS supplied in the environment override these options. But I think we ought to have something in Notes on Building Software about the cmake defaults, and I'm assuming that -DNDEBUG similarly disables runtime assertions which can slow the programs or libraries down if they ar present. Second, looking again at a few meson programs (mesa, libdrm, gdk-pixbuf, glib) : IFF -Dbuildtype is specified, it reports that as well as the default. For all these packages, using 0.50.0, the default is debugoptimized (i.e. -O2 -g with debug assertions enabled). Meanwhile, Bruce has reverted the book to meson-0.49. But - AFAICS, of those packages only mesa actually enables debug assertions (i.e. none of the others add -DNDEBUG when running a release buildtype. In passing, I will note that I am not impressed by the implication that our builders ought to run the tests for glib (in almost everything else we use words like "if you wish to run the tests"), also that it seems to write on the Xorg screen in some of the tests (and I'm not sure that running in Xorg is specified - ISTR people such as Bruce build glib before Xorg). Plus, I get an unexpected failure: # Start of tls-certificate tests Bail out! GLib-GIO-FATAL-WARNING: Can't find module 'gnutls-pkcs11' specified in GIO_USE_TLS --- stderr --- (/tmp/glib-2.60.0/build/gio/tests/tls-certificate:12592): GLib-GIO-WARNING **: 23:19:12.669: Can't find module 'gnutls-pkcs11' specified in GIO_USE_TLS ------- 163/261 glib:gio / tls-database FAIL 0.01 s (killed by signal 5 SIGTRAP) but since I don't normally run the tests I'm not at all interested in that failure ;-) One further thing: although I used a patched ninja and exported NINJAJOBS=4, the glib *tests* used all 8 cores for the main part. So, for meson packages: I think we ought to add the buildtype options in'Notes on Building Software', with a note that specifying CFLAGS and CXXFLAGS will override the default values. And for mesa we ought to use -Dbuildtype=release to avoid the problems reported by people loading game levels when the assertion is in place. One final point: my builds of libdrm skipped the nouveau test which is reported to time out (no idea why, I lack nouveau hardware but I've built the nouveau part of libdrm and also of mesa), but it takes a similar SBU to what is mentioned in the book, and almost all of that is from the 'random' test which follows the threaded test. But since mesa has now been reverted, I will need to revert it in my local build before I can proceed. Whether I can find the enthusiasm to do that remains to be seen. ĸen -- It is said that there are two great unsolved problems in computer science: naming, cache invalidation, and off-by-one errors. -- http://lists.linuxfromscratch.org/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
