Message ID | ZNkQMgmLXTtuItPp@waldemar-brodkorb.de |
---|---|
State | Changes Requested |
Headers | show |
Series | package/f2fs-tools: fix musl compile error | expand |
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
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
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(+)