Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/f2fs-tools: fix musl compile error
@ 2023-08-13 17:17 Waldemar Brodkorb
  2023-08-22 20:06 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2023-08-13 17:17 UTC (permalink / raw)
  To: buildroot; +Cc: Grzegorz Blach

musl 1.2.4 removed the lseek64 function, but kept a definition of lseek64
when _LARGEFILE64_SOURCE is defined.

Overwrite configure logic to always use lseek64 for musl toolchains.

There is no need to backport it to older Buildroot releases, because musl 1.2.4
is not part of any release.

Fixes:
 - http://autobuild.buildroot.net/results/17f/17f4ea7d62581cf8c574deeb98e1785220d5bd3f

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 package/f2fs-tools/f2fs-tools.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/f2fs-tools/f2fs-tools.mk b/package/f2fs-tools/f2fs-tools.mk
index a92ab4fe3e..f9be789940 100644
--- a/package/f2fs-tools/f2fs-tools.mk
+++ b/package/f2fs-tools/f2fs-tools.mk
@@ -16,6 +16,10 @@ F2FS_TOOLS_LICENSE = GPL-2.0
 F2FS_TOOLS_LICENSE_FILES = COPYING
 F2FS_TOOLS_CPE_ID_VENDOR = f2fs-tools_project
 
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
+F2FS_TOOLS_CONF_ENV += ac_cv_func_lseek64=yes
+endif
+
 ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
 F2FS_TOOLS_CONF_OPTS += --with-selinux
 F2FS_TOOLS_DEPENDENCIES += libselinux
-- 
2.39.2

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

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

* Re: [Buildroot] [PATCH] package/f2fs-tools: fix musl compile error
  2023-08-13 17:17 [Buildroot] [PATCH] package/f2fs-tools: fix musl compile error Waldemar Brodkorb
@ 2023-08-22 20:06 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-08-22 20:06 UTC (permalink / raw)
  To: Waldemar Brodkorb; +Cc: Grzegorz Blach, buildroot

On Sun, 13 Aug 2023 19:17:38 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> +F2FS_TOOLS_CONF_ENV += ac_cv_func_lseek64=yes
> +endif

I am not really happy with this, because it's really a workaround. I am
not sure to fully grasp what the issue is. Apparently, in commit
https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
in musl, the lseek64 -> lseek alias was removed, and now there is some
dynamic linker trickery instead.

I think the issue is that what f2fs-tools does is wrong, and this is
what needs to be fixed. I would suggest to reach out to the musl
community, as they are usually very good at suggesting how to do things
right.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-08-22 20:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-13 17:17 [Buildroot] [PATCH] package/f2fs-tools: fix musl compile error Waldemar Brodkorb
2023-08-22 20:06 ` Thomas Petazzoni via buildroot

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