Summary: | sys-fs/diskdev_cmds-332.14_p1-r2 : makehfs.c: fatal error: sys/sysctl.h: No such file or directory | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo musl team <musl> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | slyfox |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 713786 | ||
Attachments: |
emerge-info.txt
emerge-history.txt environment etc.portage.tbz2 sys-fs:diskdev_cmds-332.14_p1-r2:20200402-021314.log temp.tbz2 fixes musl build fixes musl build |
Description
Toralf Förster
2020-04-02 07:24:55 UTC
Created attachment 628812 [details]
emerge-info.txt
Created attachment 628814 [details]
emerge-history.txt
Created attachment 628816 [details]
environment
Created attachment 628818 [details]
etc.portage.tbz2
Created attachment 628820 [details]
sys-fs:diskdev_cmds-332.14_p1-r2:20200402-021314.log
Created attachment 628822 [details]
temp.tbz2
Can confirm the same error with glibc-2.32. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e18040d345fe623061142cca2a8e0c43ff332e8 commit 0e18040d345fe623061142cca2a8e0c43ff332e8 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2020-08-19 20:43:21 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2020-08-19 20:43:34 +0000 sys-fs/diskdev_cmds: tweak for glibc-2.32 It does not fix build on musl but fixes build on glibc-2.32. Reported-by: Georg Rudoy Bug: https://bugs.gentoo.org/715862 Package-Manager: Portage-3.0.3, Repoman-3.0.0 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> sys-fs/diskdev_cmds/diskdev_cmds-332.14_p1-r3.ebuild | 1 + .../files/diskdev_cmds-332.14_p1-no-sysctl.patch | 12 ++++++++++++ 2 files changed, 13 insertions(+) Created attachment 680971 [details, diff]
fixes musl build
This is a straightforward patch
1.) fixing warnings from musl's /usr/include/sys/errno.h
2.) stripping out __P function definitions from glibc's /usr/include/sys/cdefs.h (#define __P(args) args)
3.) #include <sys/types.h> where type u_char is used
as far as the build is concerned. In the complete source package far more of this stuff above is lurking around but does not matter for the sole building of fsck_hfs and newfs_hfs.
With the patch diskdev_cmds-332.14_p1-r4 builds fine on musl, also the patch does not break the glibc build.
(In reply to ernsteiswuerfel from comment #9) > Created attachment 680971 [details, diff] [details, diff] > fixes musl build > > This is a straightforward patch > 1.) fixing warnings from musl's /usr/include/sys/errno.h > 2.) stripping out __P function definitions from glibc's > /usr/include/sys/cdefs.h (#define __P(args) args) > 3.) #include <sys/types.h> where type u_char is used > > as far as the build is concerned. In the complete source package far more of > this stuff above is lurking around but does not matter for the sole building > of fsck_hfs and newfs_hfs. > > With the patch diskdev_cmds-332.14_p1-r4 builds fine on musl, also the patch > does not break the glibc build. The patch looks reasonable. I wonder if you could make it slightly shorter by using something like: #ifndef __P # __P(x) x #endif at the beginning of each file that uses __P. That way it should be easier to deal with conflicts when porting patch th newer versions if we ever decide to. (In reply to Sergei Trofimovich from comment #10) > The patch looks reasonable. I wonder if you could make it slightly shorter > by using something like: > > #ifndef __P > # __P(x) x > #endif > > at the beginning of each file that uses __P. That way it should be easier to > deal with conflicts when porting patch th newer versions if we ever decide > to. Ah yes! I used the same wording as glibc's /usr/include/sys/cdefs.h does: #ifndef __P #define __P(args) args #endif And thanks for your very helpful Ebuild hacking tips! Created attachment 681547 [details, diff]
fixes musl build
(In reply to Sergei Trofimovich from comment #10) > at the beginning of each file that uses __P. That way it should be easier to > deal with conflicts when porting patch th newer versions if we ever decide > to. If we ever decide to port a new version here's a nice site to look at the different versions, upstream Apple does not provide: https://github.com/aosm/diskdev_cmds Though some other distribution deciced to stick to a specific version and sorta 'fork' it, not wanting to deal with Apple specifics: https://aur.archlinux.org/packages/hfsprogs/ The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dcb636abf0488aec91b2c22e6279ee53f8c18d4 commit 1dcb636abf0488aec91b2c22e6279ee53f8c18d4 Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2021-01-06 21:50:53 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2021-01-06 21:51:33 +0000 sys-fs/diskdev_cmds: adapt to musl Reported-by: Toralf Förster Fixed-by: ernsteiswuerfel Closes: https://bugs.gentoo.org/715862 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> .../diskdev_cmds/diskdev_cmds-332.14_p1-r4.ebuild | 3 +- .../files/diskdev_cmds-332.14_p1-musl.patch | 79 ++++++++++++++++++++++ 2 files changed, 81 insertions(+), 1 deletion(-) (In reply to ernsteiswuerfel from comment #12) > Created attachment 681547 [details, diff] [details, diff] > fixes musl build Pushed as is. Thank you! |