[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[plamo:27099] Re: Plamo4.2でmysql-5.0.20がコンパイルできない?



佐賀井といいます。

06/04/19 に Toyoaki Hatsukano<toyo-m@mars.toy-z.net> さんは書きました:
> /usr/include/asm/ は/usr/src/linux/include/asmへのリンク
>
> エラー
> ---ここから
> In file included from /usr/include/asm/atomic.h:6,
>                  from ../include/my_global.h:318,
>                  from mysys_priv.h:17,
>                  from my_new.cc:22:
> /usr/include/asm/processor.h: In function `void set_in_cr4(long unsigned
> int)':
> /usr/include/asm/processor.h:235: error: `read_cr4' undeclared (first
> use this function)
> /usr/include/asm/processor.h:235: error: (未宣言変数については、それが関
> 数内で最初に現われた時だけ報告されます。)
> /usr/include/asm/processor.h:237: error: `write_cr4' undeclared (first
> use this function)
> /usr/include/asm/processor.h: In function `void clear_in_cr4(long
> unsigned int)':
> /usr/include/asm/processor.h:244: error: `read_cr4' undeclared (first
> use this function)
> /usr/include/asm/processor.h:246: error: `write_cr4' undeclared (first
> use this function)
> make[2]: *** [my_new.o] エラー 1
> ---ここまで

これでは?
http://bugs.mysql.com/bug.php?id=16769

結局、/usr/include/asm/processor.hの当該行を、
#ifdef __KERNEL__
#endif
でくくればいいのでは、と言うことです。
試した所、コンパイルが通ることがわかりました。

上記URLより引用
------------------------------------------------------------------
  [21 Feb 9:37] gilbert LE DREAU

Hello

asm/in processor.h
Because functions set_in_cr4() and clear_in_cr4()
use write_cr4 an read_cr4 who are Kernel functions
juste add
#ifdef __KERNEL__  // before kernel function call

#endif // after kernel function call

like this

#ifdef __KERNEL__
static inline void set_in_cr4 (unsigned long mask)
{
        unsigned cr4;
        mmu_cr4_features |= mask;
        cr4 = read_cr4();
        cr4 |= mask;
        write_cr4(cr4);
}

static inline void clear_in_cr4 (unsigned long mask)
{
        unsigned cr4;
        mmu_cr4_features &= ~mask;
        cr4 = read_cr4();
        cr4 &= ~mask;
        write_cr4(cr4);
}
#endif

And It will compile
--------------------------------------------
以上引用
--
----+----1----+----2----+----3----+----4----+----5----+----6----+-
Shigeo Sagai                                 sagatsagai@gmail.com
                                        sagai@criepi.denken.or.jp

References
[plamo:27096] Plamo4.2でmysql-5.0.20がコンパイルできない?, Toyoaki Hatsukano

[検索ページ] [メール一覧]
Plamo ML 公開システム