1

i am using ubuntu 12.04 on vmware installed in a windows 7 pc...i was trying to compile linux-2.6.0 source file(downloaded from kernel.org)...i followed the steps as told on the web but there were problems...

so i searched a bit and came across this...i followed the way told in the answer but still after executing the 2nd step, when i move on to execute the 3rd step(make menuconfig) i get the following errors..

make[1]: `scripts/fixdep' is up to date.
HOSTCC  scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91:21: error: static declaration of ‘current_menu’ follows
non-static declaration
scripts/kconfig/lkc.h:63:21: note: previous declaration of ‘current_menu’ was here
scripts/kconfig/mconf.c: In function ‘show_textbox’:
scripts/kconfig/mconf.c:553:7: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result [-Wunused-result]
scripts/kconfig/mconf.c: In function ‘exec_conf’:
scripts/kconfig/mconf.c:225:6: warning: ignoring return value of ‘pipe’, declared with
attribute warn_unused_result [-Wunused-result]
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2

same errors happened when i used make xconfig...please tell me what should be done? thanks in advance.

Community
  • 1
  • 1
AvinashK
  • 3,309
  • 8
  • 43
  • 94
  • What's the reason for using Linux 2.6.0, which is ~9 years old? – Philip Kendall May 31 '12 at 06:05
  • i am studying operating systems and wanted to start with an earlier and hence simple version – AvinashK May 31 '12 at 06:35
  • 1
    The difference between Linux 2.6.0 and Linux 3.2 isn't going to be that significant. – Philip Kendall May 31 '12 at 08:50
  • I very much doubt you'll be able to get 2.6.0 kernel working with the userspace from Ubuntu 12.04. There's no major difference in complexity between 3.x and 2.6.0 so you won't gain anything by studying an old kernel. If anything, study a *small* kernel, like Minix or even Linux 0.x. – pmdj May 31 '12 at 08:59

2 Answers2

4

Here is the answer just get rid of 'static' keyword from 'static struct menu *current_ment' line in scripts/kconfig/mconf.c

HaveF
  • 2,995
  • 2
  • 26
  • 36
1

‘current_menu’ is declared static in mconf.c:91 but not in lkc.h:63, this may not be accepted by gcc of current version,gcc-2.95.3 is recommended according to README in 2.6.0 source,so try to downgrade your gcc version if you REALLY want to compile 2.6.0.

hello.wjx
  • 239
  • 3
  • 13