#11872 closed enhancement (fixed)
Document some more details about building, particularly with cmake and meson.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 9.0 |
Component: | BOOK | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
With traditional packages, we have assumed that by the time people come to BLFS they know something about CFLAGS and CXXFLAGS.
With cmake and ninja things are slightly different. The effect of the cmake build variants is not widely documented, and until now we have just used the default on meson, which currently is 'debugrelease' and leaves runtime assertions (if any - they do not seem to be common) enabled : that is what triggered this, mesa can be very very slow when loading levels for games if the assertions are built.
In some of our cmake recipes we do specify Release builds, but not for all of them and I think we need to understand the practical effects, and also whether forcing CFLAGS and CXXFLAGS can override these defaults (I have so far established that it does in meson).
Removing the assertions might affect testsuites.
Keeping the default flags of '-O2 -g' may not be very helpful if trying to debug a program where the compiler has optimized away or inlined or reordered certain parts of the program.
Also, in the old days 'make' almost always showed what commands it was running. These days, many CMMI programs just report 'CC something, LD something' and ninja by default only shows the target number and the total, and what the target is. Telling people how to see the commands will help when things go wrong.
Change History (9)
comment:1 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
Bruce posted to the list some (edited) output from 'meson configure' (the output is badly formatted) which shows the default values for mesa-19.0.0.
Mention that command for people who need to see what the defaults are.
comment:4 by , 6 years ago
We've updated BLFS adding a section
Working with different build systems
Can we close this ticket?
comment:5 by , 6 years ago
I'm not convinced it is ready. You wanted to alter (undisclosed) items, and Brendan L's comment today looks like a better approach for meson.
I committed my initial version to make it open season for editing it.
Will look at addressing Brendan's suggestions in a day or two.
And I'm not entirely sure Pierre will be happy - I get the impression he might prefer to build meson packages with '-O2 -g' and -DNDEBUG', although I do not understand why.
follow-up: 7 comment:6 by , 6 years ago
comment:7 by , 6 years ago
Replying to bdubbs:
Ken, See r21417.
http://lists.linuxfromscratch.org/pipermail/blfs-book/2019-March/080278.html
Thanks. I somehow missed that. Looks good, but Brendan's suggestion to look at the txt file seems better than what I had, will get to that eventually.
comment:8 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed at r21420, Errors and Omissions Excepted.
At least for mesa (but I guess for any package using NDEBUG), passing -Db_ndebug=true to meson allows to remove assertions, even if using "debug" or "debugoptimized" buildtype. And if using buildtype=release, passing -Db_ndebug=false allows to add assertions...