<div dir="ltr"><div dir="auto"><div>Hi Mark!<br><br><div class="gmail_quote"><div dir="ltr">Il mer 9 mag 2018, 15:56 Mark Asselstine <<a href="mailto:mark.asselstine@windriver.com" target="_blank">mark.asselstine@windriver.com</a><wbr>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wednesday, May 9, 2018 8:16:08 AM EDT Andrea Galbusera wrote:<br>
> When gcrypt support is present in PACKAGECONFIG, build fails due to the bug<br>
> reported in [1]. Since this is already solved upstream, this commit<br>
> backports the corresponding patch.<br>
> <br>
> [1] <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=893602" rel="noreferrer noreferrer" target="_blank">https://bugs.debian.org/cgi-<wbr>bin/bugreport.cgi?bug=893602</a><br>
> <br>
> Signed-off-by: Andrea Galbusera <<a href="mailto:gizero@gmail.com" rel="noreferrer" target="_blank">gizero@gmail.com</a>><br>
<br>
Thanks Andrea, I can confirm this fixes a build failure we were seeing as <br>
well.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Thanks for further testing the patch so quickly!</div><div dir="auto"><br></div><div dir="auto">Out of curiosity... Are you also enabling gcrypt support to workaround the implict dependency resolved used to have upon gcrypt in the past? It took me a few hours to figure out what was specific in my configuration, since this bug was obviously not exposed in configurations currently built by the autobuilders!</div><div dir="auto"><br></div><div>As a side note, I know there is a newer released version of systemd (238), but upgrading such a complex recipe was not an option for me in the short. I'm CC-ing the recipe's maintainer here, in case there's already an effort to upgrade to 238... </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Mark<br>
<br>
> ---<br>
> ...rename-noreturn-into-_<wbr>noreturn_-8456.patch | 203 ++++++++++++++++++<br>
> meta/recipes-core/systemd/<a href="http://systemd_237.bb" rel="noreferrer noreferrer" target="_blank">syst<wbr>emd_237.bb</a> | 1 +<br>
> 2 files changed, 204 insertions(+)<br>
> create mode 100644<br>
> meta/recipes-core/systemd/<wbr>systemd/0033-basic-macros-<wbr>rename-noreturn-into-_n<br>
> oreturn_-8456.patch<br>
> <br>
> diff --git<br>
> a/meta/recipes-core/systemd/<wbr>systemd/0033-basic-macros-<wbr>rename-noreturn-into-<br>
> _noreturn_-8456.patch<br>
> b/meta/recipes-core/systemd/<wbr>systemd/0033-basic-macros-<wbr>rename-noreturn-into-<br>
> _noreturn_-8456.patch new file mode 100644<br>
> index 0000000000..59647b22f8<br>
> --- /dev/null<br>
> +++<br>
> b/meta/recipes-core/systemd/<wbr>systemd/0033-basic-macros-<wbr>rename-noreturn-into-<br>
> _noreturn_-8456.patch @@ -0,0 +1,203 @@<br>
> +From 848e863acc51ecfb0f3955c4988745<wbr>88201d9130 Mon Sep 17 00:00:00 2001<br>
> +From: Franck Bui <<a href="mailto:fbui@suse.com" rel="noreferrer" target="_blank">fbui@suse.com</a>><br>
> +Date: Thu, 15 Mar 2018 06:23:46 +0100<br>
> +Subject: [PATCH] basic/macros: rename noreturn into _noreturn_ (#8456)<br>
> +MIME-Version: 1.0<br>
> +Content-Type: text/plain; charset=UTF-8<br>
> +Content-Transfer-Encoding: 8bit<br>
> +<br>
> +"noreturn" is reserved and can be used in other header files we include:<br>
> +<br>
> + [ 16s] In file included from /usr/include/gcrypt.h:30:0,<br>
> + [ 16s] from ../src/journal/journal-file.h:<wbr>26,<br>
> + [ 16s] from ../src/journal/journal-vacuum.<wbr>c:31:<br>
> + [ 16s] /usr/include/gpg-error.h:1544:<wbr>46: error: expected ‘,’ or ‘;’<br>
> before ‘)’ token + [ 16s] void gpgrt_log_bug (const char *fmt, ...) <br>
> GPGRT_ATTR_NR_PRINTF(1,2); +<br>
> +Here we include grcrypt.h (which in turns include gpg-error.h) *after* we<br>
> +"noreturn" was defined in macro.h.<br>
> +---<br>
> + src/basic/log.c | 4 ++--<br>
> + src/basic/log.h | 4 ++--<br>
> + src/basic/macro.h | 19 +++++++++----------<br>
> + src/basic/process-util.c | 2 +-<br>
> + src/basic/process-util.h | 2 +-<br>
> + src/core/main.c | 4 ++--<br>
> + src/journal/test-journal-<wbr>interleaving.c | 2 +-<br>
> + src/shared/pager.c | 2 +-<br>
> + src/udev/collect/collect.c | 2 +-<br>
> + 9 files changed, 20 insertions(+), 21 deletions(-)<br>
> +<br>
> +Upstream-Status: Backport [<a href="https://github.com/systemd/systemd/pull/8456" rel="noreferrer noreferrer" target="_blank">https://github.com/systemd/<wbr>systemd/pull/8456</a>]<br>
> +<br>
> +diff --git a/src/basic/log.c b/src/basic/log.c<br>
> +index 7a7f2cbec..16a2431c5 100644<br>
> +--- a/src/basic/log.c<br>
> ++++ b/src/basic/log.c<br>
> +@@ -814,7 +814,7 @@ static void log_assert(<br>
> + log_dispatch_internal(level, 0, file, line, func, NULL, NULL,<br>
> NULL, NULL, buffer); + }<br>
> +<br>
> +-noreturn void log_assert_failed_realm(<br>
> ++_noreturn_ void log_assert_failed_realm(<br>
> + LogRealm realm,<br>
> + const char *text,<br>
> + const char *file,<br>
> +@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm(<br>
> + abort();<br>
> + }<br>
> +<br>
> +-noreturn void log_assert_failed_unreachable_<wbr>realm(<br>
> ++_noreturn_ void log_assert_failed_unreachable_<wbr>realm(<br>
> + LogRealm realm,<br>
> + const char *text,<br>
> + const char *file,<br>
> +diff --git a/src/basic/log.h b/src/basic/log.h<br>
> +index efcf0f1bf..314be128a 100644<br>
> +--- a/src/basic/log.h<br>
> ++++ b/src/basic/log.h<br>
> +@@ -186,7 +186,7 @@ int log_dump_internal(<br>
> + char *buffer);<br>
> +<br>
> + /* Logging for various assertions */<br>
> +-noreturn void log_assert_failed_realm(<br>
> ++_noreturn_ void log_assert_failed_realm(<br>
> + LogRealm realm,<br>
> + const char *text,<br>
> + const char *file,<br>
> +@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm(<br>
> + #define log_assert_failed(text, ...) \<br>
> + log_assert_failed_realm(LOG_<wbr>REALM, (text), __VA_ARGS__)<br>
> +<br>
> +-noreturn void log_assert_failed_unreachable_<wbr>realm(<br>
> ++_noreturn_ void log_assert_failed_unreachable_<wbr>realm(<br>
> + LogRealm realm,<br>
> + const char *text,<br>
> + const char *file,<br>
> +diff --git a/src/basic/macro.h b/src/basic/macro.h<br>
> +index 95be63a20..8911edfc4 100644<br>
> +--- a/src/basic/macro.h<br>
> ++++ b/src/basic/macro.h<br>
> +@@ -53,6 +53,15 @@<br>
> + #else<br>
> + #define _fallthrough_<br>
> + #endif<br>
> ++/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc<br>
> ++ * compiler versions */<br>
> ++#ifndef _noreturn_<br>
> ++#if __STDC_VERSION__ >= 201112L<br>
> ++#define _noreturn_ _Noreturn<br>
> ++#else<br>
> ++#define _noreturn_ __attribute__((noreturn))<br>
> ++#endif<br>
> ++#endif<br>
> +<br>
> + /* Temporarily disable some warnings */<br>
> + #define DISABLE_WARNING_DECLARATION_<wbr>AFTER_STATEMENT \<br>
> +@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long<br>
> u) { + #endif<br>
> + #endif<br>
> +<br>
> +-/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc<br>
> +- * compiler versions */<br>
> +-#ifndef noreturn<br>
> +-#if __STDC_VERSION__ >= 201112L<br>
> +-#define noreturn _Noreturn<br>
> +-#else<br>
> +-#define noreturn __attribute__((noreturn))<br>
> +-#endif<br>
> +-#endif<br>
> +-<br>
> + #define DEFINE_TRIVIAL_CLEANUP_FUNC(<wbr>type, func) \<br>
> + static inline void func##p(type *p) { \<br>
> + if (*p) \<br>
> +diff --git a/src/basic/process-util.c b/src/basic/process-util.c<br>
> +index aa9846db5..e6120af5b 100644<br>
> +--- a/src/basic/process-util.c<br>
> ++++ b/src/basic/process-util.c<br>
> +@@ -987,7 +987,7 @@ bool is_main_thread(void) {<br>
> + return cached > 0;<br>
> + }<br>
> +<br>
> +-noreturn void freeze(void) {<br>
> ++_noreturn_ void freeze(void) {<br>
> +<br>
> + log_close();<br>
> +<br>
> +diff --git a/src/basic/process-util.h b/src/basic/process-util.h<br>
> +index 93029e36e..5170adec7 100644<br>
> +--- a/src/basic/process-util.h<br>
> ++++ b/src/basic/process-util.h<br>
> +@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid);<br>
> +<br>
> + bool is_main_thread(void);<br>
> +<br>
> +-noreturn void freeze(void);<br>
> ++_noreturn_ void freeze(void);<br>
> +<br>
> + bool oom_score_adjust_is_valid(int oa);<br>
> +<br>
> +diff --git a/src/core/main.c b/src/core/main.c<br>
> +index 076846a41..4b2d14923 100644<br>
> +--- a/src/core/main.c<br>
> ++++ b/src/core/main.c<br>
> +@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX;<br>
> + static sd_id128_t arg_machine_id = {};<br>
> + static EmergencyAction arg_cad_burst_action =<br>
> EMERGENCY_ACTION_REBOOT_FORCE; +<br>
> +-noreturn static void freeze_or_reboot(void) {<br>
> ++_noreturn_ static void freeze_or_reboot(void) {<br>
> +<br>
> + if (arg_crash_reboot) {<br>
> + log_notice("Rebooting in 10s...");<br>
> +@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) {<br>
> + freeze();<br>
> + }<br>
> +<br>
> +-noreturn static void crash(int sig) {<br>
> ++_noreturn_ static void crash(int sig) {<br>
> + struct sigaction sa;<br>
> + pid_t pid;<br>
> +<br>
> +diff --git a/src/journal/test-journal-<wbr>interleaving.c<br>
> b/src/journal/test-journal-<wbr>interleaving.c +index 5a88b2774..d87bdbdd3<br>
> 100644<br>
> +--- a/src/journal/test-journal-<wbr>interleaving.c<br>
> ++++ b/src/journal/test-journal-<wbr>interleaving.c<br>
> +@@ -37,7 +37,7 @@<br>
> +<br>
> + static bool arg_keep = false;<br>
> +<br>
> +-noreturn static void log_assert_errno(const char *text, int error, const<br>
> char *file, int line, const char *func) { ++_noreturn_ static void<br>
> log_assert_errno(const char *text, int error, const char *file, int line,<br>
> const char *func) { + log_internal(LOG_CRIT, error, file, line,<br>
> func,<br>
> + "'%s' failed at %s:%u (%s): %m", text, file, line,<br>
> func); + abort();<br>
> +diff --git a/src/shared/pager.c b/src/shared/pager.c<br>
> +index 75db3c985..681af9c40 100644<br>
> +--- a/src/shared/pager.c<br>
> ++++ b/src/shared/pager.c<br>
> +@@ -47,7 +47,7 @@ static int stored_stderr = -1;<br>
> + static bool stdout_redirected = false;<br>
> + static bool stderr_redirected = false;<br>
> +<br>
> +-noreturn static void pager_fallback(void) {<br>
> ++_noreturn_ static void pager_fallback(void) {<br>
> + int r;<br>
> +<br>
> + r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0);<br>
> +diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c<br>
> +index 2821640e9..c8fa47b3d 100644<br>
> +--- a/src/udev/collect/collect.c<br>
> ++++ b/src/udev/collect/collect.c<br>
> +@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct<br>
> udev_list_node *node) + return container_of(node, struct _mate,<br>
> node);<br>
> + }<br>
> +<br>
> +-noreturn static void sig_alrm(int signo)<br>
> ++_noreturn_ static void sig_alrm(int signo)<br>
> + {<br>
> + exit(4);<br>
> + }<br>
> +--<br>
> +2.17.0<br>
> +<br>
> diff --git a/meta/recipes-core/systemd/<a href="http://systemd_237.bb" rel="noreferrer noreferrer" target="_blank">sy<wbr>stemd_237.bb</a><br>
> b/meta/recipes-core/systemd/<a href="http://systemd_237.bb" rel="noreferrer noreferrer" target="_blank">sy<wbr>stemd_237.bb</a> index 1d04796f39..6f59e6064e<br>
> 100644<br>
> --- a/meta/recipes-core/systemd/<a href="http://systemd_237.bb" rel="noreferrer noreferrer" target="_blank">sy<wbr>stemd_237.bb</a><br>
> +++ b/meta/recipes-core/systemd/<a href="http://systemd_237.bb" rel="noreferrer noreferrer" target="_blank">sy<wbr>stemd_237.bb</a><br>
> @@ -50,6 +50,7 @@ SRC_URI += "file://touchscreen.rules \<br>
> <br>
> file://0030-fix-missing-of-__<wbr>register_atfork-for-non-glibc-<wbr>build.patch \<br>
> file://0031-fix-missing-ULONG_<wbr>LONG_MAX-definition-in-case-<wbr>of-mus.patch \<br>
> file://0032-memfd.patch \<br>
> + <br>
> file://0033-basic-macros-<wbr>rename-noreturn-into-_<wbr>noreturn_-8456.patch \ "<br>
> SRC_URI_append_qemuall = "<br>
> file://0001-core-device.c-<wbr>Change-the-default-device-<wbr>timeout-to-2.patch"<br>
<br>
<br>
<br>
<br>
</blockquote></div></div></div></div>