DOC: Describe the CMake build and how to run the memory checks - #58
Conversation
3787bb9 to
9950879
Compare
9950879 to
7bec5ae
Compare
7bec5ae to
c65e051
Compare
|
Rebased onto current I checked every option and command the new sections name against this tree rather than taking the "every command was run against this tree" line on trust. One finding, pre-existing and not caused by this PR. The no-network recipe does not come out clean:
What changed in this update
Why no testCOSMETIC/DOC class. A README has no runtime seam. The substantive check for a documentation change is whether it is true, which is what is reported above. |
The build instructions in README.md were two lines about 'make all',
which builds a subset of the tree with a Makefile nothing else in the
project uses. They now describe the CMake build the CI and the install
rules actually use, and note that the Makefile is unmaintained and does
not cover nifti2 or cifti.
A new section records how to run the sanitizers and valgrind, including
three things that each cost an afternoon to work out:
* valgrind's memcheck needs --trace-children=yes here, because most of
the tests are shell scripts that exec the tools. Without it valgrind
inspects the shell, sees nothing and reports a clean run;
* ctest -T memcheck exits 0 even when valgrind reports defects, so the
logs have to be read;
* valgrind refuses to start without the C library's debug symbols, and
on distributions that ship a stripped ld.so with no debuginfo package
-- Arch and its derivatives -- it cannot be run at all, DEBUGINFOD_URLS
included, because those builds are not on any debuginfod server. A
container recipe is given.
Every command in the new sections was run against this tree.
c65e051 to
e67d6be
Compare
36976a2
into
InsightSoftwareConsortium:master
The build instructions in README.md were two lines about 'make all',
which builds a subset of the tree with a Makefile nothing else in the
project uses. They now describe the CMake build the CI and the install
rules actually use, and note that the Makefile is unmaintained and does
not cover nifti2 or cifti.
A new section records how to run the sanitizers and valgrind, including
three things that each cost an afternoon to work out:
the tests are shell scripts that exec the tools. Without it valgrind
inspects the shell, sees nothing and reports a clean run;
logs have to be read;
on distributions that ship a stripped ld.so with no debuginfo package
-- Arch and its derivatives -- it cannot be run at all, DEBUGINFOD_URLS
included, because those builds are not on any debuginfod server. A
container recipe is given.
Every command in the new sections was run against this tree.
Interface impact: none. On the union of all these changes, configured with
USE_FSL_CODE=ONandUSE_CIFTI_CODE=ON: all 448 exported symbols acrosslibniftiio,libnifti2,libznz,libfslio,libnifticdfandlibciftiare identical tomasterundernm -D --defined-only, and all ten installed headers are identical undergcc -E -P. Undergcc -dM -Eone macro definition differs, intentionally and only in text: #61 makesFSL_RADIOLOGICALread(-1)so it is safe inside an expression. Its value is still-1, checked by compiling against each installedfslio.hand printing it.Verification. This branch: builds with gcc 16.1.1,
ctestunchanged frommaster(2 of 345 fail onmasteritself in this environment; #31 and #29 each fix one). The union of all the PRs: 0 errors under both gcc 16.1.1 and clang 22.1.8,ctest345/345 under each, and the whole suite under valgrind memcheck with--trace-children=yesgives 484 traced processes with no invalid access, no uninitialised value and no leak in any nifti binary.Coordination. Every line of every branch was compared, whitespace-normalised, against the diffs of the open PRs (#11, #21, #22, #23, #24). Where one of those already changes a line, the line was left alone, and the few deliberate overlaps are named in the text above. What survives is 17 compiler warnings, all of them on those lines: 9
-Wsign-conversion(5 infslio.cfor #22, 2 innifti2_io.cand 2 innifti_tester001.cfor #24) and 8-Wcalloc-transposed-argsinnifti_findhdrnameandnifti_findimgname, which #11 rewrites. No formatting changes appear anywhere, to stay clear of #10 and #12.One of a set of independent, single-purpose PRs. Each bases on
masterand can be merged on its own, in any order.The full set of PRs (35)
The union of all of them is on the fork as
all-changes, if you want to build and test the lot at once.CI and build
Configuration and documentation
Defects
Warning and check classes