The error is in an include file shipped with poppler, but poppler itself
doesn't FTBFS...

Looking more closely, I see poppler is built with -std=c++20, and
according to [1] the ends_with/starts_with are defined in c++20. But dia
is built with -std=gnu17 (defined in [2]).

That change in [2] was done via commit [3]:
From 7093a1ad332c8efd91c81d6030ced5a86ab69309 Mon Sep 17 00:00:00 2001
From: Zander Brown <zbr...@gnome.org>
Date: Tue, 8 Aug 2023 05:29:53 +0100
Subject: [PATCH] build: set c++ standard

Close: https://gitlab.gnome.org/GNOME/dia/-/merge_requests/96
---
 meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index cd988500c..0d3e4d282 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,12 @@ project('dia',
         ['c', 'cpp'],
         version: '0.97.3',  # This is the base version, git suffix gets added 
using vcs_tag().
         meson_version: '>= 0.58',
-        default_options: ['warning_level=1']
+        default_options: [
+                             'warning_level=1',
+                             'buildtype=debugoptimized',
+                             'c_std=gnu17',
+                             'cpp_std=gnu++17',
+                         ],
 )
 
 cc = meson.get_compiler('c')
-- 
GitLab

The last successful build of dia was at [4], on 2024-04-08, and it was
already using -std=gnu17[5], and I don't even see warnings in the logs.
In fact, the c++ invocation is identical.


1. https://en.cppreference.com/w/cpp/string/basic_string/starts_with
2. https://gitlab.gnome.org/GNOME/dia/-/blob/master/meson.build#L8
3. 
https://gitlab.gnome.org/GNOME/dia/-/commit/7093a1ad332c8efd91c81d6030ced5a86ab69309
4. https://launchpad.net/ubuntu/+source/dia/0.98+git20240130-1build4
5. 
https://launchpadlibrarian.net/723728520/buildlog_ubuntu-noble-amd64.dia_0.98+git20240130-1build4_BUILDING.txt.gz

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2070284

Title:
  FTBFS: ‘starts_with’ has not been declared in ‘std::string’

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dia/+bug/2070284/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to