Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715390 - sys-fs/mac-fdisk-0.1_p18 : io.c: error: unknown type name loff_t
Summary: sys-fs/mac-fdisk-0.1_p18 : io.c: error: unknown type name loff_t
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-30 07:15 UTC by Toralf Förster
Modified: 2021-05-19 18:36 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,15.11 KB, text/plain)
2020-03-30 07:15 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,68.99 KB, text/plain)
2020-03-30 07:15 UTC, Toralf Förster
Details
environment (environment,50.76 KB, text/plain)
2020-03-30 07:15 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,10.75 KB, application/x-bzip)
2020-03-30 07:15 UTC, Toralf Förster
Details
sys-fs:mac-fdisk-0.1_p18:20200330-071028.log (sys-fs:mac-fdisk-0.1_p18:20200330-071028.log,5.22 KB, text/plain)
2020-03-30 07:15 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,13.98 KB, application/x-bzip)
2020-03-30 07:16 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-30 07:15:38 UTC
      |   ^~~~~~
io.c: In function read_block:
io.c:437:5: error: unknown type name loff_t; did you mean off_t?
  437 |     loff_t x;
      |     ^~~~~~
      |     off_t

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl_hardened-20200328-201618

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.3.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.42.0 *

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Mon Mar 30 06:38:57 UTC 2020
/var/db/repos/musl	Fri Mar 27 00:25:27 UTC 2020

emerge -qpvO sys-fs/mac-fdisk
[ebuild  N    ] sys-fs/mac-fdisk-0.1_p18
Comment 1 Toralf Förster gentoo-dev 2020-03-30 07:15:41 UTC
Created attachment 627138 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-30 07:15:46 UTC
Created attachment 627140 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-30 07:15:50 UTC
Created attachment 627142 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-30 07:15:55 UTC
Created attachment 627144 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-30 07:15:58 UTC
Created attachment 627146 [details]
sys-fs:mac-fdisk-0.1_p18:20200330-071028.log
Comment 6 Toralf Förster gentoo-dev 2020-03-30 07:16:02 UTC
Created attachment 627148 [details]
temp.tbz2
Comment 7 Fabian Groffen gentoo-dev 2021-05-19 18:27:02 UTC
@slyfox: I applied the following (crude) hack, with a successful build and running mac-fdisk (ppc64-musl)

@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit toolchain-funcs
+inherit toolchain-funcs flag-o-matic
 
 DESCRIPTION="Mac/PowerMac disk partitioning utility"
 HOMEPAGE="ftp://ftp.mklinux.apple.com/pub/Other_Tools/"
@@ -33,6 +33,7 @@
 )
 
 src_compile() {
+       use elibc_musl && append-cppflags -Dloff_t=off_t
        emake CC="$(tc-getCC)"
 }


rationale being the largefile flags seem to be set, so off_t should be "long" here

Ok to commit?
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-19 18:31:46 UTC
(In reply to Fabian Groffen from comment #7)
> @slyfox: I applied the following (crude) hack, with a successful build and
> running mac-fdisk (ppc64-musl)
> 
> @@ -2,7 +2,7 @@
>  # Distributed under the terms of the GNU General Public License v2
>  
>  EAPI=7
> -inherit toolchain-funcs
> +inherit toolchain-funcs flag-o-matic
>  
>  DESCRIPTION="Mac/PowerMac disk partitioning utility"
>  HOMEPAGE="ftp://ftp.mklinux.apple.com/pub/Other_Tools/"
> @@ -33,6 +33,7 @@
>  )
>  
>  src_compile() {
> +       use elibc_musl && append-cppflags -Dloff_t=off_t
>         emake CC="$(tc-getCC)"
>  }
> 
> 
> rationale being the largefile flags seem to be set, so off_t should be
> "long" here
> 
> Ok to commit?

Yeah, absolutely. Please commit.

Also feel free to add yourself as a maintainer :)

Thank you!
Comment 9 Larry the Git Cow gentoo-dev 2021-05-19 18:36:33 UTC
The bug has been closed via the following commit(s):

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

commit d36ad3d77377858ca249b8cad31543e70ecc92ea
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2021-05-19 18:36:24 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2021-05-19 18:36:24 +0000

    sys-fs/mac-fdisk: fix musl build, become co-maintainer
    
    Closes: https://bugs.gentoo.org/715390
    Package-Manager: Portage-3.0.18, Repoman-3.0.2
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 sys-fs/mac-fdisk/mac-fdisk-0.1_p18.ebuild | 5 +++--
 sys-fs/mac-fdisk/metadata.xml             | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)