Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 206343 - [gcc-4.3] smartmontools-5.37 build failure
Summary: [gcc-4.3] smartmontools-5.37 build failure
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.3
  Show dependency tree
 
Reported: 2008-01-17 15:12 UTC by Devils-Hawk
Modified: 2008-01-17 18:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
gcc-4.3.0 patch for smartmontools-5.37 (smartmontools-gcc43.patch,517 bytes, patch)
2008-01-17 15:15 UTC, Devils-Hawk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devils-Hawk 2008-01-17 15:12:33 UTC
Redefining a #define is an hard error in C++ now (not in C because the standards differ). gcc-4.3.0 tries to conform => smartmontools do not like that.
Attached patch should fix the compile. I think it preserves behaviour but it should be noted that 1 line above the fix, the old value of the define is used than the redefinition happens and then the new value is used. I do not have any clue how the preprocessor handles this but i assumed it uses the new value only from the point of redefinition onwards.

Reproducible: Always
Comment 1 Devils-Hawk 2008-01-17 15:15:31 UTC
Created attachment 141142 [details, diff]
gcc-4.3.0 patch for smartmontools-5.37
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2008-01-17 18:29:42 UTC
Current GCC svn reverts the change that made redefinitions errors.  See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24924.  Any checkout after -r131530 (14 Jan 2008) will work.  Thanks for the patch though. :)