Find the answer to your Linux question:
Results 1 to 8 of 8
hello I tried configuring a kernel source i downloaded and when i went to 'make menuconfig' I was given the following errors. What is the problem? HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c:107:23: error: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    6

    kernel configure error


    hello I tried configuring a kernel source i downloaded and when i went to 'make menuconfig' I was given the following errors. What is the problem?

    HOSTCC scripts/basic/fixdep
    scripts/basic/fixdep.c:107:23: error: sys/types.h: No such file or directory
    scripts/basic/fixdep.c:108:22: error: sys/stat.h: No such file or directory
    scripts/basic/fixdep.c:109:22: error: sys/mman.h: No such file or directory
    scripts/basic/fixdep.c:110:20: error: unistd.h: No such file or directory
    scripts/basic/fixdep.c:111:19: error: fcntl.h: No such file or directory
    scripts/basic/fixdep.c:112:20: error: string.h: No such file or directory
    scripts/basic/fixdep.c:113:20: error: stdlib.h: No such file or directory
    scripts/basic/fixdep.c:114:19: error: stdio.h: No such file or directory
    In file included from /usr/lib/gcc/i486-linux-gnu/4.2.3/include/syslimits.h:7,
    from /usr/lib/gcc/i486-linux-gnu/4.2.3/include/limits.h:11,
    from scripts/basic/fixdep.c:115:
    /usr/lib/gcc/i486-linux-gnu/4.2.3/include/limits.h:122:61: error: limits.h: No such file or directory
    scripts/basic/fixdep.c:116:19: error: ctype.h: No such file or directory
    scripts/basic/fixdep.c:117:23: error: arpa/inet.h: No such file or directory
    scripts/basic/fixdep.c: In function ‘usage’:
    scripts/basic/fixdep.c:131: warning: implicit declaration of function ‘fprintf’
    scripts/basic/fixdep.c:131: warning: incompatible implicit declaration of built-in function ‘fprintf’
    scripts/basic/fixdep.c:131: error: ‘stderr’ undeclared (first use in this function)
    scripts/basic/fixdep.c:131: error: (Each undeclared identifier is reported only once
    scripts/basic/fixdep.c:131: error: for each function it appears in.)
    scripts/basic/fixdep.c:132: warning: implicit declaration of function ‘exit’
    scripts/basic/fixdep.c:132: warning: incompatible implicit declaration of built-in function ‘exit’
    scripts/basic/fixdep.c: In function ‘print_cmdline’:
    scripts/basic/fixdep.c:140: warning: implicit declaration of function ‘printf’
    scripts/basic/fixdep.c:140: warning: incompatible implicit declaration of built-in function ‘printf’
    scripts/basic/fixdep.c: At top level:
    scripts/basic/fixdep.c:143: error: ‘NULL’ undeclared here (not in a function)
    scripts/basic/fixdep.c: In function ‘grow_config’:
    scripts/basic/fixdep.c:156: warning: implicit declaration of function ‘realloc’
    scripts/basic/fixdep.c:156: warning: assignment makes pointer from integer without a cast
    scripts/basic/fixdep.c:158: warning: implicit declaration of function ‘perror’
    scripts/basic/fixdep.c:158: warning: incompatible implicit declaration of built-in function ‘exit’
    scripts/basic/fixdep.c: In function ‘is_defined_config’:
    scripts/basic/fixdep.c:174: warning: implicit declaration of function ‘memcmp’
    scripts/basic/fixdep.c: In function ‘define_config’:
    scripts/basic/fixdep.c:187: warning: implicit declaration of function ‘memcpy’
    scripts/basic/fixdep.c:187: warning: incompatible implicit declaration of built-in function ‘memcpy’
    scripts/basic/fixdep.c: In function ‘use_config’:
    scripts/basic/fixdep.c:206: error: ‘PATH_MAX’ undeclared (first use in this function)
    scripts/basic/fixdep.c:214: warning: incompatible implicit declaration of built-in function ‘memcpy’
    scripts/basic/fixdep.c:220: warning: implicit declaration of function ‘tolower’
    scripts/basic/fixdep.c:222: warning: incompatible implicit declaration of built-in function ‘printf’
    scripts/basic/fixdep.c:206: warning: unused variable ‘s’
    scripts/basic/fixdep.c: At top level:
    scripts/basic/fixdep.c:225: error: expected declaration specifiers or ‘...’ before ‘size_t’
    scripts/basic/fixdep.c: In function ‘parse_config_file’:
    scripts/basic/fixdep.c:227: error: ‘len’ undeclared (first use in this function)
    scripts/basic/fixdep.c:233: warning: implicit declaration of function ‘ntohl’
    scripts/basic/fixdep.c:244: warning: implicit declaration of function ‘isalnum’
    scripts/basic/fixdep.c: In function ‘strrcmp’:
    scripts/basic/fixdep.c:261: warning: implicit declaration of function ‘strlen’
    scripts/basic/fixdep.c:261: warning: incompatible implicit declaration of built-in function ‘strlen’
    scripts/basic/fixdep.c: In function ‘do_config_file’:
    scripts/basic/fixdep.c:272: error: storage size of ‘st’ isn’t known
    scripts/basic/fixdep.c:276: warning: implicit declaration of function ‘open’
    scripts/basic/fixdep.c:276: error: ‘O_RDONLY’ undeclared (first use in this function)
    scripts/basic/fixdep.c:278: warning: incompatible implicit declaration of built-in function ‘fprintf’
    scripts/basic/fixdep.c:278: error: ‘stderr’ undeclared (first use in this function)
    scripts/basic/fixdep.c:280: warning: incompatible implicit declaration of built-in function ‘exit’
    scripts/basic/fixdep.c:282: warning: implicit declaration of function ‘fstat’
    scripts/basic/fixdep.c:284: warning: implicit declaration of function ‘close’
    scripts/basic/fixdep.c:287: warning: implicit declaration of function ‘mmap’
    scripts/basic/fixdep.c:287: error: ‘PROT_READ’ undeclared (first use in this function)
    scripts/basic/fixdep.c:287: error: ‘MAP_PRIVATE’ undeclared (first use in this function)
    scripts/basic/fixdep.c:287: warning: assignment makes pointer from integer without a cast
    scripts/basic/fixdep.c:294: error: too many arguments to function ‘parse_config_file’
    scripts/basic/fixdep.c:296: warning: implicit declaration of function ‘munmap’
    scripts/basic/fixdep.c:272: warning: unused variable ‘st’
    scripts/basic/fixdep.c: At top level:
    scripts/basic/fixdep.c:301: error: expected declaration specifiers or ‘...’ before ‘size_t’
    scripts/basic/fixdep.c: In function ‘parse_dep_file’:
    scripts/basic/fixdep.c:304: error: ‘len’ undeclared (first use in this function)
    scripts/basic/fixdep.c:306: error: ‘PATH_MAX’ undeclared (first use in this function)
    scripts/basic/fixdep.c:308: warning: implicit declaration of function ‘strchr’
    scripts/basic/fixdep.c:308: warning: incompatible implicit declaration of built-in function ‘strchr’
    scripts/basic/fixdep.c:310: warning: incompatible implicit declaration of built-in function ‘fprintf’
    scripts/basic/fixdep.c:310: error: ‘stderr’ undeclared (first use in this function)
    scripts/basic/fixdep.c:311: warning: incompatible implicit declaration of built-in function ‘exit’
    scripts/basic/fixdep.c:313: warning: incompatible implicit declaration of built-in function ‘memcpy’
    scripts/basic/fixdep.c:314: warning: incompatible implicit declaration of built-in function ‘printf’
    scripts/basic/fixdep.c:306: warning: unused variable ‘s’
    scripts/basic/fixdep.c: In function ‘print_deps’:
    scripts/basic/fixdep.c:343: error: storage size of ‘st’ isn’t known
    scripts/basic/fixdep.c:347: error: ‘O_RDONLY’ undeclared (first use in this function)
    scripts/basic/fixdep.c:349: warning: incompatible implicit declaration of built-in function ‘fprintf’
    scripts/basic/fixdep.c:349: error: ‘stderr’ undeclared (first use in this function)
    scripts/basic/fixdep.c:351: warning: incompatible implicit declaration of built-in function ‘exit’
    scripts/basic/fixdep.c:355: warning: incompatible implicit declaration of built-in function ‘fprintf’
    scripts/basic/fixdep.c:359: error: ‘PROT_READ’ undeclared (first use in this function)
    scripts/basic/fixdep.c:359: error: ‘MAP_PRIVATE’ undeclared (first use in this function)
    scripts/basic/fixdep.c:359: warning: assignment makes pointer from integer without a cast
    scripts/basic/fixdep.c:366: error: too many arguments to function ‘parse_dep_file’
    scripts/basic/fixdep.c:343: warning: unused variable ‘st’
    scripts/basic/fixdep.c: In function ‘traps’:
    scripts/basic/fixdep.c:378: warning: incompatible implicit declaration of built-in function ‘fprintf’
    scripts/basic/fixdep.c:378: error: ‘stderr’ undeclared (first use in this function)
    scripts/basic/fixdep.c:380: warning: incompatible implicit declaration of built-in function ‘exit’
    make[1]: *** [scripts/basic/fixdep] Error 1
    make: *** [scripts_basic] Error 2

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    From where your are trying to use menuconfig ,what's your distro. If i'm not wrong menuconfig needs X interface. I would suggest you to read "O'Reilly's "Linux Kernel In A Nutshell - A Desktop Quick Reference" by Greg Kroah-Hartman"

    It's excellent and simple book . Good Luck !
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Quote Originally Posted by Lakshmipathi View Post
    If i'm not wrong menuconfig needs X interface.
    'menuconfig' only needs ncurses. On the otherhand 'xconfig' or 'gconfig' need X.

    Penguin0, you should compile kernel from _inside_ "/usr/src/linux/". Hope you are doing the same. Also, hope you have gcc installed.

    Apart from moving the thread to 'Linux Kernel' as Rubberman suggested, please use 'Code' to wrap such long lines of outputs.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  4. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758

    Smile

    'menuconfig' only needs ncurses. On the otherhand 'xconfig' or 'gconfig' need X.
    thanks saivin for the correcting me.

    you should compile kernel from _inside_ "/usr/src/linux/".
    but in Greg Kroah-Hartman's book , he mentioned not to use /usr/src for compilation.
    In short this what i read :
    "Please don't login as 'root' to perform following activities unless it's required do so. And don't use /usr/src for building kernel. "
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  5. #5
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    you read:
    ...don't use /usr/src for building kernel
    I read:
    ...compile kernel inside /usr/src/linux

    both can be correct... he might have meant to say that we need to compile under linux subdirectory of /usr/src but not directly under it.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  6. #6
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,211
    Linus says you should keep away from the /usr/src area when compiling because:
    1) There are headers there that libc uses and they should match your current working kernel, not experimental ones.
    2) You have to work as root in that tree and, in some distros, this affects the device files.

    He recommends downloading the source tree into your own directory and compiling it there under your own name, then using root access to install it. I did my last kernel compile like that and it worked.

    All those error messages look to me as if you don't have the essential headers installed.
    "I'm just a little old lady; don't try to dazzle me with jargon!"
    www.hrussman.entadsl.com

  7. #7
    Linux User saivin's Avatar
    Join Date
    Dec 2008
    Location
    Bengaluru, India
    Posts
    305
    Ah.. had not heard about it. Good to know. I compiled gentoo and was just following its handbook.

    But we are not hearing anything from OP whether his/her problem is solved or not.
    A candle looses nothing by lighting other candles. - Khalil Zibran.
    Registered Linux User #490076

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,539
    Compiling Gentoo is not quite the same as building your own kernel in a running system. It is part of the installation process. If you got these errors when installing Gentoo, then something broke in the minimal install process. So, please describe what you are trying to do, and how/why you are doing it. Otherwise we will keep giving conflicting advice because we are unclear on the actual situation. TAL.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •