Skip to contentSkip to conversation

gnome-text-editor: Fix build on clang

PATCH Khem Raj 1 participant 2 messages Mar 31, 2022 – Apr 1, 2022 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Khem Raj

author
#1 lore raw
Quoted 16 lines · Andreas Müller
---
 ...ot-set-c_std-gnu17-as-default-it-bre.patch | 35 +++++++++++++++++++
 .../gnome-text-editor_42.0.bb                 |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor/0001-meson.build-Do-not-set-c_std-gnu17-as-default-it-bre.patch
meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor/0001-meson.build-Do-not-set-c_std-gnu17-as-default-it-bre.patch new file +2 -0
new file mode 100644
index 000000000..c81b96bbd
@@ -0,0 +1,35 @@
+From f5ee0f9024e1dc8293f17864e1c774c286a3ecfa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <[email protected]>

meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor/0001-meson.build-Do-not-set-c_std-gnu17-as-default-it-bre.patch line 12

Quoted 10 lines
meta-gnome/recipes-gnome/gnome-text-editor/gnome-text-editor/0001-meson.build-Do-not-set-c_std-gnu17-as-default-it-bre.patch new file +10 -0
+Date: Thu, 31 Mar 2022 21:10:00 +0200
+Subject: [PATCH] meson.build: Do not set c_std=gnu17 as default - it breaks
+ clang builds
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Clang does not seem to support gnu17:
+| ERROR: Value "gnu17" (of type "string") for combo option "C language standard to use" is not one of the choices. Possible choices are (as string): "none", "c89", "c99", "c11", "gnu89", "gnu99", "gnu11"
+

This is not an issue in clang it supports gnu17 for -std and its also not an issue with gnome-text-editor itself. The problem is in meson, which I have
proposed a fix for upstream [1], I will also submit a patch to oe-core to patch our meson recipe and then this patch won't be needed.

[1] https://github.com/mesonbuild/meson/pull/10218

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#3 lore raw

Re: [oe] [PATCH 2/2] gnome-commander: Force gcc(-runtime)

This is due to a regression introduced in glib-2.0 via
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2114
see
https://gitlab.gnome.org/GNOME/glib/-/issues/2625

for details. So I guess until the above issue is resolved we can disable clang for it.

Quoted 34 lines · Andreas Müller

clang/llvm cause multiple issues and it is not upon us to fix them

---
 .../recipes-gnome/gnome-commander/gnome-commander_1.14.2.bb   | 4 ++++
 1 file changed, 4 insertions(+)
meta-gnome/recipes-gnome/gnome-commander/gnome-commander_1.14.2.bb +4 -1
index c67242299..f0f47fd53 100644
@@ -18,5 +18,9 @@ PACKAGECONFIG[taglib] = "--with-taglib,--without-taglib,taglib"
 PACKAGECONFIG[libgsf] = "--with-libgsf,--without-libgsf,libgsf"
 PACKAGECONFIG[poppler] = "--with-poppler,--without-poppler,poppler"
 
+# gnome commander has several issues with clang/llvm
+TOOLCHAIN = "gcc"
+RUNTIME = "gnu"
+
 FILES:${PN} += "${datadir}/metainfo"
 FILES:${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV}"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#96307): https://lists.openembedded.org/g/openembedded-devel/message/96307
Mute This Topic: https://lists.openembedded.org/mt/90163236/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-