Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 443186

Summary: =sys-kernel/hardened-sources-3.5.4-r1 doesn't build with uclibc
Product: Gentoo Linux Reporter: Alex Brandt (RETIRED) <alunduil>
Component: HardenedAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED UPSTREAM    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Kernel Configuration
Upsream patch to remove useless declarations of stime and utime

Description Alex Brandt (RETIRED) gentoo-dev 2012-11-15 02:34:45 UTC
When building the hardened kernel on a uclibc system (experimental hardened profile and stages) the build results in a symbol collision error.

Reproducible: Always

Steps to Reproduce:
1. Install uclibc stage3 on x86
2. Install hardened-sources and compile them
3. Build errors out
Actual Results:  
mint linux # make -j2 && make -j2 modules_install
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     kernel/config_data.h
make[3]: `arch/x86/realmode/rm/realmode.bin' is up to date.
  CHK     include/linux/version.h
make[2]: Nothing to be done for `all'.
make[2]: Nothing to be done for `relocs'.
  HOSTCC  Documentation/accounting/getdelays
Documentation/accounting/getdelays.c:54:7: error: 'stime' redeclared as different kind of symbol
/usr/include/time.h:308:12: note: previous declaration of 'stime' was here
make[2]: *** [Documentation/accounting/getdelays] Error 1
make[1]: *** [Documentation/accounting] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [vmlinux] Error 2


Expected Results:  
Successful kernel build.

Configuration for the kernel being built (shouldn't make much of an impact) is attached in case it's useful.  Let me know what else I can provide to help track this one down.
Comment 1 Alex Brandt (RETIRED) gentoo-dev 2012-11-15 02:36:57 UTC
Created attachment 329580 [details]
Kernel Configuration
Comment 2 Alex Brandt (RETIRED) gentoo-dev 2012-11-18 02:44:24 UTC
Forgot to mention versions:

* sys-kernel/hardened-sources-3.5.4-r1
* sys-libs/uclibc-0.9.33.2-r2

Let me know if there is anything else I can provide to help track this down.
Comment 3 Anthony Basile gentoo-dev 2012-11-24 13:15:08 UTC
Okay hit it.
Comment 4 Anthony Basile gentoo-dev 2012-11-24 16:45:55 UTC
(In reply to comment #0)
> When building the hardened kernel on a uclibc system (experimental hardened
> profile and stages) the build results in a symbol collision error.
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. Install uclibc stage3 on x86
> 2. Install hardened-sources and compile them
> 3. Build errors out
> Actual Results:  
> mint linux # make -j2 && make -j2 modules_install
> make[1]: Nothing to be done for `all'.
> make[1]: Nothing to be done for `relocs'.
>   CHK     include/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CALL    scripts/checksyscalls.sh
>   CHK     include/generated/compile.h
>   CHK     kernel/config_data.h
> make[3]: `arch/x86/realmode/rm/realmode.bin' is up to date.
>   CHK     include/linux/version.h
> make[2]: Nothing to be done for `all'.
> make[2]: Nothing to be done for `relocs'.
>   HOSTCC  Documentation/accounting/getdelays
> Documentation/accounting/getdelays.c:54:7: error: 'stime' redeclared as
> different kind of symbol
> /usr/include/time.h:308:12: note: previous declaration of 'stime' was here
> make[2]: *** [Documentation/accounting/getdelays] Error 1
> make[1]: *** [Documentation/accounting] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [vmlinux] Error 2
> 
> 
> Expected Results:  
> Successful kernel build.
> 
> Configuration for the kernel being built (shouldn't make much of an impact)
> is attached in case it's useful.  Let me know what else I can provide to
> help track this one down.

Okay I got this fixed.  In a minute I'll be emailing it to lkml and I'll attach it here for further testing.
Comment 5 Anthony Basile gentoo-dev 2012-11-24 16:56:42 UTC
Created attachment 330474 [details, diff]
Upsream patch to remove useless declarations of stime and utime
Comment 6 Anthony Basile gentoo-dev 2012-11-24 17:07:33 UTC
This is not hardened specific, so I'm dropping hardened@ and sending it kernel@'s way.

@Alex.  Do you mind testing the patch.  Just apply it to the kernel tree, whether dirty or not, and continue building with `make -j2`.
Comment 7 Anthony Basile gentoo-dev 2012-11-26 20:09:46 UTC
The patch was accepted upstream:

    http://www.spinics.net/lists/linux-doc/msg07380.html