Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560318 - sys-fs/reiserfsprogs fails to build under musl
Summary: sys-fs/reiserfsprogs fails to build under musl
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: PullRequest
: 716440 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-13 04:16 UTC by toast+misc
Modified: 2021-04-30 19:03 UTC (History)
3 users (show)

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


Attachments
Build log, not very useful beyond the initial link to loff_t (tmp.log,8.75 KB, application/octet-stream)
2015-09-13 04:16 UTC, toast+misc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description toast+misc 2015-09-13 04:16:06 UTC
Created attachment 411778 [details]
Build log, not very useful beyond the initial link to loff_t

Attached is the build log.
Seems related to #541694.
However after replacing all instances of loff_t with off_t, other errors popped up.

Don't have the time to go through it currently, but might try figuring everything out later.
Comment 1 Felix Janda 2015-09-13 05:50:08 UTC
This is non-trivial. As you said 'loff_t' needs to be replaced by
'off_t'. In addition, '__compar_fn_t f' and 'comparison_fn_t f' need to
be replaced by 'int (*f)(const void *, const void *)'. The main problem
however is the use of glibc's <printf.h>, which is not supported at all
in musl

http://wiki.musl-libc.org/wiki/Functional_differences_from_glibc#printf_behavior

To make it compile, you could replace prints.c by a stub. For a real
fix it seems that printf.c would need to be rewritten, as well as the
uses of its functions.
Comment 2 toast+misc 2015-09-13 19:38:19 UTC
Yeah, you're right. loff_t and the comparison types are easy enough to fix (simply modifying config.in with a check against __GNU_LIBRARY__ seems to be fine, since those are glibc/glibc-compatible specific).
Looked a bit into prints.c, the methods it implements are defined primarily in reiserfs_lib.h.
Once I have some more time I'll figure out what they do and try to rewrite them to basic printf I guess.

With fs tools (or anything in sys-*, really) I don't think stubbing a file is a good solution (especially since this uses FILE*, and doesn't assume stdout). If someone wants to stub it and see if the progs are still functional, they're free to do so though.
Comment 3 Felix Janda 2016-10-12 23:28:19 UTC
FYI, void linux has patches

https://github.com/voidlinux/void-packages/tree/master/srcpkgs/reiserfsprogs/patches

for compilation with musl.
Comment 4 Michael 'veremitz' Everitt 2020-06-05 12:27:24 UTC
As Felix points out, Void Linux are carrying patches to make this build. I shall test shortly, but it should be possible to add these into the ::musl overlay for the time being, and if upstream has/will accept, over to ::gentoo in the fullness of time.

CC'ing base-system@ for info, and reference, but assigning to musl@ for interim attention.
Comment 5 Michael 'veremitz' Everitt 2020-06-05 13:27:42 UTC
Also per https://github.com/venomlinux/ports-backyard/blob/master/musl/reiserfsprogs/spkgbuild#n26 we need to add a conditional dependency on sys-libs/obstack_standalone and append-ldflags to the ebuild. Hopefully I will have some ebuilds to PR shortly.
Comment 6 Andreas Sturmlechner gentoo-dev 2021-04-18 16:56:15 UTC
*** Bug 716440 has been marked as a duplicate of this bug. ***
Comment 7 Larry the Git Cow gentoo-dev 2021-04-19 01:09:56 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/musl.git/commit/?id=883fe972d848aad51357db04af0ce1a4d630214e

commit 883fe972d848aad51357db04af0ce1a4d630214e
Author:     Dave Hughes <davidhughes205@gmail.com>
AuthorDate: 2021-04-19 01:08:28 +0000
Commit:     Dave Hughes <davidhughes205@gmail.com>
CommitDate: 2021-04-19 01:08:45 +0000

    net-misc/rsync: fix ipv6
    
    Bug: https://bugs.gentoo.org/560318
    Closes: https://bugs.gentoo.org/560318
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Dave Hughes <davidhughes205@gmail.com>

 net-misc/rsync/Manifest                     |   1 +
 net-misc/rsync/files/rsyncd.conf-3.0.9-r1   |  15 +++
 net-misc/rsync/files/rsyncd.conf.d          |   5 +
 net-misc/rsync/files/rsyncd.init.d-r1       |  11 ++
 net-misc/rsync/files/rsyncd.logrotate       |   9 ++
 net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1 |  10 ++
 net-misc/rsync/metadata.xml                 |  16 +++
 net-misc/rsync/rsync-3.2.3-r2.ebuild        | 156 ++++++++++++++++++++++++++++
 net-misc/rsync/rsync-9999.ebuild            | 156 ++++++++++++++++++++++++++++
 9 files changed, 379 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/musl.git/commit/?id=883fe972d848aad51357db04af0ce1a4d630214e

commit 883fe972d848aad51357db04af0ce1a4d630214e
Author:     Dave Hughes <davidhughes205@gmail.com>
AuthorDate: 2021-04-19 01:08:28 +0000
Commit:     Dave Hughes <davidhughes205@gmail.com>
CommitDate: 2021-04-19 01:08:45 +0000

    net-misc/rsync: fix ipv6
    
    Bug: https://bugs.gentoo.org/560318
    Closes: https://bugs.gentoo.org/560318
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Dave Hughes <davidhughes205@gmail.com>

 net-misc/rsync/Manifest                     |   1 +
 net-misc/rsync/files/rsyncd.conf-3.0.9-r1   |  15 +++
 net-misc/rsync/files/rsyncd.conf.d          |   5 +
 net-misc/rsync/files/rsyncd.init.d-r1       |  11 ++
 net-misc/rsync/files/rsyncd.logrotate       |   9 ++
 net-misc/rsync/files/rsyncd.xinetd-3.0.9-r1 |  10 ++
 net-misc/rsync/metadata.xml                 |  16 +++
 net-misc/rsync/rsync-3.2.3-r2.ebuild        | 156 ++++++++++++++++++++++++++++
 net-misc/rsync/rsync-9999.ebuild            | 156 ++++++++++++++++++++++++++++
 9 files changed, 379 insertions(+)
Comment 8 Larry the Git Cow gentoo-dev 2021-04-19 01:47:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/musl.git/commit/?id=ee9110eaa82a0371f82d77b290cc7c1eda878133

commit ee9110eaa82a0371f82d77b290cc7c1eda878133
Author:     Dave Hughes <davidhughes205@gmail.com>
AuthorDate: 2021-04-19 01:46:50 +0000
Commit:     Dave Hughes <davidhughes205@gmail.com>
CommitDate: 2021-04-19 01:47:04 +0000

    sys-fs/reiserfsprogs: import with patches for musl support
    
    Bug: https://bugs.gentoo.org/560318
    Closes: https://bugs.gentoo.org/560318
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Dave Hughes <davidhughes205@gmail.com>

 sys-fs/reiserfsprogs/Manifest                      |   1 +
 .../reiserfsprogs/files/musl-__compar_fn_t.patch   |  20 ++
 sys-fs/reiserfsprogs/files/musl-loff_t.patch       |  15 ++
 .../files/musl-long_long_min_max.patch             |  21 ++
 sys-fs/reiserfsprogs/files/musl-prints.patch       | 230 +++++++++++++++++++++
 .../files/reiserfsprogs-3.6.25-no_acl.patch        |  12 ++
 .../files/reiserfsprogs-3.6.27-loff_t.patch        |  16 ++
 sys-fs/reiserfsprogs/metadata.xml                  |   8 +
 sys-fs/reiserfsprogs/reiserfsprogs-3.6.27.ebuild   |  63 ++++++
 9 files changed, 386 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/musl.git/commit/?id=ee9110eaa82a0371f82d77b290cc7c1eda878133

commit ee9110eaa82a0371f82d77b290cc7c1eda878133
Author:     Dave Hughes <davidhughes205@gmail.com>
AuthorDate: 2021-04-19 01:46:50 +0000
Commit:     Dave Hughes <davidhughes205@gmail.com>
CommitDate: 2021-04-19 01:47:04 +0000

    sys-fs/reiserfsprogs: import with patches for musl support
    
    Bug: https://bugs.gentoo.org/560318
    Closes: https://bugs.gentoo.org/560318
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Dave Hughes <davidhughes205@gmail.com>

 sys-fs/reiserfsprogs/Manifest                      |   1 +
 .../reiserfsprogs/files/musl-__compar_fn_t.patch   |  20 ++
 sys-fs/reiserfsprogs/files/musl-loff_t.patch       |  15 ++
 .../files/musl-long_long_min_max.patch             |  21 ++
 sys-fs/reiserfsprogs/files/musl-prints.patch       | 230 +++++++++++++++++++++
 .../files/reiserfsprogs-3.6.25-no_acl.patch        |  12 ++
 .../files/reiserfsprogs-3.6.27-loff_t.patch        |  16 ++
 sys-fs/reiserfsprogs/metadata.xml                  |   8 +
 sys-fs/reiserfsprogs/reiserfsprogs-3.6.27.ebuild   |  63 ++++++
 9 files changed, 386 insertions(+)
Comment 9 Larry the Git Cow gentoo-dev 2021-04-30 19:03:22 UTC
The bug has been referenced in the following commit(s):

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

commit f3e16a81d1ed5cf0f9ca3d894e871f7e04fd9adb
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-04-18 16:58:10 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-04-30 19:02:58 +0000

    sys-fs/reiserfsprogs: Drop 3.6.25, EAPI5--
    
    Bug: https://bugs.gentoo.org/560318
    Package-Manager: Portage-3.0.18, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 sys-fs/reiserfsprogs/Manifest                    |  1 -
 sys-fs/reiserfsprogs/reiserfsprogs-3.6.25.ebuild | 48 ------------------------
 2 files changed, 49 deletions(-)