[Debian-med-packaging] Bug#1103318: pftools: FTBFS with the nocheck build profile

Nilesh Patra nilesh at debian.org
Sat Sep 27 21:14:27 BST 2025


Hi Santiago,

On 28/09/25 1:04 am, Santiago Vila wrote:
> tags 1103318 patch
> thanks
> 
> Hi. The attached patch might fix this issue, but in this case I'm not
> making any team upload because I still need a good explanation of why
> it works (I'm no cmake expert, sorry).
>

The actual error is:

| CMake Error at CMakeLists.txt:432 (ADD_SUBDIRECTORY):
|  ADD_SUBDIRECTORY given source
|  "/build/reproducible-path/pftools-3.2.12/testing/examples" which is not an
|  existing directory.

The output in the bug is not exactly helpful, please also consider to paste
the output above these lines for cmake configure related bugs you file in future:

|	cd obj-x86_64-linux-gnu && tail -v -n \+0 CMakeCache.txt
| ==> CMakeCache.txt <==

The problem is that it is trying to include examples subdir inside of "testing" dir.
This is non-existent directory and is actually created in the tests/CMakeLists.txt:

```
IF (NOT EXISTS "${TESTS_DIRECTORY}/examples")
        FILE(MAKE_DIRECTORY "${TESTS_DIRECTORY}/examples")
```

If I try to work-around it with this patch in CMakeLists.txt with:

```
-ADD_SUBDIRECTORY( "${TESTS_DIRECTORY}/examples" )
+ADD_SUBDIRECTORY( "${TESTS_DATA_DIR}/examples" )
```

in order to include "tests/examples" (not "testing"), it still gives a problem
because tests/CMakeLists.txt actually tries to install examples and it then fails
in dh_installexamples step. It is somehow then essential to include parts of
tests/CMakeLists.txt file.

This sounds not ideal, but on digging further, it appears that the tests are
just added in tests/examples/CMakeLists.txt which are nothing but command-lines
to run some tests instead of actual "code" unit-tests of the c/cpp code.
This is quite different from the usual cmake test suite where there is a whole
unittest (cpp) testsuite which uses gtest or another testsuite and runs tests on the code.

Hence, no testing code is actually "compiled" here. And hence the BUILD_TESTING option
does not affect tests as such. The tests are run via ctest, and that will not be run
when nocheck is set.

Hence, for this package I think it is OK to comment out BUILD_TESTING as you did in your
patch.

> If you can fill the gaps and make the upload, it would be great.

I hope the above reasoning fills the gaps. If not, just ask. I am also leaving the
task of uploading the package with your patch onto you (I need to go AFK).

> Cc to Andreas as the the Uploader in control field and Nilesh as
> the person who uploaded the package the last time.

Thanks for doing archive-wide rebuilds and also providing patches!

Best,
Nilesh



More information about the Debian-med-packaging mailing list