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

Bug 253786

Summary: sys-devel/distcc-3*: build fails with -D_FORTIFY_SOURCE=2 (patch supplied)
Product: Gentoo Linux Reporter: Kevin Pyle <gentoo.8eaf7cd8e5128d8191fe>
Component: [OLD] Core systemAssignee: MATSUU Takuto (RETIRED) <matsuu>
Status: RESOLVED FIXED    
Severity: normal CC: hp-cluster
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 259417    
Attachments: Patch for src/snprintf.h to include config.h so that it does not declare snprintf unnecessarily

Description Kevin Pyle 2009-01-04 21:46:34 UTC
Header src/snprintf.h declares prototypes for snprintf and friends if configure did not detect that the system provides them.  When -D_FORTIFY_SOURCE=2 is passed, these symbols are mangled by macro magic in the system headers.  The configure script correctly detects that the Linux system headers provide these symbols.  The problem is that src/emaillog.c indirectly includes src/snprintf.h without ever including config.h.  Thus, the conditional tests performed in src/snprintf.h incorrectly decide to include the distcc-supplied prototypes, causing the build to fail.  The fix is simple: always have config.h included before src/snprintf.h checks the configure-created conditionals.  I will attach a patch that does this.

This bug is filed as "Core system" since the description says that ebuilds for sys-*/ go in "Core system".

Both sys-devel/distcc-3.04 and sys-devel/distcc-3.1 are affected, and the patch applies cleanly to both versions.
Comment 1 Kevin Pyle 2009-01-04 21:47:51 UTC
Created attachment 177411 [details, diff]
Patch for src/snprintf.h to include config.h so that it does not declare snprintf unnecessarily
Comment 2 MATSUU Takuto (RETIRED) gentoo-dev 2009-02-10 00:09:41 UTC
fixed in cvs. thanks