Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLUTION ??] error: static declaration of 'current_menu'
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
davidgurvich
Veteran
Veteran


Joined: 23 Apr 2004
Posts: 1063

PostPosted: Thu Dec 01, 2005 6:07 am    Post subject: [SOLUTION ??] error: static declaration of 'current_menu' Reply with quote

error: static declaration of 'current_menu' follows non-static declaration

This error occurs on PPC and perhaps other arch when gcc-4.0.2 is used with many packages. There is a conflict where lkc.h and mconf.c both declare 'current_menu' that gcc-3.X.X simply ignored but gcc-4 does not. The proposed solution comes from this link http://uclibc.org/lists/uclibc/2005-July/012187.html, where the further discussion suggests alternative solutions. However, here is the simplest to implement. I don't know what problems it may cause, good luck.

The solution is a workaround that requires changing the declaration in one file from 'static struct' to 'struct'.
The following example is for mac-on-linux, but should work for many packages.

cd /usr/portage/app-emulation/mol
ebuild mol-0.9.71_pre3 unpack
cd /var/tmp/portage/mol-0.9.71_pre3/work/mol-0.9.71_pre3/config/kconfig/

####Modify the file mconf.c####
static struct termios ios_org;
static int rows, cols;
-static struct menu *current_menu;
+struct menu *current_menu;
static int child_count;
static int do_resize;

cd /usr/portage/app-emulation/mol
ebuild mol-0.9.71_pre3 merge
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Dec 01, 2005 3:29 pm    Post subject: Reply with quote

The suggested fix is indeed the fix required. I *really* recommend using a ~ppc version of MOL they already contain this fix, the stable ones are pretty out of date. If you find other packages with this problem, feel free to make a bug in bugzilla. Not too many devs read the forums.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum