[Debichem-devel] Bug#1011108: ftbfs: forces std=c++14

Steve Langasek steve.langasek at canonical.com
Tue May 17 02:11:01 BST 2022


Package: macromoleculebuilder
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch

Dear maintainers,

The macromoleculebuilder source package fails to build in Debian unstable:

[...]
/usr/bin/c++ -DBuildNtC -DLEPTON_BUILDING_STATIC_LIBRARY -DLepton_USAGE -DMMBlib_EXPORTS -DUSE_MMB_CONSTEXPR -DUSE_OPENMM -isystem /tmp/macromoleculebuilder-3.5+dfsg/include -isystem /usr/include/simbody-isystem /usr/include/openmm -isystem /usr/include/openmm/reference -isystem /include -isystem /tmp/macromoleculebuilder-3.5+dfsg/3rdparty/Lepton1.3/include -D BuildNtC -D USE_OPENMM -g -O2 -ffile-prefix-map=/tmp/macromoleculebuilder-3.5+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -O0 -fvisibility=hidden -O3 -DNDEBUG -fPIC -DMMB_BUILDING_SHARED_LIBRARY -std=c++14 -MD -MT CMakeFiles/MMBlib.dir/src/ConstraintContainer.cpp.o -MF CMakeFiles/MMBlib.dir/src/ConstraintContainer.cpp.o.d -o CMakeFiles/MMBlib.dir/src/ConstraintContainer.cpp.o -c /tmp/macromoleculebuilder-3.5+dfsg/src/ConstraintContainer.cpp
In file included from /usr/include/tao/pegtl.hpp:8,
                 from /usr/include/gemmi/cif.hpp:13,
                 from /usr/include/gemmi/mmread.hpp:9,
                 from /usr/include/molmodel/internal/Compound.h:48,
                 from /usr/include/SimTKmolmodel.h:53,
                 from /tmp/macromoleculebuilder-3.5+dfsg/include/UnitCellParameters.h:3,
                 from /tmp/macromoleculebuilder-3.5+dfsg/src/UnitCellParameters.cpp:4:
/usr/include/tao/pegtl/demangle.hpp:23:33: error: 'string_view' in namespace 'std' does not name a type
   23 |    [[nodiscard]] constexpr std::string_view demangle() noexcept;
[...]

This is because tao-pegtl-dev now requires C++17, but -std=c++14 is being
forced.

I've uploaded the attached patch in Ubuntu to work around this by forcing
c++17 instead of c++14.  You could also probably drop the forcing entirely,
since the default standard nowadays is gnu17 (C++17 with GNU extensions).

The package currently still fails to build from source because gemmi's
headers are also incompatible with the new tao-pegtl; but I'm hoping this
will be resolved when bug #1009415 is fixed.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru macromoleculebuilder-3.5+dfsg/debian/patches/CXX17.patch macromoleculebuilder-3.5+dfsg/debian/patches/CXX17.patch
--- macromoleculebuilder-3.5+dfsg/debian/patches/CXX17.patch	1969-12-31 16:00:00.000000000 -0800
+++ macromoleculebuilder-3.5+dfsg/debian/patches/CXX17.patch	2022-05-16 18:02:44.000000000 -0700
@@ -0,0 +1,21 @@
+Description: Use C++17 standard, not C++14.
+ The macromoleculebuilder tries to force C++14 in the compiler to ensure
+ access to newer language features.  However, C++14 is now too *old* for
+ some of the build-dependencies (tao-pegtl-dev) and causes a build failure.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Last-Update: 2022-05-16
+Forwarded: no
+
+Index: macromoleculebuilder-3.5+dfsg/CMakeLists.txt
+===================================================================
+--- macromoleculebuilder-3.5+dfsg.orig/CMakeLists.txt
++++ macromoleculebuilder-3.5+dfsg/CMakeLists.txt
+@@ -8,7 +8,7 @@
+ 
+ PROJECT(MMB LANGUAGES CXX)
+ 
+-SET(CMAKE_CXX_STANDARD 14)
++SET(CMAKE_CXX_STANDARD 17)
+ SET(CMAKE_CXX_EXTENSIONS OFF)
+ SET(CMAKE_CXX_STANDARD_REQUIRED ON)
+ 
diff -Nru macromoleculebuilder-3.5+dfsg/debian/patches/series macromoleculebuilder-3.5+dfsg/debian/patches/series
--- macromoleculebuilder-3.5+dfsg/debian/patches/series	2022-03-30 03:37:26.000000000 -0700
+++ macromoleculebuilder-3.5+dfsg/debian/patches/series	2022-05-16 18:01:18.000000000 -0700
@@ -1,2 +1,3 @@
 fix-Lepton-path.patch
 fix-Gemmi-compatibility.patch
+CXX17.patch


More information about the Debichem-devel mailing list