# [SOLVED] Kernel: make menuconfig doesn't work

## bsquared938

So I just ran an emerge world last week, and everything seemed okay.

I was in the process of figuring out how to switch to systemd from sysinit, and this requires some kernel changes.

However...

Upon attempting to build the kernel configuration menu, using the make menuconfig command, this is the result I get:

```

ganga linux # make menuconfig

  HOSTCC  scripts/kconfig/conf.o

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

scripts/kconfig/conf.c:77:3: warning: format not a string literal and no format arguments

scripts/kconfig/conf.c:78:3: warning: format not a string literal and no format arguments

scripts/kconfig/conf.c:79:3: warning: format not a string literal and no format arguments

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

scripts/kconfig/conf.c:89:3: warning: format not a string literal and no format arguments

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

scripts/kconfig/conf.c:290:5: warning: format not a string literal and no format arguments

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

scripts/kconfig/conf.c:438:6: warning: format not a string literal and no format arguments

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

scripts/kconfig/conf.c:635:6: warning: format not a string literal and no format arguments

scripts/kconfig/conf.c:687:4: warning: format not a string literal and no format arguments

scripts/kconfig/conf.c:691:4: warning: format not a string literal and no format arguments

scripts/kconfig/conf.c:702:4: warning: format not a string literal and no format arguments

gcc: Internal error: Segmentation fault (program as)

Please submit a full bug report.

See <http://bugs.gentoo.org/> for instructions.

make[1]: *** [scripts/kconfig/conf.o] Error 1

make: *** [menuconfig] Error 2

```

I am not sure what is going on.  I have re-emerged my kernel version and have also tried emerging the newest version of gentoo-sources, but both of these did not solve this problem.

I am running on an 64-bit system, and am using the kernel version linux-3.10.7-gentoo-r1Last edited by bsquared938 on Thu Dec 05, 2013 11:46 pm; edited 1 time in total

----------

## limn

The GNU assembler, as, is failing.

```
gcc: Internal error: Segmentation fault (program as) 
```

This is part of sys-devel/binutils. 

Can you emerge anything that is compiled?

----------

## bsquared938

I am not sure - how can I check this?  

Should I try and remerge gcc, or the package that you mentioned?

----------

## Logicien

make menuconfig generally work when all the needed packages are install. Did you install the ncurses package? Did you try make xconfig in a graphical terminal with root access?

Recompile Gcc can and cannot resolv the problem. The problem can come from the USE flags Gcc have been compiled with. That can have to be check. Even if emerge world have succeed with no Segmentation fault, Segmentation faults have several sources. One of it is memory issue.

Note that Gcc is not part of binutils. It come from the gcc package.

----------

## limn

Try

```
emerge -1 file
```

If as fails at that, you have a broken compiler.

If not, save your .config file somewhere and run

```
make mrproper
```

in the linux directory. Then put the .config back and try make menuconfig again.

----------

## bsquared938

 *limn wrote:*   

> Try
> 
> ```
> emerge -1 file
> ```
> ...

 

Okay I tried this and it did not emerge.  Here is the output error message:

```

>>> Failed to emerge sys-apps/file-5.12-r1, Log file:

>>>  '/var/tmp/portage/sys-apps/file-5.12-r1/temp/build.log'

 * Messages for package sys-apps/file-5.12-r1:

 * ERROR: sys-apps/file-5.12-r1::gentoo failed (configure phase):

 *   econf failed

 * 

 * Call stack:

 *          ebuild.sh, line   93:  Called src_configure

 *        environment, line 5593:  Called do_configure '--disable-static'

 *        environment, line 1499:  Called econf '--disable-static'

 *   phase-helpers.sh, line  577:  Called die

 * The specific snippet of code:

 *            die "econf failed"

 * 

 * If you need support, post the output of `emerge --info '=sys-apps/file-5.12-r1::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=sys-apps/file-5.12-r1::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/sys-apps/file-5.12-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/file-5.12-r1/temp/environment'.

 * Working directory: '/var/tmp/portage/sys-apps/file-5.12-r1/work/build-x86_64-pc-linux-gnu'

 * S: '/var/tmp/portage/sys-apps/file-5.12-r1/work/file-5.12'

```

Should I try to remerge gcc still?

----------

## limn

That is a different problem.

I doubt emerging gcc will help, even if it is successful.

Are you upgrading GNOME? Did you change your profile? If so change it back and undo anything else you did for 3.8 and see if make menuconfig works.

----------

## bsquared938

The only change that I made to my system is that I have started the migration process to Grub 2.  

I have not changed over to systemd or made any updates for 2 weeks now.  The last time I changed my profile was over 2 months ago.  I also upgraded my kernel to 3.7.10-r1 at around that time (though make menuconfig was working after I switched kernels...).

The output of eselect profile list is below:

```

# eselect profile list

  [1]   default/linux/amd64/13.0

  [2]   default/linux/amd64/13.0/selinux

  [3]   default/linux/amd64/13.0/desktop

  [4]   default/linux/amd64/13.0/desktop/gnome *

  [5]   default/linux/amd64/13.0/desktop/gnome/systemd

  [6]   default/linux/amd64/13.0/desktop/kde

  [7]   default/linux/amd64/13.0/desktop/kde/systemd

  [8]   default/linux/amd64/13.0/developer

  [9]   default/linux/amd64/13.0/no-multilib

  [10]  default/linux/amd64/13.0/x32

  [11]  hardened/linux/amd64

  [12]  hardened/linux/amd64/selinux

  [13]  hardened/linux/amd64/no-multilib

  [14]  hardened/linux/amd64/no-multilib/selinux

  [15]  hardened/linux/amd64/x32

  [16]  hardened/linux/uclibc/amd64

```

----------

## limn

Try this

```
USE="-*" emerge -1 file
```

and/or

```
emerge -1 sed
```

I do not know what is involved in migrating to GRUB2. Something changed. Apparently, as and econf do not like it at all.

----------

## Hu

Please post the output of emerge --info sys-devel/gcc sys-devel/binutils ; gcc-config -l ; binutils-config -l.

----------

## bsquared938

Before I post the output of the commands you listed, I just want to say that the problem seemed to solve itself.

I rebooted my computer last night, I tried running the make menuconfig command again and it worked okay.

(not sure how to change subject to say the problem has been solved...)

Either way, here are the outputs of the following commands (all run in superuser)..

Thanks to all who helped out!!!   :Very Happy: 

emerge --info sys-devel/gcc sys-devel/binutils

```

emerge --info sys-devel/gcc sys-devel/binutils

Portage 2.2.7 (default/linux/amd64/13.0/desktop/gnome, gcc-4.7.3, glibc-2.15-r3, 3.10.7-gentoo-r1 x86_64)

=================================================================

                         System Settings

=================================================================

System uname: Linux-3.10.7-gentoo-r1-x86_64-AMD_FX-tm-4100_Quad-Core_Processor-with-gentoo-2.2

KiB Mem:     8176808 total,   4854076 free

KiB Swap:     524284 total,    524284 free

Timestamp of tree: Mon, 02 Dec 2013 22:30:02 +0000

ld GNU ld (GNU Binutils) 2.23.1

app-shells/bash:          4.2_p45

dev-java/java-config:     2.1.12-r1

dev-lang/python:          2.7.5-r3, 3.2.5-r3

dev-util/cmake:           2.8.10.2-r2

dev-util/pkgconfig:       0.28

sys-apps/baselayout:      2.2

sys-apps/openrc:          0.11.8

sys-apps/sandbox:         2.6-r1

sys-devel/autoconf:       2.13, 2.69

sys-devel/automake:       1.11.6, 1.12.6, 1.13.4

sys-devel/binutils:       2.23.1

sys-devel/gcc:            4.5.4, 4.6.3, 4.7.3-r1

sys-devel/gcc-config:     1.7.3

sys-devel/libtool:        2.4.2

sys-devel/make:           3.82-r4

sys-kernel/linux-headers: 3.9 (virtual/os-headers)

sys-libs/glibc:           2.15-r3

Repositories: gentoo x-portage

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe -march=native"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -pipe -march=native"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

USE="3dnow X a52 aac acl acpi ads alsa amd64 berkdb bindist bonobo branding brasero bzip2 cairo caps cdda cddb cdr cleartype cli colord consolekit corefonts cracklib crypt cups cxx dbus divx dri dts dvd dvdr eds emboss encode evo exif expat fam ffmpeg firefox fortran gcj gdbm gif gimp gimpprint gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk hal iconv imagemagick introspection ipv6 java javascript jpeg kpathsea latex lcms ldap libnotify libsecret mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls npt1 nptl nsplugin ogg openmp pam pango pcre pdf plotutils png policykit postscript ppds pulseaudio python qt3support qt4 quicktime readline realmedia samba sdl session socialweb spell sqlite sse sse2 ssl startup-notification svg tagwriting tcpd tetex threadpool threads tiff tk truetype type1 udev udisks unicode upower usb vorbis wmp wxwidgets x264 xcb xml xulrunner xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="vga radeon fglrx" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================

                        Package Settings

=================================================================

sys-devel/gcc-4.5.4 was built with the following:

USE="cxx fortran gcj gtk mudflap (multilib) nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -graphite (-hardened) (-libssp) -lto -multislot -nopie -nossp -objc -objc++ -objc-gc -test -vanilla"

sys-devel/gcc-4.6.3 was built with the following:

USE="cxx fortran gcj gtk mudflap (multilib) nls nptl openmp (-altivec) -doc (-fixed-point) -graphite (-hardened) (-libssp) -lto -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" ABI_X86="64"

sys-devel/gcc-4.7.3-r1 was built with the following:

USE="cxx fortran gcj gtk mudflap (multilib) nls nptl openmp (-altivec) -doc (-fixed-point) -go -graphite (-hardened) (-libssp) -lto -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" ABI_X86="64"

sys-devel/binutils-2.23.1 was built with the following:

USE="cxx (multilib) nls zlib -multislot -multitarget -static-libs -test -vanilla" ABI_X86="64"

```

gcc-config -l

```

# gcc-config -l

 [1] x86_64-pc-linux-gnu-4.5.4

 [2] x86_64-pc-linux-gnu-4.6.3

 [3] x86_64-pc-linux-gnu-4.7.3 *

```

binutils-config -l

```

binutils-config -l

 [1] x86_64-pc-linux-gnu-2.23.1 *

```

----------

## limn

I think, for you, as the creator, the subject should be an editable field at the very top of the post.

Good that it is working now. 

If you have data that you cannot replace on that system, and you do not already have a backup strategy, now might be a time to think about one.

----------

