# Fix it to use EXTRA_CFLAGS

## Cr0t

I get this error message with multiple drivers, which is because I manually changed the /usr/src/linux/Makefile CFLAGS.

This is what I am getting if I compile the e100 driver from intel's webpage.

```
make -C /lib/modules/2.6.24-gentoo-r3/build SUBDIRS=/root/drivers/e100-3.5.17/src modules

make[1]: Entering directory `/usr/src/linux-2.6.24-gentoo-r3'

scripts/Makefile.build:46: *** CFLAGS was changed in "/root/drivers/e100-3.5.17/src/Makefile". Fix it to use EXTRA_CFLAGS.  Stop.

make[1]: *** [_module_/root/drivers/e100-3.5.17/src] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.24-gentoo-r3'

make: *** [default] Error 2
```

----------

## null__

I find it appalling that no one has responded to this post, as I am also experiencing this problem, only with the ALSA drivers.

----------

## alunduil

For alsa a bug was already reported: https://bugs.gentoo.org/show_bug.cgi?id=207427.

----------

## null__

That bug report is over two months old. I've gotta say I find it appalling that it hasn't been fixed yet. It seems so trivial!

----------

## Monkeh

 *null__ wrote:*   

> That bug report is over two months old. I've gotta say I find it appalling that it hasn't been fixed yet. It seems so trivial!

 

Well, the unpaid developers who are already busy with their own jobs and lives will immediately drop everything they're doing and fix a bug they don't particularly care about for no reward whatsoever, because some random person is appalled!

----------

## null__

Incidentally, I want to thank you for finding that bug report. It is miraculous that you found anything, based on what had been written, and considerate of you to have felt prompted to do so. I extend to you my warmest thanks, and I wish it known my appreciation for your kind deed is quite unsurpassable in its magnitude. Your response to my inflamed words of irritation was delivered not only with impeccable promptness, but also without a hint of that crude and unjustified expression of annoyance I so inconsiderately and rudely levelled at the good people of this community, particularly towards the developers which inhabit it, and who provide their valuable and oft-unappreciated services at no cost to despicable scumbags such as I.

My feeble words of apology and gratitude must sound wretchedly and vulgarly to thine refined and sensitive ear, and do stain, being the products of mine own grubby and greasy digits' vain and graceless actuations upon the keys of the dirtied and filth-ridden instrument I do taint the word to call a keyboard, O Your Excellence; I say, the uninspired flight of my filthy fingers over the scum-caked keys of said unfortunate instrument, at the behest of the misshapen and warped thoughts which inhabit cankerously, as the traffic of the twisted and blackened byways of my brain, that diseased and feeble organ I do dare to call a mind, O Your Excellence, which is as a poisonous and gelatinous mass of black pus suspended horridly within the concavity of my foul head; I say, my thoughts, the vermin of my black and shrivelled mind, did bid, in conception of the dark ideas which perpetually cloud, as toxic vapors emanating from some diabolical vent in the cavern of my head, the fetid interior of my capital appendage, my crooked digits to dance grotesquely over the germ-infested keys of my instrument, the begetter of my twisted and diabolical works of evil, to render a black mark upon the very face of this pure and cherished sanctuary of perfect good, and the unfortunate victim of my wanton villainy, the Gentoo Forums, as an ugly scar cloven hatefully upon the cheek of the fairest mistress e'er to lay eyes upon, O Your Greatness. My apologies.

----------

## sp4rk3r

Bravo.

----------

## null__

My words of apology must strike thee weak,

Being of graceless form and wretched birth,

As the false-fac'd plea of the vain turn'd meek:

Dishonest lines lacking wholly in worth.

I would move thee still enlist thine ear,

To stir thee away from thy valuable tasks,

And bend thy will momentarily to hear

The entreaties of thee I so roughly ask.

The words of my speech, ungraciously thrown,

Brutish in conception, and rude in their invection,

Were of discordant unrestful spirits sown,

To corrupt these boards with their infection.

I acknowledge now that my words were born in error,

Hastily begot, and discharg'd premature;

Their wrongful targets I now view the fairer,

And their rightful displea'ure I resign to endure.

If moved thou were to stay thy harsh judgment's passion,

This repenter's foulest villanous mind were given leave

To clear its sickly fog and restore its right compassion,

In hopes thereby I might earn some reprieve.

----------

## epsilon72

^Holy crap.  

Also, I'm experiencing this same problem.

----------

## dclayton

 *Quote:*   

> ^Holy crap.
> 
> Also, I'm experiencing this same problem.

 

As am I.  I'm appalled that it hasn't been fixed yet.

----------

## cyrillic

This problem has been fixed, in a manner of speaking.

 *alsa-driver-1.0.16.ebuild wrote:*   

>         elog "If you experience problems, please try building the in-kernel"
> 
>         elog "ALSA drivers instead. This ebuild is unsupported." 

 

----------

## Punchcutter

I'm experiencing essentially the same problem, but with spca5xx, a webcam driver.  Following is the entire build log from standard out.  Any ideas or hints gratefully received.

```
>>> Emerging (3 of 5) media-video/spca5xx-20060501-r2 to /

 * spca5xx-20060501.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                      [ ok ]

 * checking ebuild checksums ;-) ...                                                            [ ok ]

 * checking auxfile checksums ;-) ...                                                           [ ok ]

 * checking miscfile checksums ;-) ...                                                          [ ok ]

 * checking spca5xx-20060501.tar.gz ;-) ...                                                     [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/2.6.24-gentoo-r8/build

 * Found sources for kernel version:

 *     2.6.24-gentoo-r8

 * Checking for suitable kernel configuration options...                                        [ ok ]

>>> Unpacking source...

>>> Unpacking spca5xx-20060501.tar.gz to /var/tmp/portage/media-video/spca5xx-20060501-r2/work

tar: spca5xx-20060501/drivers: implausibly old time stamp 1969-12-31 17:00:00

 * Converting spca5xx-20060501/Makefile to use M= instead of SUBDIRS= ...                       [ ok ]

 * Applying spca-20060501-defines.patch ...                                                     [ ok ]

 * Applying spca-20060501-2.6.18.patch ...                                                      [ ok ]

 * Applying spca-20060501-LogitechQC92f.patch ...                                               [ ok ]

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/media-video/spca5xx-20060501-r2/work/spca5xx-20060501 ...

 * Preparing spca5xx module

   Building SPCA5XX driver for 2.5/2.6 kernel.

   Remember: you must have read/write access to your kernel source tree.

make -C /usr/src/linux M=/var/tmp/portage/media-video/spca5xx-20060501-r2/work/spca5xx-20060501 CC=i686-pc-linux-gnu-gcc modules

make[1]: Entering directory `/usr/src/linux-2.6.24-gentoo-r8'

scripts/Makefile.build:46: *** CFLAGS was changed in "/var/tmp/portage/media-video/spca5xx-20060501-r2/work/spca5xx-20060501/Makefile". Fix it to use EXTRA_CFLAGS.  Stop.

make[1]: *** [_module_/var/tmp/portage/media-video/spca5xx-20060501-r2/work/spca5xx-20060501] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.24-gentoo-r8'

make: *** [default] Error 2

 *

 * ERROR: media-video/spca5xx-20060501-r2 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3128:  Called linux-mod_src_compile

 *             environment, line 2401:  Called die

 * The specific snippet of code:

 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                            CC=\"$(get-KERNEL_CC)\"                                          LDFLAGS=\"$(get_abi_LDFLAGS)\"       ${BUILD_FIXES}                                           ${BUILD_PARAMS}                              ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CC="$(get-KERNEL_CC)" LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";

 *  The die message:

 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS=  KERNELDIR=/usr/src/linux default

 *

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/media-video/spca5xx-20060501-r2/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/media-video/spca5xx-20060501-r2/temp/environment'.

 *

```

----------

## Mr_Grieves

@null__:

Keep in mind that this is all open source. If you are truly appalled, stop whining and submit a patch. Entitlement does not exist here. Users are expected to wipe their own asses or have a shred of patience.

If you want alsa to work right now, head over to www.alsa-project.org and be productive working with them, or recompile alsa into your kernel.

cheers

Dave

----------

## niffs

This is interesting, I was trying to build the e100 driver from Intel's old code as well due to my own problems (the in-kernel drivers don't work correctly for me in any kernel over 2.6.12) and ran into the same problem. Apparently replacing every instance of CFLAGS in the e100 makefile with EXTRA_CFLAGS makes it happier (I don't know much about makefiles, so correct me if I'm wrong). But then it says it can't find "linux/config.h", which doesn't appear to exist anywhere on my system...

----------

