# "make menuconfig" fails [SOLVED]

## Darkshine

I run "make menuconfig" and it fails:

```

19:09:31 [3]root@primula:/usr/src/linux>make menuconfig

  HOSTCC  scripts/basic/fixdep

  HOSTCC  scripts/basic/docproc

  HOSTCC  scripts/kconfig/conf.o

scripts/kconfig/conf.c: In function 'conf_sym':

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

scripts/kconfig/conf.c:258: warning: cast from pointer to integer of different size

  HOSTCC  scripts/kconfig/kxgettext.o

scripts/kconfig/kxgettext.c: In function 'message__new':

scripts/kconfig/kxgettext.c:100: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:100: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c: In function 'mesage__find':

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

scripts/kconfig/kxgettext.c:121: warning: cast from pointer to integer of different size

  HOSTCC  scripts/kconfig/lxdialog/checklist.o

  HOSTCC  scripts/kconfig/lxdialog/inputbox.o

  HOSTCC  scripts/kconfig/lxdialog/menubox.o

  HOSTCC  scripts/kconfig/lxdialog/textbox.o

  HOSTCC  scripts/kconfig/lxdialog/util.o

scripts/kconfig/lxdialog/util.c: In function 'set_theme':

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:162: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:164: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:166: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:168: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c: In function 'print_button':

scripts/kconfig/lxdialog/util.c:382: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:382: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:382: warning: cast from pointer to integer of different size

scripts/kconfig/lxdialog/util.c:382: warning: cast from pointer to integer of different size

  HOSTCC  scripts/kconfig/lxdialog/yesno.o

  HOSTCC  scripts/kconfig/mconf.o

  HOSTCC  scripts/kconfig/zconf.tab.o

In file included from scripts/kconfig/zconf.tab.c:159:

scripts/kconfig/zconf.hash.c: In function 'kconf_id_lookup':

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.hash.c:235: warning: cast from pointer to integer of different size

In file included from scripts/kconfig/zconf.tab.c:2340:

scripts/kconfig/util.c: In function 'file_lookup':

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:17: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:23: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:23: warning: cast from pointer to integer of different size

scripts/kconfig/util.c: In function 'str_assign':

scripts/kconfig/util.c:70: warning: cast from pointer to integer of different size

scripts/kconfig/util.c:70: warning: cast from pointer to integer of different size

In file included from scripts/kconfig/zconf.tab.c:2341:

scripts/kconfig/confdata.c: In function 'conf_read_simple':

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:159: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:246: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:261: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:261: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c: In function 'conf_read':

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:334: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c: In function 'conf_write':

scripts/kconfig/confdata.c:479: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:479: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:479: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:479: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c: In function 'conf_split_config':

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:573: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c: In function 'conf_write_autoconf':

scripts/kconfig/confdata.c:717: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:717: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:717: warning: cast from pointer to integer of different size

scripts/kconfig/confdata.c:717: warning: cast from pointer to integer of different size

In file included from scripts/kconfig/zconf.tab.c:2342:

scripts/kconfig/expr.c: In function 'expr_calc_value':

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:971: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

scripts/kconfig/expr.c:977: warning: cast from pointer to integer of different size

In file included from scripts/kconfig/zconf.tab.c:2343:

scripts/kconfig/symbol.c: In function 'sym_validate_range':

scripts/kconfig/symbol.c:190: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:190: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c: In function 'sym_set_string_value':

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:606: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c: In function 'sym_lookup':

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:666: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:672: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:672: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c: In function 'sym_find':

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/symbol.c:712: warning: cast from pointer to integer of different size

scripts/kconfig/zconf.tab.c: At top level:

scripts/kconfig/lex.zconf.c:1623: warning: 'input' defined but not used

  HOSTLD  scripts/kconfig/mconf

collect2: ld terminated with signal 11 [Segmentation fault], core dumped

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/mconf.o' is incompatible with i386 output

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/zconf.tab.o' is incompatible with i386 output

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/lxdialog/checklist.o' is incompatible with i386 output

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/lxdialog/util.o' is incompatible with i386 output

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/lxdialog/inputbox.o' is incompatible with i386 output

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/lxdialog/textbox.o' is incompatible with i386 output

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/lxdialog/yesno.o' is incompatible with i386 output

/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/lxdialog/menubox.o' is incompatible with i386 output

distcc[22251] ERROR: compile (null) on localhost failed

make[1]: *** [scripts/kconfig/mconf] Error 1

make: *** [menuconfig] Error 2

```

I'm using kernel 2.6.20-r10. Previously I had built it in 20 Dec 2008 with:

```
gcc: i386-pc-linux-gnu-3.4.*

CHOST="i386-pc-linux-gnu"

CFLAGS="-O2 -mcpu=i686 -pipe"

CXXFLAGS="-O2 -mtune=i686 -pipe"

profile was something like "default/linux/x86/2006.0/no-nptl"

```

after that I updated gcc using http://www.gentoo.org/doc/en/gcc-upgrading.xml , changed profile, corrected CHOST variable in the /etc/make.conf, changed another variables in the make.conf and today I have:

```
gcc: i686-pc-linux-gnu-4.3.2

ARCH="x86"

CHOST="i686-pc-linux-gnu"

CFLAGS="-O2 -mtune=i686 -march=i686 -pipe"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j9"

FEATURES="sandbox sfperms distcc"

profile: default/linux/x86/2008.0/server

```

note that when re-building "system" and "world" I used distcc with crossdev - another machine with architecture x86_64 and with  compiler "i686-pc-linux-gnu-4.3.2" worked in pair with my "problem" machine to rebuild that goals. Once I had gotten above error with "make menuconfig" I stopped distccd daemons, re-created gcc, binutils, libtool, glibc, zlib and "system", but problem still occurs.

P.S. Here is a stack trace:

```

19:31:36 [3]root@primula:/usr/src/linux>gdb `which ld` core

GNU gdb 6.8

Copyright (C) 2008 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "i686-pc-linux-gnu"...

(no debugging symbols found)

warning: Can't read pathname for load map: Input/output error.

Reading symbols from /usr/lib/binutils/i686-pc-linux-gnu/2.19/libbfd-2.19.so...(no debugging symbols found)...done.

Loaded symbols for /usr/lib/binutils/i686-pc-linux-gnu/2.19/libbfd-2.19.so

Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.

Loaded symbols for /lib/libz.so.1

Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.

Loaded symbols for /lib/libc.so.6

Reading symbols from /lib/ld-linux.so.2...

(no debugging symbols found)...done.

Loaded symbols for /lib/ld-linux.so.2

(no debugging symbols found)

Core was generated by `/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld --eh-'.

Program terminated with signal 11, Segmentation fault.

[New process 22254]

#0  0x401857c6 in memcpy () from /lib/libc.so.6

(gdb) bt

#0  0x401857c6 in memcpy () from /lib/libc.so.6

#1  0x00000000 in ?? ()

```

Last edited by Darkshine on Thu Jan 22, 2009 10:05 am; edited 1 time in total

----------

## NeddySeagoon

Darkshine,

```
/usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `scripts/kconfig/mconf.o' is incompatible with i386 output 
```

shows that you did not correct CHOST properly, there is still an i386 in the toolchain somewhere.

Did you follow the CHOST guide?

If not, things will be badly broken

----------

## smerf

Do you get the same error with FEATURES="-distcc"?

----------

## cyrillic

It looks like you have distcc in your path, and this prevents the kernel's "HOSTCC" from working properly.

BTW, this is not needed for FEATURES="distcc" to work with portage.

----------

## Darkshine

 *Quote:*   

> 
> 
> Did you follow the CHOST guide?
> 
> 

 

no. But I checked yesterday my system using that GUIDE. There were no "386-vestiges" in the /etc/conf.d. I had run fix_libtool_files.sh and there were no binaries or libraries linked with old 386 stuff. Finally, I rebuilt perl's packages

but it was still failing

 *Quote:*   

> 
> 
> It looks like you have distcc in your path, and this prevents the kernel's "HOSTCC" from working properly.
> 
> 

 

yes, I had had "/usr/lib/distcc/bin/" in my PATH variable and I removed distcc from it. Now I'm able to run "make oldconfig", "make menuconfig" and just "make" for the latest kernel: 2.6.28. When I'm running "make menuconfig" for current kernel - 2.6.20-r10 all are ok. But when I'm running "make" for it, I get the following errors:

```

19:02:36 [8]root@primula:/usr/src/linux>make

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  HOSTCC  scripts/basic/fixdep

  HOSTCC  scripts/basic/docproc

  CC      arch/i386/kernel/asm-offsets.s

  GEN     include/asm-i386/asm-offsets.h

  CC      scripts/mod/empty.o

  HOSTCC  scripts/mod/mk_elfconfig

  MKELF   scripts/mod/elfconfig.h

  HOSTCC  scripts/mod/file2alias.o

  HOSTCC  scripts/mod/modpost.o

  HOSTCC  scripts/mod/sumversion.o

scripts/mod/sumversion.c: In function 'get_src_version':

scripts/mod/sumversion.c:384: error: 'PATH_MAX' undeclared (first use in this function)

scripts/mod/sumversion.c:384: error: (Each undeclared identifier is reported only once

scripts/mod/sumversion.c:384: error: for each function it appears in.)

scripts/mod/sumversion.c:384: warning: unused variable 'filelist'

make[2]: *** [scripts/mod/sumversion.o] Error 1

make[1]: *** [scripts/mod] Error 2

make: *** [scripts] Error 2

```

I have the following gentoo-sources versions:

2.6.18-r6

2.6.19-r5

2.6.20-r10

2.6.24-r8

2.6.28

and before running "make" for the certain kernel I had switched to that kernel via "eselect kernel set N"

----------

## Darkshine

I was able to solve that problem with "PATH_MAX":

```
scripts/mod/sumversion.c:384: error: 'PATH_MAX' undeclared (first use in this function)
```

by modifying scripts/mod/sumversion.c and adding "#include <limits.h>" into it. But "make" failed later on linking stage for kernel 2.6.20-r10:

```

...

  GEN     .version

  CHK     include/linux/compile.h

  UPD     include/linux/compile.h

  CC      init/version.o

  LD      init/built-in.o

  LD      .tmp_vmlinux1

kernel/built-in.o: In function `getnstimeofday':

(.text+0x9ffb): undefined reference to `__umoddi3'

kernel/built-in.o: In function `do_gettimeofday':

(.text+0xa0a6): undefined reference to `__udivdi3'

kernel/built-in.o: In function `do_gettimeofday':

(.text+0xa0c9): undefined reference to `__umoddi3'

kernel/built-in.o: In function `do_timer':

(.text+0xaa7f): undefined reference to `__udivdi3'

kernel/built-in.o: In function `do_timer':

(.text+0xaaa2): undefined reference to `__umoddi3'

make: *** [.tmp_vmlinux1] Error 1

```

please, advise. Note that I was able to compile this kernel 2.6.20-r10 before migrating to gcc-4.3.2 and before swtiching to i686

I have another question. Let me remind I'm able to build kernel-2.6.28. I'm going to run "make install" for the new kernel and that command will re-write my current configs for kernel 2.6.20-r10 modules. Correct? If yes, I want to back up my current modules configs. Which configs or another files I have to back up?

----------

## VoidMage

This set of "undefined reference to ..." errors, is a compiler problem,

that was fixed either somewhere in 2.6.26 or 2.6.27.

----------

## Darkshine

After successful rebooting into the newest kernel, the problem with "make menuconfig" for the old kernel is no more actual

Thanks for the support.

----------

