From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/cairo: fix pthread detection
Date: Mon, 11 Sep 2023 23:08:21 +0200 [thread overview]
Message-ID: <20230911230821.12471642@windsurf> (raw)
In-Reply-To: <20230223153236.914358-1-fontaine.fabrice@gmail.com>
On Thu, 23 Feb 2023 16:32:36 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> pthreads detection fails if a warning is emitted resulting in the
> following build failure with some toolchains:
>
> onfigure:34189: checking for cairo's pthread feature
> configure:34300: /home/buildroot/autobuild/instance-1/output-1/host/bin/xtensa-buildroot-linux-uclibc-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O0 -g2 -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lrt -latomic -lexecinfo -lm -lpthread >&5
> /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: warning: /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/crtend.o: missing .note.GNU-stack section implies executable stack
> /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> configure:34300: $? = 0
> configure:34419: /home/buildroot/autobuild/instance-1/output-1/host/bin/xtensa-buildroot-linux-uclibc-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O0 -g2 -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lrt -latomic -lexecinfo -lm >&5
> /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: warning: /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/crtend.o: missing .note.GNU-stack section implies executable stack
> /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> configure:34419: $? = 0
> configure:34500: /home/buildroot/autobuild/instance-1/output-1/host/bin/xtensa-buildroot-linux-uclibc-gcc -o conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mlongcalls -mauto-litpools -O0 -g2 -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c -lrt -latomic -lexecinfo -lm >&5
> /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: warning: /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/crtend.o: missing .note.GNU-stack section implies executable stack
> /home/buildroot/autobuild/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/11.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> configure:34500: $? = 0
> configure:34555: checking whether cairo's pthread feature could be enabled
> configure:34557: result: no (can't link with -lpthread or -pthread)
>
> [...]
>
> In file included from cairo-mutex-type-private.h:45,
> from cairo-scaled-font-private.h:45,
> from cairoint.h:434,
> from cairo-analysis-surface.c:37:
> cairo-mutex-impl-private.h:262:3: error: #error "XXX: No mutex implementation found. Cairo will not work with multiple threads. Define CAIRO_NO_MUTEX to 1 to acknowledge and accept this limitation and compile cairo without thread-safety support."
> 262 | # error "XXX: No mutex implementation found. Cairo will not work with multiple threads. Define CAIRO_NO_MUTEX to 1 to acknowledge and accept this limitation and compile cairo without thread-safety support."
> | ^~~~~
>
> To avoid this build failure, add a patch that overrides this broken
> mechanism
>
> Fixes:
> - http://autobuild.buildroot.org/results/5420beaf94855e47eeb08627e8e3c169dc00419a
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...e.ac.pthread-respect-enable-pthreads.patch | 59 +++++++++++++++++++
> package/cairo/cairo.mk | 13 ++--
> 2 files changed, 68 insertions(+), 4 deletions(-)
> create mode 100644 package/cairo/0005-build-configure.ac.pthread-respect-enable-pthreads.patch
This has been fixed directly in gcc by:
https://gitlab.com/buildroot.org/buildroot/-/commit/ab4f3fafaa839593b3efd9ea12c8ee5d9340cdeb
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-09-11 21:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-23 15:32 [Buildroot] [PATCH 1/1] package/cairo: fix pthread detection Fabrice Fontaine
2023-02-23 22:47 ` Fabrice Fontaine
2023-02-23 23:00 ` Thomas Petazzoni via buildroot
2023-03-10 20:23 ` Arnout Vandecappelle
2023-09-11 21:08 ` Thomas Petazzoni via buildroot [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-07-29 10:30 Bernd Kuhls
2023-09-11 21:06 ` Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230911230821.12471642@windsurf \
--to=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.