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

Bug 146152

Summary: net-irc/bitchx-1.1-r1 fails to compile with gcc-4.1.1
Product: Gentoo Linux Reporter: Randall Nortman <gentoobugs>
Component: [OLD] GCC PortingAssignee: Packages in net-irc <net-irc>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2005.1   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: bitchx-1.1-gcc41.patch
emerge --info

Description Randall Nortman 2006-09-03 09:24:36 UTC
I updated to gcc-4.1.1 and when recompiling world, bitchx would not compile.  I set about fixing the errors and found one problem after another.  Mostly the problems were variables declared in a header as extern and then defined in a .c file as static.  In all cases, the variables were used in only one file, and so did not need to be extern, and didn't need to be in the header at all, so I just removed them from the header.  Another error was a conflict with ncurses.h, so I added an #ifdef to fix that.  Then I got to these errors in dll/cavlink/cavlink.c:

./cavlink.c:1334: error: invalid lvalue in assignment
./cavlink.c:1339: error: invalid lvalue in assignment

The lines referred to are assignments to loading_global, which is #defined as a macro in include/modval.h.  That #define is unsuitable for being used as an lvalue, so this needs to be fixed whereever it is used as an lvalue.  A quick grep reveals that there are many such places, and I've spent too much time on this already, so I'll leave that to somebody else.

I'll attach my patch for the errors I managed to fix before I gave up.  It incorporates bitchx-1.1-gcc34.patch, and so should *replace* that patch.  Trying to apply them both will fail.  All of these changes simply fix errors in the code, and so should work with any version of gcc.
Comment 1 Randall Nortman 2006-09-03 09:26:25 UTC
Created attachment 95849 [details, diff]
bitchx-1.1-gcc41.patch

This incorporates and replaces bitchx-1.1-gcc34.patch
Comment 2 Randall Nortman 2006-09-03 09:27:06 UTC
Created attachment 95850 [details]
emerge --info
Comment 3 SpanKY gentoo-dev 2006-09-03 23:01:48 UTC

*** This bug has been marked as a duplicate of 113736 ***