Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 712582 - sys-fs/zerofree-1.1.1 : /.../ext2fs.h: error: unknown type name dev_t
Summary: sys-fs/zerofree-1.1.1 : /.../ext2fs.h: error: unknown type name dev_t
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Joshua Kinard
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: missing-musl-includes
  Show dependency tree
 
Reported: 2020-03-14 22:31 UTC by Toralf Förster
Modified: 2020-11-11 22:01 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,15.40 KB, text/plain)
2020-03-14 22:31 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,89.55 KB, text/plain)
2020-03-14 22:31 UTC, Toralf Förster
Details
environment (environment,53.38 KB, text/plain)
2020-03-14 22:31 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.72 KB, application/x-bzip)
2020-03-14 22:31 UTC, Toralf Förster
Details
sys-fs:zerofree-1.1.1:20200314-215947.log (sys-fs:zerofree-1.1.1:20200314-215947.log,2.20 KB, text/plain)
2020-03-14 22:31 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,14.16 KB, application/x-bzip)
2020-03-14 22:31 UTC, Toralf Förster
Details
include sys/types.h (types.patch,284 bytes, patch)
2020-03-17 01:03 UTC, Jory A. Pratt
Details | Diff

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-14 22:31:40 UTC
x86_64-gentoo-linux-musl-gcc -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -O2 -pipe -march=native -fno-common -falign-functions=32:25:16 -Wl,-O1 -Wl,--as-needed -o zerofree zerofree.c  -lext2fs
In file included from zerofree.c:20:
/usr/include/ext2fs/ext2fs.h:1360:39: error: unknown type name dev_t; did you mean div_t?
 1360 | extern char *ext2fs_find_block_device(dev_t device);
      |                                       ^~~~~
      |                                       div_t

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

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

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.2.0 *
 [2] 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.41.1 *
The following VMs are available for generation-2:

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Sat, 14 Mar 2020 20:38:58 +0000
emerge -qpvO sys-fs/zerofree
[ebuild  N    ] sys-fs/zerofree-1.1.1
Comment 1 Toralf Förster gentoo-dev 2020-03-14 22:31:42 UTC
Created attachment 619228 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-14 22:31:45 UTC
Created attachment 619230 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-14 22:31:48 UTC
Created attachment 619232 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-14 22:31:51 UTC
Created attachment 619234 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-14 22:31:54 UTC
Created attachment 619236 [details]
sys-fs:zerofree-1.1.1:20200314-215947.log
Comment 6 Toralf Förster gentoo-dev 2020-03-14 22:31:57 UTC
Created attachment 619238 [details]
temp.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-03-16 16:12:19 UTC
The first attempt to tinderbox a musl image failed at all.

I'll mass close therefore all filed bug reports of the last days related to this tinderbox image.

Please feel free to re-open if you think that the bug is real in musl and not fixed by the musl overlay.
Comment 8 Joshua Kinard gentoo-dev 2020-03-17 00:32:26 UTC
Actually, this might actually be a thing.  <sys/types.h> needs to be included in the right place:

See here:
https://github.com/openzfs/zfs/issues/2607

And this looks like a code snippet that might fix:
https://github.com/openzfs/zfs/commit/7559f343a5c3368bf8079f39f85cc360e7411b6a

Won't have time to test for a good while, though.  IF you can check it on your tinderbox, let me know.
Comment 9 Jory A. Pratt gentoo-dev 2020-03-17 01:03:39 UTC
Created attachment 620732 [details, diff]
include sys/types.h

Here is the proper patch, you do not need to ifndef the header, it should have been included for proper posix compliance.
Comment 10 Larry the Git Cow gentoo-dev 2020-11-11 22:01:08 UTC
The bug has been closed via the following commit(s):

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

commit 9d92a6f0bddaa8cb87fbad32caa69b9089905f55
Author:     Joshua Kinard <kumba@gentoo.org>
AuthorDate: 2020-11-11 21:59:25 +0000
Commit:     Joshua Kinard <kumba@gentoo.org>
CommitDate: 2020-11-11 22:00:46 +0000

    sys-fs/zerofree: Fix musl compile error
    
    Added a patch to fix a compile error in musl environments and remove
    the older 1.0.4 ebuild.
    
    Closes: https://bugs.gentoo.org/712582
    Signed-off-by: Joshua Kinard <kumba@gentoo.org>
    Package-Manager: Portage-3.0.9, Repoman-3.0.2

 sys-fs/zerofree/Manifest                           |  1 -
 .../files/zerofree-include-sys_types.patch         | 10 +++++++
 sys-fs/zerofree/zerofree-1.0.4.ebuild              | 35 ----------------------
 sys-fs/zerofree/zerofree-1.1.1.ebuild              |  5 ++++
 4 files changed, 15 insertions(+), 36 deletions(-)