Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] build failure on Ubuntu 22.04 LTS: TIME_BITS=64 is allowed only with FILE_OFFSET_BITS=64
@ 2024-02-17  9:32 Christian Stewart via buildroot
  2024-02-17 10:28 ` Christian Stewart via buildroot
  2024-02-17 11:55 ` Yann E. MORIN
  0 siblings, 2 replies; 5+ messages in thread
From: Christian Stewart via buildroot @ 2024-02-17  9:32 UTC (permalink / raw)
  To: Buildroot Mailing List; +Cc: Thomas Petazzoni


[-- Attachment #1.1: Type: text/plain, Size: 1810 bytes --]

On a fresh Ubuntu 22.04.4 LTS VM:

git clone https://github.com/buildroot/buildroot
cd buildroot

# master as of this e-mail
git checkout 6c455505eb5ed8ed5bbf090f2bfb6241c9f153a2

cat <<EOF >> defconfig
BR2_arm=y
BR2_cortex_a7=y
BR2_BINUTILS_VERSION_2_41_X=y
BR2_GCC_VERSION_13_X=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_CCACHE=y
BR2_PACKAGE_SUDO=y
EOF

make defconfig BR2_DEFCONFIG=defconfig

# fails with error shown below
make sudo

I was able to fix it with this patch, but I'm not sure if this is the
"correct" fix:

From 6dc2b9350ceffc808fe7d048ff9dbe585649c304 Mon Sep 17 00:00:00 2001
From: Christian Stewart <christian@aperture.us>
Date: Sat, 17 Feb 2024 01:16:09 -0800
Subject: [PATCH] package/Makefile.in: fix build failure on Ubuntu 22.04 LTS

Add flags for 64 bit timestamps when building host packages.

-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64

Build failure fixed:

/usr/include/features-time64.h:26:5: error: #error "_TIME_BITS=64 is
allowed only with _FILE_OFFSET_BITS=64"
   26 | #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"

Fixes: https://github.com/skiffos/SkiffOS/issues/306

Signed-off-by: Christian Stewart <christian@aperture.us>
---
 package/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 3e276d23d6..82d3a435fd 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -246,7 +246,7 @@ UNZIP := $(shell which unzip || type -p unzip) -q

 APPLY_PATCHES = PATH=$(HOST_DIR)/bin:$$PATH
support/scripts/apply-patches.sh $(if $(QUIET),-s)

-HOST_CPPFLAGS  = -I$(HOST_DIR)/include
+HOST_CPPFLAGS  = -I$(HOST_DIR)/include -D_FILE_OFFSET_BITS=64
-D_TIME_BITS=64
 HOST_CFLAGS   ?= -O2
 HOST_CFLAGS   += $(HOST_CPPFLAGS)
 HOST_CXXFLAGS += $(HOST_CFLAGS)
-- 
2.43.1

Thanks,
Christian Stewart

[-- Attachment #1.2: Type: text/html, Size: 2555 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-17 17:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-17  9:32 [Buildroot] build failure on Ubuntu 22.04 LTS: TIME_BITS=64 is allowed only with FILE_OFFSET_BITS=64 Christian Stewart via buildroot
2024-02-17 10:28 ` Christian Stewart via buildroot
2024-02-17 11:55 ` Yann E. MORIN
2024-02-17 17:31   ` Yann E. MORIN
2024-02-17 17:46   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox