New: [2018.08] SysV IPC not available for fakeroot on WSL
https://bugs.busybox.net/show_bug.cgi?id=11366
Bug ID: 11366
Summary: [2018.08] SysV IPC not available for fakeroot on WSL
Product: buildroot
Version: unspecified
Hardware: PC
OS: Windows
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: jfdoyon at gmail.com
CC: buildroot at uclibc.org
Target Milestone: ---
When using Ubuntu on Windows Susbsystem for Linux (WSL) as your host build environment, the process fails on the execution of "fakeroot", with an error message to the effect that "fakeroot has failed due to SysV IPC not being available".
This is indeed correct, as the WSL system doesn't have the functionality.
A WSL bug has been filed: https://github.com/Microsoft/WSL/issues/2465
The workaround is to copy/link the host /usr/bin/fakeroot-tcp into the builroot host output, and re-run, it then succeeds no problem.
Suggestion: detect availability of SysV IPC and/or TCP, and build/use the appropriate fakeroot. If the host doesn't have either facility available, warn early (instead of finding out at the very end of a possibly long compilation run).
Thanks,
J.F.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
https://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #1 from Thomas Petazzoni <[email protected]> --- Thanks for the bug report. I'd say this is something that should be improved in fakeroot configure script itself: it should detect if SysV IPC is available or not, and fallback to TCP if not.
Is this something you could have a look at ?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #2 from J.F. <[email protected]> ---
I'll give it a try!
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #3 from J.F. <[email protected]> ---
findings so far:
OK, so WSL does have some SysV IPC, but no message Q's, which is the feature needed by fakeroot/faked by default.
The cleanest way to test this appears to be to use the ipcmk utility provided by the host util-linux package ... only if the user selects the host util package in his config however. If ipcmk -Q returns 1, use TCP.
Also, the fakeroot package builds sysv OR tcp. In order to support both, you run 2 builds, presumably configured as two packages. Ideally, you would build only one, based on the availability opf message Qs, if at all possible.
So one option is to force the host-util-linux package with most programs (force the relevant BR2 option on, or mor eprecisely, remove the option and always have it on), and then re-package 2 fakeroots and then use ipcmk at run time to select the right fakeroot.
Another might be to simply give users the ability to select "TCP Fakeroot" in their config via a BR2 variable. Since this is an edge case, it seems it might be simpler to just do it that way, not unlike the way the host OpenSSL and libelf requirements exist for the kernel.
Since this dependency is on a kernel system call, there's no clean way to simply patch the existing fakeroot package and configure script ONLY, as Thomas suggested. Maybe I could patch the configure script to use ipcmk however ... ? I know *nothing* about how to work with autoconf however :P Because normally you would build this tool as part of a distro on a separate host, dynamic detection of IPC Message Q's would be of limited value "upstream" to the fakeroot developers anyways ...
I think i would tend towards providing a user selectable config for "TCP fakeroot" as a my favourite solution.
Thoughts?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #4 from J.F. <[email protected]> ---
Wait, I lied you can write custom tests in autoconf to test the actual presence of a function ... I can see whether I can get a handle on that ... although a user option still seems much simpler :)
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #5 from Thomas Petazzoni <[email protected]> --- Please don't use ipcmk, as requiring to build host-util-linux is clearly not nice.
Instead, we want a simple test program in C, that will be compiled/executed by fakeroot configure.ac script, to decide whether SysV message queues or TCP should be used. You can use autoconf AC_TRY_RUN() to achieve this.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #6 from J.F. <[email protected]> --- Created attachment 7791
--> https://bugs.busybox.net/attachment.cgi?id=7791&action=edit
Proposed patch for configure.ac
Add a check to the configure script to test whether SysV IPC message queues are actually functional. Fall back to TCP if not.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #7 from J.F. <[email protected]> --- Created attachment 7796
--> https://bugs.busybox.net/attachment.cgi?id=7796&action=edit
New fakeroot makefile
The new fakeroot makefile, which handles running autoreconf to re-generate the configure script after patch 0003 has been applied.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #8 from J.F. <[email protected]> ---
See recently attached files.
This will need to be tested on a normally functioning linux host with SysV IPC Message Q's running. Notably, use ipcs to make sure the message Q is cleaned up properly after the test. The code is there and quite simple, but I can't test it.
Also, the autoreconf setup is a little out of the ordinary, due to some out-of-the ordinary libtool requirements by fakeroot it seems.
This now works cleanly on current Ubuntu for WSL.
Let me know if you have more suggestions for improvements?
Cheers,
J.F.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
J.F. <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at buildroot.uclibc |jfdoyon at gmail.com
|.org |
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
J.F. <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
J.F. <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #7796|0 |1
is obsolete| |
--- Comment #9 from J.F. <[email protected]> --- Created attachment 7801
--> https://bugs.busybox.net/attachment.cgi?id=7801&action=edit
Improved fakeroot makefile
Improved makefile, added some missing package dependencies.
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
Thomas Petazzoni <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|jfdoyon at gmail.com |yann.morin.1998 at free.fr
--- Comment #10 from Thomas Petazzoni <[email protected]> --- J.F, could you send a proper Buildroot patch on the mailing list, which includes the fakeroot source code changes and the fakeroot.mk changes, all with a proper description ?
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
--- Comment #11 from Peter Korsgaard <[email protected]> ---
Or even better, send the patch to upstream fakeroot and get it included there
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.
[Buildroot] [Bug 11366] [2018.08] SysV IPC not available for fakeroot on WSL
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=11366
Peter Korsgaard <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED--- Comment #12 from Peter Korsgaard <[email protected]> --- Fixed by:
https://git.buildroot.org/buildroot/commit/?id=fd1bcce9894773d7e1c1ca5be0f04b0b32128a1d
commit fd1bcce9894773d7e1c1ca5be0f04b0b32128a1d
Author: Matt Weber <[email protected]> Date: Mon Sep 16 22:58:14 2019 -0500
package/fakeroot: test for SYSV IPC support
fakeroot can be built to either use SYSV IPC or TCP for message passing.
A bug was discovered where Microsoft Windows 10 Services for Linux doesn't include support for SYSV IPC MsgQ. This patch adds support to detect this case and automatically build fakeroot to use the TCP transport instead (It is assumed a TCP transport would definitely have more overhead then MsgQs so the default wasn't changed to TCP).
Fixes
https://bugs.busybox.net/show_bug.cgi?id=11366
Signature · 2 lines
You are receiving this mail because: You are on the CC list for the bug.