Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567598 - >=sys-apps/busybox-1.24.0 does not build on uclibc because of missing syncfs
Summary: >=sys-apps/busybox-1.24.0 does not build on uclibc because of missing syncfs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: uclibc-porting
  Show dependency tree
 
Reported: 2015-12-05 19:40 UTC by René Rhéaume
Modified: 2018-01-24 04:31 UTC (History)
1 user (show)

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


Attachments
build.log from emerge (build.log,9.43 KB, text/plain)
2015-12-05 19:41 UTC, René Rhéaume
Details
emerge --info (emerge-info.txt,6.10 KB, text/plain)
2015-12-05 19:42 UTC, René Rhéaume
Details

Note You need to log in before you can comment on or make changes to this bug.
Description René Rhéaume 2015-12-05 19:40:47 UTC
The current stable version of busybox, 1.24.1, does not compile on uclibc because the latter lacks int syncfs(int fd). I see 3 possibilities:

1. Disable fancy sync code when on uclibc, see https://git.busybox.net/buildroot/commit/?id=d42ca918cc72bb1baf817ee1614d77b5081a7e75
2. Because it is a syscall, add its declaration into busybox like in 
https://www.mail-archive.com/busybox@busybox.net/msg21979.html
3. Or add the declaration to uclibc, like in https://patchwork.ozlabs.org/patch/530573/

Reproducible: Always

Steps to Reproduce:
1. emerge -u1 busybox
2.
3.
Actual Results:  
ebuild failed (compile phase)

Expected Results:  
BusyBox updated on system
Comment 1 René Rhéaume 2015-12-05 19:41:28 UTC
Created attachment 418612 [details]
build.log from emerge
Comment 2 René Rhéaume 2015-12-05 19:42:06 UTC
Created attachment 418614 [details]
emerge --info
Comment 3 Anthony Basile gentoo-dev 2015-12-06 06:07:07 UTC
Yep, I hit it.  I need to get syncfs() into uclibc.  Until then I need to mask =sys-apps/busybox-1.24* on uclibc stages.
Comment 4 Anthony Basile gentoo-dev 2016-01-04 00:29:40 UTC
(In reply to Anthony Basile from comment #3)
> Yep, I hit it.  I need to get syncfs() into uclibc.  Until then I need to
> mask =sys-apps/busybox-1.24* on uclibc stages.

uclibc is in real trouble.  its queue of patches going into master goes back 6 months.  as a result, i can't make sense of what's been submitted and what hasn't for syncfs().  I think several people has submitted something.  uclibc-ng has two patches in for syncfs (the original patch and a fix) plus i submitted a patch for yet another fix which is not in yet.

i'm seriously debating whether or not to switch to uclibc-ng, but I don't know, it would cause a lot of issue.  we'd have to switch from depending on sys-libs/uclibc to virtual/uclibc etc etc.
Comment 5 Joshua Kinard gentoo-dev 2016-01-06 02:02:38 UTC
(In reply to Anthony Basile from comment #4)
> (In reply to Anthony Basile from comment #3)
> > Yep, I hit it.  I need to get syncfs() into uclibc.  Until then I need to
> > mask =sys-apps/busybox-1.24* on uclibc stages.
> 
> uclibc is in real trouble.  its queue of patches going into master goes back
> 6 months.  as a result, i can't make sense of what's been submitted and what
> hasn't for syncfs().  I think several people has submitted something. 
> uclibc-ng has two patches in for syncfs (the original patch and a fix) plus
> i submitted a patch for yet another fix which is not in yet.
> 
> i'm seriously debating whether or not to switch to uclibc-ng, but I don't
> know, it would cause a lot of issue.  we'd have to switch from depending on
> sys-libs/uclibc to virtual/uclibc etc etc.

I like this idea.  Although, I think we would just use virtual/libc instead.  It looks like uclibc-ng and vanilla uclibc are similar enough that most build systems won't be any wiser to the changeout (although, after my recent fun, still would want a full system rebuild/install to be safe).  The end goal would be to dump vanilla uclibc if they don't start showing signs of new development.  Better to stick with something that actually pushes out tested/stable releases periodically than hack-patching a release from 3-4 years ago.

I'd be curious to see if uclibc-ng, being closer to uclibc-upstream, might have decent mips n32 support or not.
Comment 6 Anthony Basile gentoo-dev 2016-04-25 21:40:18 UTC
uclibc-ng is in the tree, and i'm using virtual/libc but i'm not ready to switch yet, because there are some differences that i'm working through.

in the mean time, vapier took <sys-apps/busybox-1.24.1 off the tree, so i'm going to have to unmask busybox and expect people to configure it with CONFIG_SYNC off.  this is going to suck for the stages for a while, but i don't see any way around it until i get the switch done in a couple of months.
Comment 7 Daniel Lanz 2016-04-30 17:23:43 UTC
Hi Gentoo Community!

This might not be the completely appropriate place to ask...
Still, I'd like to build a toolchain based on uclibc-ng. How would I proceed, what would be the CHOST variable for uclibc-ng and how could I create a toolchain with crossdev or similar tools.

Thanks for any info. dan.
Comment 8 Joshua Kinard gentoo-dev 2016-06-02 11:04:21 UTC
(In reply to Anthony Basile from comment #6)
> uclibc-ng is in the tree, and i'm using virtual/libc but i'm not ready to
> switch yet, because there are some differences that i'm working through.
> 
> in the mean time, vapier took <sys-apps/busybox-1.24.1 off the tree, so i'm
> going to have to unmask busybox and expect people to configure it with
> CONFIG_SYNC off.  this is going to suck for the stages for a while, but i
> don't see any way around it until i get the switch done in a couple of
> months.

It looks like one needs to only disable CONFIG_FEATURE_SYNC_FANCY to get around the issue of syncfs() missing.  CONFIG_SYNC can be left on.  Just tested in a mips2/o32 chroot.
Comment 9 René Rhéaume 2016-07-02 11:51:13 UTC
(In reply to Joshua Kinard from comment #8)
> It looks like one needs to only disable CONFIG_FEATURE_SYNC_FANCY to get
> around the issue of syncfs() missing.  CONFIG_SYNC can be left on.  Just
> tested in a mips2/o32 chroot.

This what I proposed as the first possibility in my initial bug report. I personnaly went with option 2, patching busybox. I may add the patch here on request.
Comment 10 Joshua Kinard gentoo-dev 2017-02-05 04:12:31 UTC
(In reply to René Rhéaume from comment #9)
> (In reply to Joshua Kinard from comment #8)
> > It looks like one needs to only disable CONFIG_FEATURE_SYNC_FANCY to get
> > around the issue of syncfs() missing.  CONFIG_SYNC can be left on.  Just
> > tested in a mips2/o32 chroot.
> 
> This what I proposed as the first possibility in my initial bug report. I
> personnaly went with option 2, patching busybox. I may add the patch here on
> request.

Option 3 appears to be the best bet.  This is what uclibc-ng appears to have done, as busybox-1.26.0 compiles fine against uclibc-ng-1.0.20 using both CONFIG_SYNC and CONFIG_FEATURE_SYNC_FANCY.
Comment 11 René Rhéaume 2017-02-05 12:33:55 UTC
(In reply to Joshua Kinard from comment #10)
> Option 3 appears to be the best bet.  This is what uclibc-ng appears to have
> done, as busybox-1.26.0 compiles fine against uclibc-ng-1.0.20 using both
> CONFIG_SYNC and CONFIG_FEATURE_SYNC_FANCY.

I agree. When I personnaly chose patching busybox, I was not on uclibc-ng yet. But now, can we add elibc_uclibc ? ( sys-libs/uclibc-ng ) to DEPEND?
Comment 12 Larry the Git Cow gentoo-dev 2018-01-24 04:31:34 UTC
The bug has been closed via the following commit(s):

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

commit 9450c1fcadc71efcc52b358f3bcb8860417f68c4
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: 2018-01-24 04:30:04 +0000
Commit:     Mike Frysinger <vapier@gentoo.org>
CommitDate: 2018-01-24 04:30:04 +0000

    sys-apps/busybox: turn off some features uClibc omits #567598
    
    Closes: https://bugs.gentoo.org/567598

 sys-apps/busybox/busybox-1.25.1.ebuild    | 6 ++++++
 sys-apps/busybox/busybox-1.26.2-r1.ebuild | 6 ++++++
 sys-apps/busybox/busybox-1.27.2.ebuild    | 6 ++++++
 sys-apps/busybox/busybox-1.28.0.ebuild    | 6 ++++++
 sys-apps/busybox/busybox-9999.ebuild      | 6 ++++++
 5 files changed, 30 insertions(+)