# make menuconfig Makefile:442: mixed implicit and normal rule

## cayenne

Hello all,

I was going to try to troubleshoot my sound not working...I apparently have and Intel ICH5 w/AD1981B on the motherboard.

Anyway, I was going to check my kernel config with make menuconfig and I got an error I've not seen before:

```
make menuconfig

Makefile:442: *** mixed implicit and normal rules.  Stop.

```

Does anyone have any ideas what's going on here???

Thanks in advance,

cayenne    :Question:   :Question: 

----------

## Hu

What kernel are you trying to build?  That affects the exact text of the Makefile, so we cannot predict what that line says.  You could also share sed -n -e 430,450p < Makefile | nl -ba -v 430.

----------

## cayenne

 *Hu wrote:*   

> What kernel are you trying to build?  That affects the exact text of the Makefile, so we cannot predict what that line says.  You could also share sed -n -e 430,450p < Makefile | nl -ba -v 430.

 

Well, I was just wanting to see what my kernel had for settings...been a long time since I looked at it.

in /usr/src

```
ls -l

total 21824

-rw-r--r--  1 root root    18693 Dec 24  2008 COPYING

-rw-r--r--  1 root root    93212 Dec 24  2008 CREDITS

drwxr-xr-x 82 root root     8192 Jun  6  2009 Documentation

-rw-r--r--  1 root root     2430 Dec 24  2008 Kbuild

-rw-r--r--  1 root root   106036 Dec 24  2008 MAINTAINERS

-rw-r--r--  1 root root    57321 Jun  6  2009 Makefile

-rw-r--r--  1 root root      297 Aug  1  2009 Module.markers

-rw-r--r--  1 root root   297970 Aug  1  2009 Module.symvers

-rw-r--r--  1 root root    16930 Dec 24  2008 README

-rw-r--r--  1 root root     3172 Dec 24  2008 REPORTING-BUGS

-rw-r--r--  1 root root  1395988 Aug  1  2009 System.map

drwxr-xr-x 25 root root     4096 Jun 13  2009 arch

drwxr-xr-x  2 root root     4096 Jun 14  2009 block

drwxr-xr-x  3 root root     8192 Jun 14  2009 crypto

drwxr-xr-x 83 root root     4096 Aug  1  2009 drivers

drwxr-xr-x 18 root root     4096 Jun 13  2009 firmware

drwxr-xr-x 63 root root     8192 Aug  1  2009 fs

drwxr-xr-x 29 root root     4096 Aug  1  2009 include

drwxr-xr-x  2 root root     4096 Aug  1  2009 init

drwxr-xr-x  2 root root     4096 Aug  1  2009 ipc

drwxr-xr-x  6 root root     8192 Aug  1  2009 kernel

drwxr-xr-x  6 root root     8192 Aug  1  2009 lib

drwxr-xr-x  2 root root     8192 Jun 14  2009 mm

-rw-r--r--  1 root root     2548 Aug  1  2009 modules.order

drwxr-xr-x 45 root root     4096 Aug  1  2009 net

drwxr-xr-x  7 root root      116 Jun  6  2009 samples

drwxr-xr-x 10 root root     4096 Jun 13  2009 scripts

drwxr-xr-x  5 root root     4096 Jun 14  2009 security

drwxr-xr-x 20 root root     4096 Jun 14  2009 sound

drwxr-xr-x  2 root root     4096 Jun 13  2009 usr

drwxr-xr-x  3 root root       16 Jun  6  2009 virt

-rwxr-xr-x  1 root root 10603157 Aug  1  2009 vmlinux

-rw-r--r--  1 root root  9604044 Aug  1  2009 vmlinux.o

```

From /usr/src/linux

```
sed -n -e 430,450p < Makefile | nl -ba -v 430

   430  else

   431  ifeq ($(config-targets),1)

   432  # ===========================================================================

   433  # *config targets only - make sure prerequisites are updated, and descend

   434  # in scripts/kconfig to make the *config target

   435

   436  # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.

   437  # KBUILD_DEFCONFIG may point out an alternative default configuration

   438  # used for 'make defconfig'

   439  include $(srctree)/arch/$(SRCARCH)/Makefile

   440  export KBUILD_DEFCONFIG KBUILD_KCONFIG

   441

   442  config %config: scripts_basic outputmakefile FORCE

   443          $(Q)mkdir -p include/linux include/config

   444          $(Q)$(MAKE) $(build)=scripts/kconfig $@

   445

   446  else

   447  # ===========================================================================

   448  # Build targets only - this includes vmlinux, arch specific targets, clean

   449  # targets and others. In general all targets except *config targets.

   450

```

Not sure what has happened here...I've not tried to change anything about the kernel yet at all....this should be the same as after I installed gentoo on this box.

Thank you,

cayenne

----------

## hedmo

cayenne

try this.set the line:

442  config %config: scripts_basic outputmakefile FORCE 

to:

442  %config: scripts_basic outputmakefile FORCE

----------

## cayenne

 *hedmo wrote:*   

> cayenne
> 
> try this.set the line:
> 
> 442  config %config: scripts_basic outputmakefile FORCE 
> ...

 

Thank you for the replies. I made the change...but still same error:

```
linux # sed -n -e 430,450p < Makefile | nl -ba -v 430

   430  else

   431  ifeq ($(config-targets),1)

   432  # ===========================================================================

   433  # *config targets only - make sure prerequisites are updated, and descend

   434  # in scripts/kconfig to make the *config target

   435

   436  # Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.

   437  # KBUILD_DEFCONFIG may point out an alternative default configuration

   438  # used for 'make defconfig'

   439  include $(srctree)/arch/$(SRCARCH)/Makefile

   440  export KBUILD_DEFCONFIG KBUILD_KCONFIG

   441

   442  %config: scripts_basic outputmakefile FORCE

   443          $(Q)mkdir -p include/linux include/config

   444          $(Q)$(MAKE) $(build)=scripts/kconfig $@

   445

   446  else

   447  # ===========================================================================

   448  # Build targets only - this includes vmlinux, arch specific targets, clean

   449  # targets and others. In general all targets except *config targets.

   450

linux # make menuconfig

Makefile:1610: *** mixed implicit and normal rules.  Stop.

```

To look at the 'new' area it is complaining about, I modified the sed command you gave me to look at that section:

```
linux # sed -n -e 1600,1620p < Makefile | nl -ba -v 1600

  1600  %.lst: %.c prepare scripts FORCE

  1601          $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)

  1602  %.s: %.S prepare scripts FORCE

  1603          $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)

  1604  %.o: %.S prepare scripts FORCE

  1605          $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)

  1606  %.symtypes: %.c prepare scripts FORCE

  1607          $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)

  1608

  1609  # Modules

  1610  / %/: prepare scripts FORCE

  1611          $(cmd_crmodverdir)

  1612          $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \

  1613          $(build)=$(build-dir)

  1614  %.ko: prepare scripts FORCE

  1615          $(cmd_crmodverdir)

  1616          $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \

  1617          $(build)=$(build-dir) $(@:.ko=.o)

  1618          $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost

  1619

  1620  # FIXME Should go into a make.lib or something 

```

----------

## Hu

What is the output of emerge --info ; ls -l /usr/src?

----------

## cayenne

 *Hu wrote:*   

> What is the output of emerge --info ; ls -l /usr/src?

 

Here is it:

```
emerge --info ; ls -l /usr/src

Portage 2.1.10.3 (default/linux/x86/10.0, gcc-4.4.5, glibc-2.11.3-r0, 2.6.28-gentoo-r5 i686)

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

System uname: Linux-2.6.28-gentoo-r5-i686-Intel-R-_Xeon-TM-_CPU_2.80GHz-with-gentoo-2.0.2

Timestamp of tree: Thu, 14 Jul 2011 01:00:01 +0000

app-shells/bash:          4.1_p9

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.4.4-r13, 2.5.4-r2, 2.6.5-r3

dev-util/cmake:           2.8.1-r2

dev-util/pkgconfig:       0.23

sys-apps/baselayout:      2.0.2

sys-apps/openrc:          0.8.3-r1

sys-apps/sandbox:         1.6-r2

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11.1

sys-devel/binutils:       2.20.1-r1

sys-devel/gcc:            4.3.2-r3, 4.4.5

sys-devel/gcc-config:     1.4.1

sys-devel/libtool:        2.2.10

sys-devel/make:           3.82

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

sys-libs/glibc:           2.11.3

Repositories: gentoo

ACCEPT_KEYWORDS="x86"

ACCEPT_LICENSE="*"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /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 -march=i686 -pipe -fomit-frame-pointer"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="http://www.cyberuse.com/gentoo/ http://gentoo.netnitco.net http://mirror.datapipe.net/gentoo http://gentoo.mirrors.pair.com/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/"

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

MAKEOPTS="-j5"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

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

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY=""

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X a52 aac acl alsa ao apache2 bash-completion berkdb bzip2 cddb cdparanoia cdr cli cracklib crypt css cups curl cvs cxx dbus dga dri dvb dvd dvdr emacs firefox flac foomaticdb fortran ftp gd gdbm gif gimp gnutls gphoto2 gpm gtk gzip iconv ieee1394 imagemagick imap ipod ipv6 jack java javascript jpeg kde lame latex lirc mad maildir mcurses mime mng modules mp3 mpeg mplayer mudflap mysql ncurses nls nntp nptl nptlonly ogg openal opengl openmp pam pcre perl php png pppd python qt3 qt3support qt4 rdesktop readline rss samba sasl session smp snmp spell sql ssl svg svga sysfs syslog tcl tcpd threads tidy tiff tk truetype udev unicode usb v4l v4l2 vnc webkit wifi x86 xine xinerama xml xorg xscreensaver xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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="braindump flow karbon kexi kpresenter krita tables words" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx radeon" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

total 12

lrwxrwxrwx  1 root root   22 Jun  6  2009 linux -> linux-2.6.28-gentoo-r5

drwxr-xr-x 23 root root 4096 Jul 27 18:39 linux-2.6.28-gentoo-r5

drwxr-xr-x 23 root root 4096 Mar 21 12:15 linux-2.6.36-gentoo-r5

drwxr-xr-x 23 root root 4096 Jul 26 23:43 linux-2.6.38-gentoo-r6

```

----------

## hedmo

cayenne

set the line:

1610  / %/: prepare scripts FORCE 

to

1610 %/: prepare scripts FORCE

----------

## krinn

or take the problem the other way :

- as emerge -a =make-3.80* to install an older make that will understand your older kernel config

- or emerge a newer kernel that will be understand by your newer make

- first option: you should build make-3.82 binary package for safety.

- second one: imo, the best, as you will end with a newer fully support kernel, also might stop yourself playing with headers at 2.6.36 with a 2.6.28 more than old kernel.

----------

## cayenne

 *krinn wrote:*   

> or take the problem the other way :
> 
> - as emerge -a =make-3.80* to install an older make that will understand your older kernel config
> 
> - or emerge a newer kernel that will be understand by your newer make
> ...

 

If you could help me to understand what is happening here...?

I've not changed anything..haven't even tried to upgrade to a new kernel...just was wanting to look at the config of my current running one...and due to no changes that I know I've done...some how it is flipping out on me...

I'm just not sure why this started in the first place...can you clue me in?

I'm not sure why it is looking at the newer kernels..when the symlink is still pointing at the old one...

It sounds like your saying it is mixing old with new...and I don't understand how that could happen.

That being said...do you recommend that I just follow the upgrade kernel document...and go that route?

Thank you for the reply!!

K

----------

## hedmo

cayenne

i am using  mm-sources my self and one day i had to recompile my 2.6.28 kernel.thats why i had this problem to.

as far as i understand from krinn,you can have an old kernel running and updating your system.but when it comes to

like in this case "checking kernel config" the problem starts.it is the same as if you find a cool thing to emerge 

but it depends on a newer version of an other program you have already in your system,in that case the compile will

stop and you have to update that other program first.

please someone correct me if i am wrong.  :Rolling Eyes: 

cayenne wrote:

I'm not sure why it is looking at the newer kernels..when the symlink is still pointing at the old one... 

=you have updated your system after compiling your kernel and bulled in a new headers  :Question: 

It sounds like your saying it is mixing old with new...and I don't understand how that could happen

=mixed new headers with old kernel

That being said...do you recommend that I just follow the upgrade kernel document...and go that route?

well...  the handbook say "keep your portage up to date" =keep your system up to date

----------

## krinn

what "i think" is happening to you is :

you have an old kernel source made in dutch language, it was ok to build that with a dutch make tool

make evolve to dutch+english

kernel evolve to add english (knowing dutch would be gone soon or later)

make evolve to only speak english

kernel evolve to speak english too (or maybe still speak dutch for old make users)

but now:

you have an english speaking make trying to discuss a dutch written kernel, see where it fail.

It's clearer now ?

that's why i suggest you get an older make to get one that still understand "the dutch" language. And no i'm not sure it comes even from make, but as your make is brand new and your kernel really old, and as it's make that is complaining, it should be make that is too new (or your kernel too old ^^ ), i also highly doubt your make-3.82 was the make version that build your "jun, 6 2009" kernel

and that's also why i suggest you to use a newer kernel

What you should have made ?

1st thing to do (contrary to what you are saying you didn't do) would have been to not update blindly or doing it knowing you will upgrade until its end where all your programs are upto date

Because now your make file is newer, your kernel headers are newer... many things have been update, all programs portage could have update for you without your need have been update.

Next time, read the -vp output and pick choices you like: many as always, and upto your favorite way to admin your system, like for example you could have just mask kernel headers, make...

You could still try to mask them, but you've update some programs that will now only work with the newer version you have, and getting back (as always) is harder (not impossible, but more risky)

And you've done it while gentoo have a big update in between with stabilization of openrc, that need newer udev (and udev need fresh kernel headers....), the bad move in the worst time.

And if you doubt, yes you're mixing old & new, because you're in between the upgrade and portage stopped as it need your choices to go futher, and for you choices are now : upgrade your kernel or downgrade all tools that need a newer kernel because even you success at rebuild your kernel, you'll then see many programs versions assume your kernel have some option your old kernel doesn't have.

You could have avoid that by just looking at what portage was about to do, and even, you could have just guessing it knowing your system wasn't update for long days. Except if all devs were gone fishing, long delays between update mean always big changes, the longer the delay the higher the number of changes.

I would say you have 4 ways to upgrade

1- big delays between upgrade, and special care taken when doing an upgrade

2- big delays, don't care & upgrade eyes closed

3- small delays, don't care upgrade blindly

4- small delays and taking care of what is about to be upgrade

choice 1 & 4 are of course the safer, choice 3 is generally acceptable but still could fail if blindly upgrade but taking a "special" thing in the way, like baselayout/openrc stabilisation or some little troubles we saw one day or another (like a kernel version stabilise and then remove, libpng-1.4, e2fsprogs...)

but choice 2 is the best way to end querying help in the forum  :Smile: 

----------

## cayenne

 *krinn wrote:*   

> what "i think" is happening to you is :
> 
> you have an old kernel source made in dutch language, it was ok to build that with a dutch make tool
> 
> make evolve to dutch+english
> ...

 

Thankyou all for the explanations!

Interesting...ok, will guess I"ll roll a new kernel...

This is interesting in that I've been using Gentoo for a LONG time now...and  have never been one to update on a constant basis (usually only when I emerged something new and it needed newer dependencies)...but I'd never seen make menuconfig mess up like this.

Well, looks like I have a full weekend at this point.

Actually...I'm stuck in the middle of trying to emerge world too...and can't seem to get around all the blocks and problems there. I may just blow it off, and slick this box and start from scratch and do a full blown new install.....and try to keep up from there.

Again, thanks for all the information and insight. I guess it is time to download the latest liveCD and start from scratch.

C    :Rolling Eyes: 

----------

