Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716136 - sys-fs/ext4magic-0.3.2-r1 : /.../ext2fs.h: error: unknown type name dev_t
Summary: sys-fs/ext4magic-0.3.2-r1 : /.../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: Gentoo musl team
URL: https://sourceforge.net/p/ext4magic/c...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-04 08:39 UTC by Toralf Förster
Modified: 2024-01-08 03:41 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.53 KB, text/plain)
2020-04-04 08:39 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,306.86 KB, text/plain)
2020-04-04 08:40 UTC, Toralf Förster
Details
environment (environment,16.68 KB, text/plain)
2020-04-04 08:41 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,25.33 KB, application/x-bzip)
2020-04-04 08:41 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,6.91 KB, application/x-bzip)
2020-04-04 08:41 UTC, Toralf Förster
Details
sys-fs:ext4magic-0.3.2-r1:20200404-075935.log (sys-fs:ext4magic-0.3.2-r1:20200404-075935.log,8.73 KB, text/plain)
2020-04-04 08:42 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,7.85 KB, application/x-bzip)
2020-04-04 08:42 UTC, Toralf Förster
Details
succesful build on musl (build.log,13.71 KB, text/plain)
2020-05-06 20:51 UTC, Jory A. Pratt
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-04-04 08:39:28 UTC
In file included from ext2fsP.h:12,
                 from block.c:30:
/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-20200328-141627

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

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 *
The following VMs are available for generation-2:

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sat Apr  4 06:37:48 UTC 2020
/var/db/repos/musl	Sat Apr  4 03:02:24 UTC 2020

emerge -qpvO sys-fs/ext4magic
[ebuild  N    ] sys-fs/ext4magic-0.3.2-r1  USE="expert-mode -debug -file-attr"
Comment 1 Toralf Förster gentoo-dev 2020-04-04 08:39:55 UTC
Created attachment 629790 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-04-04 08:40:35 UTC
Created attachment 629792 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-04-04 08:41:12 UTC
Created attachment 629794 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-04-04 08:41:36 UTC
Created attachment 629796 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-04-04 08:41:51 UTC
Created attachment 629798 [details]
logs.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-04-04 08:42:03 UTC
Created attachment 629800 [details]
sys-fs:ext4magic-0.3.2-r1:20200404-075935.log
Comment 7 Toralf Förster gentoo-dev 2020-04-04 08:42:14 UTC
Created attachment 629802 [details]
temp.tbz2
Comment 8 Göktürk Yüksek archtester gentoo-dev 2020-05-06 01:40:06 UTC
We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>' and whether musl provides a 'dev_t' type in 'sys/types.h'.
Comment 9 Michael 'veremitz' Everitt 2020-05-06 11:20:22 UTC
(In reply to Göktürk Yüksek from comment #8)
> We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>'
> and whether musl provides a 'dev_t' type in 'sys/types.h'.

I believe your answer lies here:
http://git.musl-libc.org/cgit/musl/tree/include/sys/types.h

But I can't vouch for how header inheritance works! :D
Comment 10 Michael 'veremitz' Everitt 2020-05-06 11:21:22 UTC
This commit from zfs might also prove instructive:

https://github.com/openzfs/zfs/commit/7559f343a5c3368bf8079f39f85cc360e7411b6a
Comment 11 Göktürk Yüksek archtester gentoo-dev 2020-05-06 20:17:49 UTC
(In reply to Michael 'veremitz' Everitt from comment #9)
> (In reply to Göktürk Yüksek from comment #8)
> > We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>'
> > and whether musl provides a 'dev_t' type in 'sys/types.h'.
> 
> I believe your answer lies here:
> http://git.musl-libc.org/cgit/musl/tree/include/sys/types.h
> 
> But I can't vouch for how header inheritance works! :D

Yeah, I saw that. That's why I wanted to see what's in the tinderbox image.

(In reply to Michael 'veremitz' Everitt from comment #10)
> This commit from zfs might also prove instructive:
> 
> https://github.com/openzfs/zfs/commit/
> 7559f343a5c3368bf8079f39f85cc360e7411b6a

Saw that too. There are references to dev_t in arch specific dirs. I haven't checked where they inherit that from.
Comment 12 Toralf Förster gentoo-dev 2020-05-06 20:25:24 UTC
(In reply to Göktürk Yüksek from comment #8)
> We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>'
> and whether musl provides a 'dev_t' type in 'sys/types.h'.

Too late - the affected data partition was reformatted 2 days ago in favour to hold the new upcoming images
Comment 13 Jory A. Pratt gentoo-dev 2020-05-06 20:31:58 UTC
(In reply to Toralf Förster from comment #12)
> (In reply to Göktürk Yüksek from comment #8)
> > We need to know whether 'ext2fs/ext2fs.h' has an '#include <sys/types.h>'
> > and whether musl provides a 'dev_t' type in 'sys/types.h'.
> 
> Too late - the affected data partition was reformatted 2 days ago in favour
> to hold the new upcoming images

The answer is yes to both
Comment 14 Jory A. Pratt gentoo-dev 2020-05-06 20:46:09 UTC
The solution to this is simple, append HAVE_SYS_TYPES_H to CFLAGS to have it include sys/tytpes.h
Comment 15 Jory A. Pratt gentoo-dev 2020-05-06 20:51:16 UTC
Created attachment 636572 [details]
succesful build on musl

review build log to verify sucess
Comment 16 Jory A. Pratt gentoo-dev 2020-05-06 20:56:14 UTC
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

I was meaning to post the relevant part of ext2fs/ext2fs.h so you understand why the solution I provided will correct the problem.
Comment 17 Larry the Git Cow gentoo-dev 2024-01-08 03:34:13 UTC
The bug has been closed via the following commit(s):

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

commit 6df45df54e7fd8e2c9151d333b5404dc88b9e96e
Author:     Göktürk Yüksek <gokturk@gentoo.org>
AuthorDate: 2024-01-08 03:22:27 +0000
Commit:     Göktürk Yüksek <gokturk@gentoo.org>
CommitDate: 2024-01-08 03:33:37 +0000

    sys-fs/ext4magic: fix building with musl #716136
    
    Also update EAPI 6 -> 8, and update LICENSES.
    
    Closes: https://bugs.gentoo.org/716136
    Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>

 sys-fs/ext4magic/ext4magic-0.3.2-r2.ebuild         |  37 +++++
 .../files/ext4magic-0.3.2-fix-sys-types-h.patch    | 183 +++++++++++++++++++++
 2 files changed, 220 insertions(+)