Summary: | sys-libs/glibc-2.15-r2: <bits/syscall.h> uses the wrong value when testing for mips n32 abi. Causes sys-fs/udev-188 build fail. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jim Faulkner <dogshu> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mips |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | MIPS | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 430346 | ||
Attachments: | patch to fix typo |
Description
Jim Faulkner
2012-08-16 19:23:31 UTC
Mips team, Do you have any suggestions for this? I'm not really available for mips stuff at the moment, but my first reaction is to update linux-headers and failing that, glibc. (In reply to comment #2) > I'm not really available for mips stuff at the moment, but my first reaction > is to update linux-headers and failing that, glibc. This is confusing to me, I not sure why its failing. Here's what's going on: 1) we need to get SYS_pivot_root and SYS_gettid into src/shared/missing.h and they're not getting there. 2) trace through the includes for where these #defines come from: src/shared/missing.h include <sys/syscall.h> which includes <asm/unistd.h> provides #define __NR_pivot_root (__NR_Linux + 151) <bits/syscall.h> provides #define SYS_pivot_root __NR_pivot_root 3) asm/unistd.h provides three definitions for __NR_pivot_root, one for o32, another for n64 and the final one for n32. In that order. 4) We want n32, this is triggered by: #if _MIPS_SIM == _MIPS_SIM_NABI32 This is actually succeeding (just add a #warning "HERE"). 5) In the #if of step 4 we have #define __NR_Linux 6000 ... #define __NR_pivot_root (__NR_Linux + 151) 6) So all the pieces are there but it still fails. I'm confused. And yes I counted the number of leading underscores! I must be missing something. Okay I got it, its a typo in /usr/include/bits/syscall.h. Line 367 has #if _MIPS_SIM == _MIPS_SIM_ABIN32 as the test for n32, but, it should be #if _MIPS_SIM == _MIPS_SIM_NABI32 as it is in <asm/unistd.h>. If you change that line, then this bug is gone. I do hit another one: CCLD libsystemd-id128-internal.la CCLD libsystemd-journal.la CC src/shared/libsystemd_dbus_la-dbus-common.lo src/shared/dbus-common.c:28:23: fatal error: dbus/dbus.h: No such file or directory compilation terminated. make[2]: *** [src/shared/libsystemd_dbus_la-dbus-common.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 but that's a different issue. I'll open a bug if it isn't some artifact of my hacking. Changing the summary from: sys-fs/udev-188 on MIPS n32 - In file included from src/shared/util.c:63:0: src/shared/missing.h: In function 'pivot_root': src/shared/missing.h:87:24: error: 'SYS_pivot_root' undeclared (first use in this function) to sys-libs/glibc-2.15-r2: <bits/syscall.h> uses the wrong values when testing for mips n32 abi. Causes sys-fs/udev-188 build fail. (In reply to comment #4) > Okay I got it, its a typo in /usr/include/bits/syscall.h. Line 367 has > > #if _MIPS_SIM == _MIPS_SIM_ABIN32 > > as the test for n32, but, it should be > > #if _MIPS_SIM == _MIPS_SIM_NABI32 > Just to be clear, here it is as a trivial patch which I'll just inline: --- /usr/include/bits/syscall.h.orig 2012-08-22 18:49:35.000000000 +0000 +++ /usr/include/bits/syscall.h 2012-08-22 18:49:43.000000000 +0000 @@ -364,7 +364,7 @@ #define SYS_write __NR_write #define SYS_writev __NR_writev #endif -#if _MIPS_SIM == _MIPS_SIM_ABIN32 +#if _MIPS_SIM == _MIPS_SIM_NABI32 #define SYS_64_Linux __NR_64_Linux #define SYS_64_Linux_syscalls __NR_64_Linux_syscalls #define SYS_Linux __NR_Linux already fixed in glibc-2.16. here's the fix we can apply to 2.15: http://sourceware.org/git/?p=glibc.git;a=commit;h=12139ca306df26046c14c98c6dc13bd15d3071a2 Created attachment 321970 [details, diff] patch to fix typo (In reply to comment #5) > (In reply to comment #4) > > Okay I got it, its a typo in /usr/include/bits/syscall.h. Line 367 has > > > > #if _MIPS_SIM == _MIPS_SIM_ABIN32 > > > > as the test for n32, but, it should be > > > > #if _MIPS_SIM == _MIPS_SIM_NABI32 Nice. Already fixed upstream by the attached patch. > CCLD libsystemd-id128-internal.la
> CCLD libsystemd-journal.la
> CC src/shared/libsystemd_dbus_la-dbus-common.lo
> src/shared/dbus-common.c:28:23: fatal error: dbus/dbus.h: No such file or
> directory
> compilation terminated.
> make[2]: *** [src/shared/libsystemd_dbus_la-dbus-common.lo] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
This "second" issue was just and artifact of what I was doing as I was debugging this bug. Once bits/syscall.h is fixed, udev-188 builds and works fine. Its running on my lemote yeeloong now.
should be all set now in the tree; thanks for the report! Commit message: Add fix from upstream for typo in mips n32 define http://sources.gentoo.org/sys-libs/glibc/glibc-2.15-r2.ebuild?r1=1.20&r2=1.21 |