LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware 11:0: Error in Compiling 2.6 kernel (http://www.linuxquestions.org/questions/slackware-14/slackware-11-0-error-in-compiling-2-6-kernel-655880/)

Cire_08 07-15-2008 08:29 AM

Slackware 11:0: Error in Compiling 2.6 kernel
 
Hello guys,

Im very new in LInux system and this is my first installation for the same. I encountered an error while in the process of compiling 2.6 kernel after I entered the command "make menuconfig". Pls find the procedures that i had done:

1. cd /usr/src
2. wget http://www.kernel.org/pub/linux/kern...6.17.11.tar.gz
3. gunzip linux-2.6.17.11.tar.gz
4. tar xvf linux-2.6.17.11.tar
5. mv -f /usr/src/linux /usr/src/linux-old
6. ln -s /usr/src/linux-2.6.17.11 /usr/src/linux
7. cd linux
8. make mrproper # prep for kernel assembly
9. make menuconfig

Here is the error:

root@phone:/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:105:23: sys/types.h: No such file or directory
scripts/basic/fixdep.c:106:22: sys/stat.h: No such file or directory
scripts/basic/fixdep.c:107:22: sys/mman.h: No such file or directory
scripts/basic/fixdep.c:108:20: unistd.h: No such file or directory
scripts/basic/fixdep.c:109:19: fcntl.h: No such file or directory
scripts/basic/fixdep.c:110:20: string.h: No such file or directory
scripts/basic/fixdep.c:111:20: stdlib.h: No such file or directory
scripts/basic/fixdep.c:112:19: stdio.h: No such file or directory
In file included from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/syslimits. h:7,
from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:1 1,
from scripts/basic/fixdep.c:113:
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:122:61: limits.h: No su ch file or directory
scripts/basic/fixdep.c:114:19: ctype.h: No such file or directory
scripts/basic/fixdep.c:115:23: arpa/inet.h: No such file or directory
scripts/basic/fixdep.c: In function `usage':
scripts/basic/fixdep.c:129: warning: implicit declaration of function `fprintf'
scripts/basic/fixdep.c:129: error: `stderr' undeclared (first use in this functi on)
scripts/basic/fixdep.c:129: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:129: error: for each function it appears in.)
scripts/basic/fixdep.c:130: warning: implicit declaration of function `exit'
scripts/basic/fixdep.c: In function `print_cmdline':
scripts/basic/fixdep.c:138: warning: implicit declaration of function `printf'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:141: error: `NULL' undeclared here (not in a function)
scripts/basic/fixdep.c: In function `grow_config':
scripts/basic/fixdep.c:154: warning: implicit declaration of function `realloc'
scripts/basic/fixdep.c:154: warning: assignment makes pointer from integer witho ut a cast
scripts/basic/fixdep.c:156: warning: implicit declaration of function `perror'
scripts/basic/fixdep.c: In function `is_defined_config':
scripts/basic/fixdep.c:172: warning: implicit declaration of function `memcmp'
scripts/basic/fixdep.c: In function `define_config':
scripts/basic/fixdep.c:185: warning: implicit declaration of function `memcpy'
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:204: error: `PATH_MAX' undeclared (first use in this func tion)
scripts/basic/fixdep.c:218: warning: implicit declaration of function `tolower'
scripts/basic/fixdep.c:204: warning: unused variable `s'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:223: error: syntax error before "size_t"
scripts/basic/fixdep.c:224: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:225: error: `map' undeclared (first use in this function)
scripts/basic/fixdep.c:225: error: `len' undeclared (first use in this function)
scripts/basic/fixdep.c:231: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c:242: warning: implicit declaration of function `isalnum'
scripts/basic/fixdep.c: In function `strrcmp':
scripts/basic/fixdep.c:255: warning: implicit declaration of function `strlen'
scripts/basic/fixdep.c: In function `do_config_file':
scripts/basic/fixdep.c:266: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:270: warning: implicit declaration of function `open'
scripts/basic/fixdep.c:270: error: `O_RDONLY' undeclared (first use in this func tion)
scripts/basic/fixdep.c:272: error: `stderr' undeclared (first use in this functi on)
scripts/basic/fixdep.c:276: warning: implicit declaration of function `fstat'
scripts/basic/fixdep.c:278: warning: implicit declaration of function `close'
scripts/basic/fixdep.c:281: warning: implicit declaration of function `mmap'
scripts/basic/fixdep.c:281: error: `PROT_READ' undeclared (first use in this fun ction)
scripts/basic/fixdep.c:281: error: `MAP_PRIVATE' undeclared (first use in this f unction)
scripts/basic/fixdep.c:281: warning: assignment makes pointer from integer witho ut a cast
scripts/basic/fixdep.c:290: warning: implicit declaration of function `munmap'
scripts/basic/fixdep.c:266: warning: unused variable `st'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:295: error: syntax error before "size_t"
scripts/basic/fixdep.c:296: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:297: error: `map' undeclared (first use in this function)
scripts/basic/fixdep.c:298: error: `len' undeclared (first use in this function)
scripts/basic/fixdep.c:300: error: `PATH_MAX' undeclared (first use in this func tion)
scripts/basic/fixdep.c:302: warning: implicit declaration of function `strchr'
scripts/basic/fixdep.c:304: error: `stderr' undeclared (first use in this functi on)
scripts/basic/fixdep.c:300: warning: unused variable `s'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:337: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:341: error: `O_RDONLY' undeclared (first use in this func tion)
scripts/basic/fixdep.c:343: error: `stderr' undeclared (first use in this functi on)
scripts/basic/fixdep.c:353: error: `PROT_READ' undeclared (first use in this fun ction)
scripts/basic/fixdep.c:353: error: `MAP_PRIVATE' undeclared (first use in this f unction)
scripts/basic/fixdep.c:353: warning: assignment makes pointer from integer witho ut a cast
scripts/basic/fixdep.c:337: warning: unused variable `st'
scripts/basic/fixdep.c: In function `traps':
scripts/basic/fixdep.c:372: error: `stderr' undeclared (first use in this functi on)
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
root@phone:/usr/src/linux#


Any suggestion and advice is highly appreciated.

Thanks and regards,

trickykid 07-15-2008 12:29 PM

Seems the fixdep.c file is referenced alot, maybe corrupt or bad download. Does it exist in that location? Can you run a make xconfig? What happens if you use your existing .config from your old kernel installed?

Cire_08 07-15-2008 08:25 PM

Hi Trickykid,

Thanks for your prompt reply.
I searched "fixdep.c" and resulted me nothing or it doesn't exist. Yes your right, while im doing the installation, it prompted me an error of corrupted file something like that. (this error prompted me once but unfortunately i didn't note it)

As per your advice of running make xconfig command:

root@sdfasd:/usr/src/linux# make xconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:105:23: sys/types.h: No such file or directory
scripts/basic/fixdep.c:106:22: sys/stat.h: No such file or directory
scripts/basic/fixdep.c:107:22: sys/mman.h: No such file or directory
scripts/basic/fixdep.c:108:20: unistd.h: No such file or directory
scripts/basic/fixdep.c:109:19: fcntl.h: No such file or directory
scripts/basic/fixdep.c:110:20: string.h: No such file or directory
scripts/basic/fixdep.c:111:20: stdlib.h: No such file or directory
scripts/basic/fixdep.c:112:19: stdio.h: No such file or directory
In file included from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/syslimits.h:7,
from /usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/lib/gcc/i486-slackware-linux/3.4.6/include/limits.h:122:61: limits.h: No such file or directory
scripts/basic/fixdep.c:114:19: ctype.h: No such file or directory
scripts/basic/fixdep.c:115:23: arpa/inet.h: No such file or directory
scripts/basic/fixdep.c: In function `usage':
scripts/basic/fixdep.c:129: warning: implicit declaration of function `fprintf'
scripts/basic/fixdep.c:129: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:129: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:129: error: for each function it appears in.)
scripts/basic/fixdep.c:130: warning: implicit declaration of function `exit'
scripts/basic/fixdep.c: In function `print_cmdline':
scripts/basic/fixdep.c:138: warning: implicit declaration of function `printf'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:141: error: `NULL' undeclared here (not in a function)
scripts/basic/fixdep.c: In function `grow_config':
scripts/basic/fixdep.c:154: warning: implicit declaration of function `realloc'
scripts/basic/fixdep.c:154: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:156: warning: implicit declaration of function `perror'
scripts/basic/fixdep.c: In function `is_defined_config':
scripts/basic/fixdep.c:172: warning: implicit declaration of function `memcmp'
scripts/basic/fixdep.c: In function `define_config':
scripts/basic/fixdep.c:185: warning: implicit declaration of function `memcpy'
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:204: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:218: warning: implicit declaration of function `tolower'
scripts/basic/fixdep.c:204: warning: unused variable `s'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:223: error: syntax error before "size_t"
scripts/basic/fixdep.c:224: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_config_file':
scripts/basic/fixdep.c:225: error: `map' undeclared (first use in this function)
scripts/basic/fixdep.c:225: error: `len' undeclared (first use in this function)
scripts/basic/fixdep.c:231: warning: implicit declaration of function `ntohl'
scripts/basic/fixdep.c:242: warning: implicit declaration of function `isalnum'
scripts/basic/fixdep.c: In function `strrcmp':
scripts/basic/fixdep.c:255: warning: implicit declaration of function `strlen'
scripts/basic/fixdep.c: In function `do_config_file':
scripts/basic/fixdep.c:266: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:270: warning: implicit declaration of function `open'
scripts/basic/fixdep.c:270: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:272: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:276: warning: implicit declaration of function `fstat'
scripts/basic/fixdep.c:278: warning: implicit declaration of function `close'
scripts/basic/fixdep.c:281: warning: implicit declaration of function `mmap'
scripts/basic/fixdep.c:281: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:281: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:281: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:290: warning: implicit declaration of function `munmap'
scripts/basic/fixdep.c:266: warning: unused variable `st'
scripts/basic/fixdep.c: At top level:
scripts/basic/fixdep.c:295: error: syntax error before "size_t"
scripts/basic/fixdep.c:296: warning: function declaration isn't a prototype
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:297: error: `map' undeclared (first use in this function)
scripts/basic/fixdep.c:298: error: `len' undeclared (first use in this function)
scripts/basic/fixdep.c:300: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:302: warning: implicit declaration of function `strchr'
scripts/basic/fixdep.c:304: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:300: warning: unused variable `s'
scripts/basic/fixdep.c: In function `print_deps':
scripts/basic/fixdep.c:337: error: storage size of 'st' isn't known
scripts/basic/fixdep.c:341: error: `O_RDONLY' undeclared (first use in this function)
scripts/basic/fixdep.c:343: error: `stderr' undeclared (first use in this function)
scripts/basic/fixdep.c:353: error: `PROT_READ' undeclared (first use in this function)
scripts/basic/fixdep.c:353: error: `MAP_PRIVATE' undeclared (first use in this function)
scripts/basic/fixdep.c:353: warning: assignment makes pointer from integer without a cast
scripts/basic/fixdep.c:337: warning: unused variable `st'
scripts/basic/fixdep.c: In function `traps':
scripts/basic/fixdep.c:372: error: `stderr' undeclared (first use in this function)
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2


Error from my existing kernel:

root@sdfasd:/usr/src/linux-old# make menuconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
make -C scripts/lxdialog all
make[1]: Entering directory `/usr/src/linux-2.4.33.3/scripts/lxdialog'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../../i486-slackware-linux/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status

>> Unable to find the Ncurses libraries.
>>
>> You must have Ncurses installed in order
>> to use 'make menuconfig'

make[1]: *** [ncurses] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.33.3/scripts/lxdialog'
make: *** [menuconfig] Error 2


Please direct me any link to download the corrupted file.

regards,

gnashley 07-16-2008 02:13 AM

menuconfig needs ncurses and tcl installed, but it seems to me you are missing your glibc libraries -I mean the full version, not the glibc-solibs package.

Cire_08 07-16-2008 05:54 AM

hi gnashley and trickykid,

First of all i would like to thank you guys for your time and effort answering my inquiries.

Until now, im really struggling to resolve this problem. I searched in the website where i can download the glibc (GNU C libraries) http://packages.slackware.it/package...c-2.3.6-i486-6

Kindly check if this is the full version that you had mentioned. If this is the right file. Pls pls guide me how to install it and into which directory to be put in. I'm really sorry because im just new in Linux.. im just starting to learn it.

thanks for your untiring support.

bgeddy 07-16-2008 08:29 AM

Quote:

I searched in the website where i can download the glibc (GNU C libraries) http://packages.slackware.it/package...c-2.3.6-i486-6

Kindly check if this is the full version that you had mentioned. If this is the right file. Pls pls guide me how to install it and into which directory to be put in.
That looks like the correct Slackware 11 glibc-2.3.6-i486-6.tgz. However the package should be on your original Slackware disc(s). Also note that Slackware 11 comes with the 2.6.17.13 kernel with it's source on the original installation media in the /extra/ directory. I suppose you could have defects on your media but, if you burnt them yourself, you did verify the burn and the md5sum of the download didn't you ?

Quote:

Yes your right, while im doing the installation, it prompted me an error of corrupted file something like that. (this error prompted me once but unfortunately i didn't note it)
If you get an error while installing or extracting source files etc it's very important that you make a note of it any find out what's going wrong. Such errors should never be ignored or bad things can happen.

Anyway - to reinstall glibc download the file to a temporary folder, say ~/glibc/ and from the command prompt:

Code:

cd ~/glibc
telinit 1
su -c "upgradepkg --reinstall glibc-2.3.6-i486-6.tgz"
telinit 3

Not sure if the "telinit 1" - going to single user mode, is strictly needed but it won't hurt.

Cire_08 07-16-2008 10:49 PM

hi bgeddy,

Thank you very much.. i followed your instructions and it works fine..

thank you all!


All times are GMT -5. The time now is 03:41 PM.