glibc: install correct stubs (fixes midori crash)
PATCH 1/1 glibc: install correct stubs (fixes midori crash)
Attached patch prevents overwriting of a real stub include file by a dummy stub file. Patch is tested only with the latest glibc from the angstrom.
Dummy stub include causes mis-compilation of undefined number of packages, increment of DISTRO_PR may be considered as useful.
I am not sure, why this line was there. Correct stub file is generated by make install, at least in the current version of glibc.
recipes/glibc/glibc-stage.inc +0 -1
@@ -8,7 +8,6 @@ do_stage() { install -d ${STAGING_INCDIR}/gnu \ ${STAGING_INCDIR}/bits \ ${STAGING_INCDIR}/rpcsvc - install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/ install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/ install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h for r in ${rpcsvc}; do
Review of compilation logs shows that at least following packages are referring stub functions: glib-2.0, coreutils, module-init-tools, openssh, rsync, e2fsprogs, libpcap, pth, python, rxvt-unicode, tar, tcpdump.
Example of mis-compiled package:
midori fails due to GIO mis-compilation. GIO (glib-2.0) incorrectly thinks, that inotify_init1 is implemented. But it is not true on systems compiled with kernel headers < 2.6.27. GIO fails to initialize change notification, which normally never happens.
Note:
Kernel added several new functions since 2.6.23 (e. g. inotify_init1). It would be nice to reflect it somehow: update linux-libc-headers and either keep minimal supported kernel in the build as low as possible (makes a bit slower glibc), move affected packages from platform to machine feeds or create different repos with different minimal kernel version. What do you think about it?
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
Quoted 33 lines · Stanislav Brabec
Attached patch prevents overwriting of a real stub include file by a dummy stub file. Patch is tested only with the latest glibc from the angstrom.
Dummy stub include causes mis-compilation of undefined number of packages, increment of
DISTRO_PRmay be considered as useful.I am not sure, why this line was there. Correct stub file is generated by make install, at least in the current version of glibc.
recipes/glibc/glibc-stage.inc +0
-1@@ -8,7 +8,6 @@ do_stage() { install -d ${STAGING_INCDIR}/gnu \ ${STAGING_INCDIR}/bits \ ${STAGING_INCDIR}/rpcsvc - install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/ install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/ install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h for r in ${rpcsvc}; doReview of compilation logs shows that at least following packages are referring stub functions: glib-2.0, coreutils, module-init-tools, openssh, rsync, e2fsprogs, libpcap, pth, python, rxvt-unicode, tar, tcpdump.
Example of mis-compiled package:
midori fails due to GIO mis-compilation. GIO (glib-2.0) incorrectly thinks, that
inotify_init1is implemented. But it is not true on systems compiled with kernel headers< 2.6.27. GIO fails to initialize change notification, which normally never happens.
Quoted 8 lines
Note:
Kernel added several new functions since 2.6.23 (e. g.
inotify_init1). It would be nice to reflect it somehow: update linux-libc-headers and either keep minimal supported kernel in the build as low as possible (makes a bit slower glibc), move affected packages from platform to machine feeds or create different repos with different minimal kernel version. What do you think about it?
Apply the patch, bump glibc PR and angstrom distro PR.
regards,
Koen
Quoted 3 lines · Stanislav Brabec
Attached patch prevents overwriting of a real stub include file by a dummy stub file. Patch is tested only with the latest glibc from the angstrom.
Hi Stanislav,
Patch 2/3 here fixes it:
http://patchwork.openembedded.org/bundle/msmith%40cbnco.com/glibc_tweaks/
Also cleans some of the other lines that aren't needed.
Mike
Stanislav Brabec
Acked-byQuoted 5 lines · Michael Smith
Quoted 3 lines · Stanislav Brabec
Attached patch prevents overwriting of a real stub include file by a dummy stub file. Patch is tested only with the latest glibc from the angstrom.
Quoted 7 lines
Hi Stanislav,
Patch 2/3 here fixes it:
http://patchwork.openembedded.org/bundle/msmith%40cbnco.com/glibc_tweaks/
Also cleans some of the other lines that aren't needed.
Your patch is better.
And INC_PR seems to be a good idea for any .inc file. I have been thinking about a generic feature setting revision to inc_revision+bb_revision.
Well, I am not a core team member, but you have my ACK. The bug is apparent and debugging of subsequent errors take a lot of time.
________________________________________________________________________
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus