<<< Date Index >>>     <<< Thread Index >>>

mutt/2062: version 1.4.2.1i fails to compile with gcc-4.0



>Number:         2062
>Notify-List:    
>Category:       mutt
>Synopsis:       version 1.4.2.1i fails to compile with gcc-4.0
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    mutt-dev
>State:          open
>Keywords:       
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 10 15:35:12 +0200 2005
>Originator:     Sharninder
>Release:        1.4.2.1i
>Organization:
>Environment:
debian linux ia32
>Description:
make install exits with the following message:

gcc -DPKGDATADIR=\"/usr/local/share/mutt\" -DSYSCONFDIR=\"/usr/local/etc\"     
-DBINDIR=\"/usr/local/bin\" -DMUTTLOCALEDIR=\"/usr/local/share/locale\"  
-DHAVE_CONFIG_H=1 -I. -I.  -Iintl  -I./intl -I/usr/local/include  -Wall 
-pedantic -g -O2 -c addrbook.c
In file included from mutt_menu.h:23,
                 from addrbook.c:20:
keymap.h:83: error: array type has incomplete element type
addrbook.c: In function 'mutt_alias_menu':
addrbook.c:166: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
addrbook.c:235: warning: dereferencing type-punned pointer will break 
strict-aliasing rules
make[2]: *** [addrbook.o] Error 1
make[2]: Leaving directory `/home/sharninder/mutt-1.4.2.1'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sharninder/mutt-1.4.2.1'
make: *** [all-recursive-am] Error 2
>How-To-Repeat:
tar xvf mutt-1.4.2.1.tar
cd mutt-1.4.2.1
./configure
make install
>Fix:
gcc-4.0 has changed the way arrays of structures could be created. To compile 
with gcc-4.0, following line has the changed in keymap.h:83 from:

extern struct mapping_t Menus[];

to 

extern struct mapping_t *Menus;

Also change the following in keymap.c:31 from:

struct mapping_t Menus[] ...

to 

struct mapping_t *Menus ...

>Add-To-Audit-Trail:

>Unformatted: