Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 907039

Summary: sys-fs/xfsprogs-6.3.0 - rdwr.c: error: unknown type name off64_t
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: base-system, vimproved
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/32008
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 903611, 920477    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.clang.tar.bz2
etc.portage.tar.bz2
logs.tar.bz2
sys-fs:xfsprogs-6.3.0:20230523-045150.log
temp.tar.bz2
FEATURE TEST MACRO fix for musl

Description Toralf Förster gentoo-dev 2023-05-23 19:35:19 UTC
  215 |         "bp=(bno 0x%llx, len %u bytes) key=(bno 0x%llx, len %u bytes)\n",
  216 |                                 pthread_self(),
      |                                 ~~~~~~~~~~~~~~
      |                                 |
      |                                 pthread_t {aka struct __pthread *}
rdwr.c: At top level:
rdwr.c:579:40: error: unknown type name 'off64_t'; did you mean 'off_t'?
  579 | __read_buf(int fd, void *buf, int len, off64_t offset, int flags)
      |                                        ^~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-j5-20230521-051504

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-13 *
clang/llvm (if any):
clang version 16.0.4
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/16/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/16
16.0.4
Python 3.11.3
Available Ruby profiles:
  [1]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.69.0 *
php cli (if any):
go version go1.20.4 linux/amd64

  HEAD of ::gentoo
commit 10eac2b23ea7edbc360c9fb255eecdf30ec1e512
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue May 23 04:31:55 2023 +0000

    2023-05-23 04:31:55 UTC

emerge -qpvO sys-fs/xfsprogs
[ebuild  N    ] sys-fs/xfsprogs-6.3.0  USE="libedit nls (split-usr) -icu (-selinux)"
Comment 1 Toralf Förster gentoo-dev 2023-05-23 19:35:20 UTC
Created attachment 862317 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-05-23 19:35:21 UTC
Created attachment 862318 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-05-23 19:35:22 UTC
Created attachment 862319 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-05-23 19:35:23 UTC
Created attachment 862320 [details]
etc.clang.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2023-05-23 19:35:24 UTC
Created attachment 862321 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2023-05-23 19:35:24 UTC
Created attachment 862322 [details]
logs.tar.bz2
Comment 7 Toralf Förster gentoo-dev 2023-05-23 19:35:25 UTC
Created attachment 862323 [details]
sys-fs:xfsprogs-6.3.0:20230523-045150.log
Comment 8 Toralf Förster gentoo-dev 2023-05-23 19:35:26 UTC
Created attachment 862324 [details]
temp.tar.bz2
Comment 9 Sven E. 2023-11-05 18:17:11 UTC
Created attachment 874139 [details, diff]
FEATURE TEST MACRO fix for musl

A more elaborate patch should probably detect the availability of the corresponding FTM
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-05 18:28:41 UTC
(In reply to Sven E. from comment #9)
> Created attachment 874139 [details, diff] [details, diff]
> FEATURE TEST MACRO fix for musl
> 
> A more elaborate patch should probably detect the availability of the
> corresponding FTM

As discussed in the tracker bug, this is not a proper fix, and will break with the next musl release.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-05 18:49:49 UTC
Sent vimproved's fix upstream at https://lore.kernel.org/linux-xfs/20231105183939.1025279-1-sam@gentoo.org/T/#u.
Comment 12 Sven E. 2023-11-05 23:00:39 UTC
(In reply to Sam James from comment #10)
> (In reply to Sven E. from comment #9)
> > Created attachment 874139 [details, diff] [details, diff] [details, diff]
> > FEATURE TEST MACRO fix for musl
> > 
> > A more elaborate patch should probably detect the availability of the
> > corresponding FTM
> 
> As discussed in the tracker bug, this is not a proper fix, and will break
> with the next musl release.

I see. Will the alpine patch be limited to musl? Just asking, because a sys w/o file offset bits support might end up producing something with off_t being 32 bits.

You'd certainly not want that.

Wondering, it seems xfsprogs did use AC_SYS_LARGEFILE some time back, why was that dropped and instead off64_t used esp. since it does not go together with file offset bits but rather largefile64 offset?
Comment 13 immolo 2023-12-24 04:40:40 UTC
Confirmed this patch successfully works on armv6 via both RPI zero and qemu-arm with no early issues running the compiled code.
Comment 15 Larry the Git Cow gentoo-dev 2024-02-05 23:28:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d64e0a8bf2551bcd233b11faca7cc49d01b10bc2

commit d64e0a8bf2551bcd233b11faca7cc49d01b10bc2
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-05 23:27:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-05 23:28:07 +0000

    sys-fs/xfsprogs: add 6.6.0
    
    Closes: https://bugs.gentoo.org/907039
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-fs/xfsprogs/Manifest                           |   1 +
 .../0001-Remove-use-of-LFS64-interfaces.patch      | 652 +++++++++++++++++++++
 .../files/0002-io-Adapt-to-64-bit-time_t.patch     |  37 ++
 ...uild-Request-64-bit-time_t-where-possible.patch |  31 +
 sys-fs/xfsprogs/xfsprogs-6.6.0.ebuild              | 100 ++++
 5 files changed, 821 insertions(+)