# 2.6.29-xen-r4 compiling error [SOLVED]

## CaptainBlood

Hi there,

Compiling /drivers/cpuidle/cpuidle.c raises the following error : implicit declaration of function 'default_idle'.

Well, I could try to fix in source code ... but I'd rather not.

Is there any option in make.conf that would fix this ?

Thanks for your attention.Last edited by CaptainBlood on Thu Apr 24, 2014 8:29 pm; edited 2 times in total

----------

## AllenJB

I would recommend tryig the 2.6.31 xen-sources. xen-sources is extremely hit and miss. Some versions will work perfectly while the others completely fail on boot, if they compile at all.

----------

## CaptainBlood

 *CaptainBlood wrote:*   

> Is there any option in make.conf that would fix this ?

 

That's silly I admit, so

[quote="CaptainBlood"Well, I could try to fix in source code ... but I'd rather not.[/quote]

I guess I can't escape from it.

The ouput

```
make

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  SYMLINK include/asm -> include/asm-x86

  CALL    scripts/checksyscalls.sh

  CHK     include/linux/compile.h

  CC      drivers/cpuidle/cpuidle.o

drivers/cpuidle/cpuidle.c: In function 'cpuidle_idle_call':

drivers/cpuidle/cpuidle.c:61: erreur: implicit declaration of function 'default_idle'

make[2]: *** [drivers/cpuidle/cpuidle.o] Erreur 1

make[1]: *** [drivers/cpuidle] Erreur 2

make: *** [drivers] Erreur 2
```

I see 2 options :

1) Removal of the bad code  :Shocked:  (At least, I may continue to configure XEN.)

```
#if defined(CONFIG_ARCH_HAS_DEFAULT_IDLE)

                        default_idle();

#else

                        local_irq_enable();

#endif
```

changed to

```

                        local_irq_enable();
```

2) Adding include reference.

There are many occurences of the matching prototype, each time in a cpu depending system.h:

```
find . -name "*.h" -exec grep -R default_idle {} \; -print

void default_idle(void);

./arch/cris/include/asm/system.h

void default_idle(void);

./arch/ia64/include/asm/system.h

void default_idle(void);

./arch/um/sys-x86_64/shared/sysdep/system.h

void default_idle(void);

./arch/um/sys-i386/shared/sysdep/system.h

void s3c24xx_default_idle(void)

                s3c24xx_default_idle();

./arch/arm/mach-s3c2410/include/mach/system.h

extern void s3c24xx_default_idle(void);

./arch/arm/mach-s3c2410/include/mach/idle.h

void default_idle(void);

./arch/x86/include/asm/system.h
```

In the faulty source there is no CPU dependent #DEFINE, 

Any idea how I should investigate further to solve this issue ?

Tnanks for your attention.

----------

## CaptainBlood

 *AllenJB wrote:*   

> I would recommend tryig the 2.6.31 xen-sources. xen-sources is extremely hit and miss. Some versions will work perfectly while the others completely fail on boot, if they compile at all.

 

Thanks, 

So I shouldn't rely on portage proposal issued by 

```
emerge -p xen
```

 ... Too bad.  :Wink: 

Moreover, its probably not a good idea of mine trying to fix a xen kernel sources packages.

Are theses sources provided through portage or should I simply configure my 2.6.31-gentoo-r10 kernel for xen ? (I apologize if I'm being silly ... I'm still a newbie)

Edit : I did the package.keywords and package.unmask thing +emerge = ...

Unsuccessful kernel compiling in drivers/xen/core  :Crying or Very sad: 

Guess I should wait for stable release and work on leaning my standard kernel meanwhile.

Thanks for your attention, interest and support.

----------

