Skip to contentSkip to conversation

site/common-musl: Set ac_cv_sys_file_offset_bits default to 64

PATCH In review Khem Raj 3 participants 4 messages Jan 7, 2023 – Jan 8, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 site/common-musl: Set ac_cv_sys_file_offset_bits default to 64

off_t is always 64bit on musl regardless of 32bit or 64bit architectures. autoconf has AC_SYS_LARGEFILE to detect correct off_t size but it only work with glibc since it defines feature macros _FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE but these macros are not used on musl headers.

Cc Nicolas Dechesne <[email protected]>
---
 meta/site/common-musl | 2 ++
 1 file changed, 2 insertions(+)
meta/site/common-musl +2 -0
index 86aed4a38c..23e50ef749 100644
@@ -15,6 +15,8 @@ ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
 ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
 ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 ac_cv_func_strtod=${ac_cv_func_strtod=yes}
+# off_t is always 64bit on musl systems
+ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits=64}
 
 # glib
 glib_cv_strlcpy=${glib_cv_strlcpy=no}
Signature · 1 line
2.39.0
#1 lore raw
Quoted 9 lines · Khem Raj

off_t is always 64bit on musl regardless of 32bit or 64bit architectures. autoconf has AC_SYS_LARGEFILE to detect correct off_t size but it only work with glibc since it defines feature macros _FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE but these macros are not used on musl headers.

Cc Nicolas Dechesne <[email protected]>

Thanks. It fixes the build issue in e2fsprog I reported earlier.

Quoted 22 lines
---
 meta/site/common-musl | 2 ++
 1 file changed, 2 insertions(+)
meta/site/common-musl +2 -0
index 86aed4a38c..23e50ef749 100644
@@ -15,6 +15,8 @@
 ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
 ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
 ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 ac_cv_func_strtod=${ac_cv_func_strtod=yes}
+# off_t is always 64bit on musl systems
+ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits=64}
 
 # glib

glib_cv_strlcpy=${glib_cv_strlcpy=no}
--
2.39.0

#2 lore raw
In reply to Khem Raj
Quoted 17 lines · Khem Raj

off_t is always 64bit on musl regardless of 32bit or 64bit architectures. autoconf has AC_SYS_LARGEFILE to detect correct off_t size but it only work with glibc since it defines feature macros _FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE but these macros are not used on musl headers.

Cc Nicolas Dechesne <[email protected]>
---
 meta/site/common-musl | 2 ++
 1 file changed, 2 insertions(+)
meta/site/common-musl +0 -0
index 86aed4a38c..23e50ef749 100644

meta/site/common-musl ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes} · line 20

Quoted 6 lines
meta/site/common-musl +2 -0
@@ -15,6 +15,8 @@ ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
 ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
 ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 ac_cv_func_strtod=${ac_cv_func_strtod=yes}
+# off_t is always 64bit on musl systems
+ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits=64}
 

Not sure if this failure might be related to this change:

https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/6496/steps/12/logs/stdio

Cheers,

Richard

author
#3 lore raw
Quoted 28 lines · Richard Purdie
Quoted 17 lines · Khem Raj

off_t is always 64bit on musl regardless of 32bit or 64bit architectures. autoconf has AC_SYS_LARGEFILE to detect correct off_t size but it only work with glibc since it defines feature macros _FILE_OFFSET_BITS=64 and _LARGEFILE_SOURCE but these macros are not used on musl headers.

Cc Nicolas Dechesne <[email protected]>
---
 meta/site/common-musl | 2 ++
 1 file changed, 2 insertions(+)
meta/site/common-musl +0 -0
index 86aed4a38c..23e50ef749 100644

meta/site/common-musl ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes} · line 20

Quoted 6 lines
meta/site/common-musl +2 -0
@@ -15,6 +15,8 @@ ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
 ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
 ac_cv_func_mmap_fixed_mapped=${ac_cv_func_mmap_fixed_mapped=yes}
 ac_cv_func_strtod=${ac_cv_func_strtod=yes}
+# off_t is always 64bit on musl systems
+ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits=64}
 

Not sure if this failure might be related to this change:

Quoted 2 lines

https://autobuilder.yoctoproject.org/typhoon/#/builders/45/builds/6496/steps/12/logs/stdio

Yes its a side effect of this. We should have added --disable-lfs-alias always. sending a patch for this package

Quoted 3 lines

Cheers,

Richard