Package: src:trompeloeil-cpp
Version: 43-3
Severity: important
Tags: ftbfs patch

Dear maintainer:

During a rebuild of all packages in bookworm, your package failed to build:

--------------------------------------------------------------------------------
[...]
 debian/rules binary-arch
dh binary-arch
   dh_update_autotools_config -a
   dh_autoreconf -a
   debian/rules override_dh_auto_configure
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_auto_configure -- -DCMAKE_BUILD_TYPE=Debug
        cd obj-x86_64-linux-gnu && cmake -DCMAKE_INSTALL_PREFIX=/usr 
-DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var 
-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF 
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON 
-DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON "-GUnix 
Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu 
-DCMAKE_BUILD_TYPE=Debug ..
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test WARN_NONNULL
-- Performing Test WARN_NONNULL - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
    FETCHCONTENT_FULLY_DISCONNECTED


-- Build files have been written to: /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_build -a
        cd obj-x86_64-linux-gnu && make -j1 "INSTALL=install 
--strip-program=true" VERBOSE=1
make[1]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
/usr/bin/cmake -S/<<PKGBUILDDIR>> -B/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu 
--check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles 
/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[2]: Entering directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
/usr/bin/cmake -E cmake_progress_start 
/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/CMakeFiles 0
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
   debian/rules execute_after_dh_auto_build
make[1]: Entering directory '/<<PKGBUILDDIR>>'
cd obj-x86_64-linux-gnu && \
cmake --build ./ -t self_test thread_terror custom_recursive_mutex 
-j$((`nproc`-1))
The <jobs> value requires a positive integer argument.

Usage: cmake --build <dir>             [options] [-- [native-options]]
       cmake --build --preset <preset> [options] [-- [native-options]]
Options:
  <dir>          = Project binary directory to be built.
  --preset <preset>, --preset=<preset>
                 = Specify a build preset.
  --list-presets[=<type>]
                 = List available build presets.
  --parallel [<jobs>], -j [<jobs>]
                 = Build in parallel using the given number of jobs.
                   If <jobs> is omitted the native build tool's
                   default number is used.
                   The CMAKE_BUILD_PARALLEL_LEVEL environment variable
                   specifies a default parallel level when this option
                   is not given.
  -t <tgt>..., --target <tgt>...
                 = Build <tgt> instead of default targets.
  --config <cfg> = For multi-configuration tools, choose <cfg>.
  --clean-first  = Build target 'clean' first, then build.
                   (To clean only, use --target 'clean'.)
  --resolve-package-references={on|only|off}
                 = Restore/resolve package references during build.
  -v, --verbose  = Enable verbose output - if supported - including
                   the build commands to be executed.
  --             = Pass remaining options to the native tool.
make[1]: *** [debian/rules:16: execute_after_dh_auto_build] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:8: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit 
status 2
--------------------------------------------------------------------------------

This happens because the output of nproc may be 1, and 1 - 1 = 0.

(Note: If you ever need to do this, please honor DEB_BUILD_OPTIONS=parallel=n)

To reproduce, please try GRUB_CMDLINE_LINUX="nr_cpus=1" in /etc/default/grub.
If that still does not allow you to reproduce the problem, the offer below
still holds.

The attached patch might solve the problem in a simple and effective way
(by removing the -j option altogether). I've tested it in my desktop
computer (having 12 core threads), and also in a virtual machine
with a single CPU.

-----------------------------------------------------------------------------------

About the archive rebuild: The build was made using virtual machines
from Hetzner, with enough memory, enough disk, and either one or two
CPUs, using a reduced chroot with only build-essential packages (plus
debhelper).

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.

Thanks.
--- a/debian/rules
+++ b/debian/rules
@@ -14,7 +14,7 @@ override_dh_auto_configure:
 execute_after_dh_auto_build:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
        cd $(BUILD_DIR) && \
-       cmake --build ./ -t self_test thread_terror custom_recursive_mutex 
-j$$((`nproc`-1))
+       cmake --build ./ -t self_test thread_terror custom_recursive_mutex
 endif
 
 execute_after_dh_auto_test:

Reply via email to