All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Neuschäfer via buildroot" <buildroot@buildroot.org>
To: Thomas Perale <thomas.perale@mind.be>
Cc: buildroot@buildroot.org, "J . Neuschäfer" <j.neuschaefer@gmx.net>
Subject: Re: [Buildroot] [PATCH] package/snooze: fix build w/ uclibc
Date: Tue, 5 Aug 2025 12:00:25 +0200	[thread overview]
Message-ID: <aJHWOTj4_yggJ4nM@probook> (raw)
In-Reply-To: <20250803133400.2759380-1-thomas.perale@mind.be>

On Sun, Aug 03, 2025 at 03:34:00PM +0200, Thomas Perale wrote:
> The following error occur on the autobuilder for static build using
> buildroot toolchain and uclibc:
> 
> ```
> /usr/bin/make -j17 -C /home/buildroot/instance-0/output-1/build/snooze-0.5/ PREFIX=/usr CC=/home/buildroot/instance-0/output-1/host/bin/arc-buildroot-linux-uclibc-gcc CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -static  -static"
> make[1]: Entering directory '/home/buildroot/instance-0/output-1/build/snooze-0.5'
> /home/buildroot/instance-0/output-1/host/bin/arc-buildroot-linux-uclibc-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -static  -static    snooze.c   -o snooze
> snooze.c:22:10: fatal error: sys/auxv.h: No such file or directory
>    22 | #include <sys/auxv.h>
>       |          ^~~~~~~~~~~~
> compilation terminated.
> make[1]: *** [<builtin>: snooze] Error 1
> ```
> 
> This error can be reproduced with:
> 
> ```
> cat >.config <<EOF
> BR2_arm=y
> BR2_cortex_a7=y
> BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y
> BR2_STATIC_LIBS=y
> BR2_PACKAGE_SNOOZE=y
> EOF
> make olddefconfig
> make snooze
> ```
> 
> The error doesn't occur on external toolchains.
> 
> The `#include <sys/auxv.h>` was orinally included in the initial commit
> (see [1]) to use the `getauxval` function declaration. This function
> usage has since been removed in commit [2].
> 
> This patch removes the include that is no longer needed.
> 
> [1] https://github.com/leahneukirchen/snooze/commit/56480881978a4cb5813746232de9950d46cb3369
> [2] https://github.com/leahneukirchen/snooze/commit/610e6b35ec614764770d47b5974b30fd90dce6fe
> 
> Fixes: https://autobuild.buildroot.org/results/aec/aec463f87094a47ee059113f08e8ee3604dcea9b
> Signed-off-by: Thomas Perale <thomas.perale@mind.be>

Thanks!

Reviewed-by: J. Neuschäfer <j.ne@posteo.net>

> ---
> Hi,
> 
> Not sure why the error only happens on the specific combination of
> buildroot toolchain and static build. The `__linux__` definition is
> present on other toolchain as well so it should fail in other
> scenario.
> 
> Regards,
> Thomas
> ---
>  .../0002-snooze-remove-unused-include.patch   | 36 +++++++++++++++++++
>  1 file changed, 36 insertions(+)
>  create mode 100644 package/snooze/0002-snooze-remove-unused-include.patch
> 
> diff --git a/package/snooze/0002-snooze-remove-unused-include.patch b/package/snooze/0002-snooze-remove-unused-include.patch
> new file mode 100644
> index 0000000000..fba92cd6b5
> --- /dev/null
> +++ b/package/snooze/0002-snooze-remove-unused-include.patch
> @@ -0,0 +1,36 @@
> +From 2eebd33c10d5a0f1a9831e3e49215857ab41ec03 Mon Sep 17 00:00:00 2001
> +From: Thomas Perale <perale.thomas@gmail.com>
> +Date: Sat, 2 Aug 2025 23:09:31 +0200
> +Subject: [PATCH] snooze: remove unused include
> +
> +The `#include <sys/auxv.h>` was orinally included in the initial commit
> +(see [1]) to use the `getauxval` function declaration.
> +
> +This function usage has since been removed in commit [2].
> +
> +This commit removes the include that is no longer needed.
> +
> +[1] https://github.com/leahneukirchen/snooze/commit/56480881978a4cb5813746232de9950d46cb3369
> +[2] https://github.com/leahneukirchen/snooze/commit/610e6b35ec614764770d47b5974b30fd90dce6fe
> +
> +Upstream: https://github.com/leahneukirchen/snooze/pull/24
> +Signed-off-by: Thomas Perale <thomas.perale@mind.be>
> +---
> + snooze.c | 4 ----
> + 1 file changed, 4 deletions(-)
> +
> +diff --git a/snooze.c b/snooze.c
> +index e47ad11..11925ca 100644
> +--- a/snooze.c
> ++++ b/snooze.c
> +@@ -18,10 +18,6 @@
> + #include <time.h>
> + #include <unistd.h>
> + 
> +-#ifdef __linux__
> +-#include <sys/auxv.h>
> +-#endif
> +-
> + static long slack = 60;
> + #define SLEEP_PHASE 300
> + static int nflag, vflag;
> -- 
> 2.50.1
> 
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-08-05 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-03 13:34 [Buildroot] [PATCH] package/snooze: fix build w/ uclibc Thomas Perale via buildroot
2025-08-05 10:00 ` J. Neuschäfer via buildroot [this message]
2025-08-09 21:21   ` Romain Naour via buildroot
2025-08-14 20:31 ` Thomas Perale 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=aJHWOTj4_yggJ4nM@probook \
    --to=buildroot@buildroot.org \
    --cc=j.neuschaefer@gmx.net \
    --cc=thomas.perale@mind.be \
    /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.