お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#1 2009-07-04 17:27:22

mini13i
メンバ
登録日: 2008-05-08

make menuconfig

linux-2.6.30.1をコンパイルしようとしているのですが、
# make oldconfigの後、
make menuconfigに失敗します。エラーメッセージ配下のとおりです。
# make menuconfig
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:103: error: expected specifier-qualifier-list before ‘chtype’
scripts/kconfig/lxdialog/dialog.h:193: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:199: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:201: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:202: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:203: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:204: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:206: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:31: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:59: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:95: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c: In function ‘dialog_checklist’:
scripts/kconfig/lxdialog/checklist.c:116: error: ‘WINDOW’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:116: error: (Each undeclared identifier is reported only once
scripts/kconfig/lxdialog/checklist.c:116: error: for each function it appears in.)
scripts/kconfig/lxdialog/checklist.c:116: error: ‘dialog’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:116: error: ‘list’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:116: 警告: カンマ演算子の左側の式に効力がありません
scripts/kconfig/lxdialog/checklist.c:129: 警告: implicit declaration of function ‘getmaxy’
scripts/kconfig/lxdialog/checklist.c:129: error: ‘stdscr’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:130: error: ‘KEY_MAX’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:131: 警告: implicit declaration of function ‘getmaxx’
scripts/kconfig/lxdialog/checklist.c:137: error: ‘COLS’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:138: error: ‘LINES’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:140: 警告: implicit declaration of function ‘draw_shadow’
scripts/kconfig/lxdialog/checklist.c:142: 警告: implicit declaration of function ‘newwin’
scripts/kconfig/lxdialog/checklist.c:143: 警告: implicit declaration of function ‘keypad’
scripts/kconfig/lxdialog/checklist.c:143: error: ‘TRUE’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:145: 警告: implicit declaration of function ‘draw_box’
scripts/kconfig/lxdialog/checklist.c:146: error: ‘struct dialog_color’ has no member named ‘atr’
scripts/kconfig/lxdialog/checklist.c:146: error: ‘struct dialog_color’ has no member named ‘atr’
scripts/kconfig/lxdialog/checklist.c:147: 警告: implicit declaration of function ‘wattrset’
scripts/kconfig/lxdialog/checklist.c:147: error: ‘struct dialog_color’ has no member named ‘atr’
scripts/kconfig/lxdialog/checklist.c:148: 警告: implicit declaration of function ‘mvwaddch’
scripts/kconfig/lxdialog/checklist.c:150: 警告: implicit declaration of function ‘waddch’
scripts/kconfig/lxdialog/checklist.c:151: error: ‘struct dialog_color’ has no member named ‘atr’
scripts/kconfig/lxdialog/checklist.c:154: 警告: implicit declaration of function ‘print_title’
scripts/kconfig/lxdialog/checklist.c:156: error: ‘struct dialog_color’ has no member named ‘atr’
scripts/kconfig/lxdialog/checklist.c:157: 警告: implicit declaration of function ‘print_autowrap’
scripts/kconfig/lxdialog/checklist.c:164: 警告: implicit declaration of function ‘subwin’
scripts/kconfig/lxdialog/checklist.c:171: error: ‘struct dialog_color’ has no member named ‘atr’
scripts/kconfig/lxdialog/checklist.c:171: error: ‘struct dialog_color’ has no member named ‘atr’
scripts/kconfig/lxdialog/checklist.c:189: 警告: implicit declaration of function ‘print_item’
scripts/kconfig/lxdialog/checklist.c:192: 警告: implicit declaration of function ‘print_arrows’
scripts/kconfig/lxdialog/checklist.c:195: 警告: implicit declaration of function ‘print_buttons’
scripts/kconfig/lxdialog/checklist.c:197: 警告: implicit declaration of function ‘wnoutrefresh’
scripts/kconfig/lxdialog/checklist.c:199: 警告: implicit declaration of function ‘doupdate’
scripts/kconfig/lxdialog/checklist.c:202: 警告: implicit declaration of function ‘wgetch’
scripts/kconfig/lxdialog/checklist.c:210: error: ‘KEY_UP’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:210: error: ‘KEY_DOWN’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:220: error: ‘FALSE’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:221: 警告: implicit declaration of function ‘scrollok’
scripts/kconfig/lxdialog/checklist.c:222: 警告: implicit declaration of function ‘wscrl’
scripts/kconfig/lxdialog/checklist.c:232: 警告: implicit declaration of function ‘wrefresh’
scripts/kconfig/lxdialog/checklist.c:293: 警告: implicit declaration of function ‘delwin’
scripts/kconfig/lxdialog/checklist.c:297: error: ‘KEY_LEFT’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:298: error: ‘KEY_RIGHT’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:310: 警告: implicit declaration of function ‘on_key_esc’
scripts/kconfig/lxdialog/checklist.c:312: error: ‘KEY_RESIZE’ undeclared (first use in this function)
make[1]: *** [scripts/kconfig/lxdialog/checklist.o] エラー 1
make: *** [menuconfig] エラー 2

ncurses-devは、インストールしてあります。
ii  libncurses5-dev          5.7+20090207-1ubuntu1    developer's libraries and docs for ncurses

何が原因でしょう。ちょっと前は、問題なくできたと思ったのですが…。

オフライン

 

#2 2009-07-04 22:05:11

petitbootang
メンバ
From: 東京都
登録日: 2009-02-12

Re: make menuconfig

linux-2.6.30.1 ということは、kernel.org から落としてきたやつでしょうかね?

Ubuntu の deb パッケージでも、linux-image-2.6.30-10-generic とか、
http://packages.ubuntu.com/ja/karmic/linux-image-2.6.30-10-generic

linux-image-2.6.31-1-generic とかも、出てたりする訳ですが、
http://packages.ubuntu.com/ja/karmic/linux-image-2.6.31-1-generic

特別、カーネルコンパイルしないといけない状況が発生してますか?
どちらも本来?は、karmic 用のバイナリなのですが、jaunty にも問題なくインストール出来ます。

実は私も少し前に、2.6.30 系をリビルドしたところ、出来損ないのパッケージを作ってしまい酷い目に合いました。CPU 周りを少しいじっただけなんですけどね・・・。
システム全体がおかしくなってしまい、旧いカーネルでもまったく起動が出来なくなり、上書きインストールを余儀なくされましたが。しかも、同じことを二回も三回もやってしまい(汗
2.6.30 のリビルドは鬼門かも・・・。

オフライン

 

#3 2009-07-04 22:57:04

hir0
メンバ
登録日: 2008-09-28

Re: make menuconfig

9.04で問題なくlinux-2.6.30.1.tar.bz2を展開してmenuconfigが立ち上がりました。
単純な工程なのでダウンロードファイルが壊れているかシステムがおかしいのか可能性としては前者じゃないかな。
手順は簡単なのでもう一度、圧縮ファイルのダウンロードから行なってみては?

ただpetitbootangさんのチャレンジを聞くと9.10まで待った方が良いかも。

オフライン

 

#4 2009-07-04 23:26:55

petitbootang
メンバ
From: 東京都
登録日: 2009-02-12

Re: make menuconfig

hir0 さん による投稿:

9.04で問題なくlinux-2.6.30.1.tar.bz2を展開してmenuconfigが立ち上がりました。

はい、私の環境でも特に問題なく、menuconfig も xconfig も立ち上がるんですよね(^^;)

そう言えば mini13i さんの環境が書いてないのですが、 9.04 じゃないんでしょうかね…。

オフライン

 

#5 2009-07-04 23:41:31

petitbootang
メンバ
From: 東京都
登録日: 2009-02-12

Re: make menuconfig

menuconfig が出来ても、そのあとのコンパイルで数時間かかった挙句に、魔の deb パッケージが出来てしまうのですが(泣

オフライン

 

#6 2009-07-05 00:04:03

hir0
メンバ
登録日: 2008-09-28

Re: make menuconfig

そうなんですよね、すごく時間が掛かって私にはキツいです。
明確な目的か取りあえずやってみる意気込みが無いと、、、10月が楽しみです、
CanonicalとJapanese Teamの皆さんありがとうございます。

オフライン

 

#7 2009-07-05 03:24:04

einundzwanzighundertsechs
メンバ
登録日: 2008-12-28

Re: make menuconfig

mini13iさん による投稿:

linux-2.6.30.1をコンパイルしようとしているのですが、
# make oldconfigの後、
make menuconfigに失敗します。エラーメッセージ配下のとおりです。
# make menuconfig
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:103: error: expected specifier-qualifier-list before ‘chtype’

直接の原因は chtype が typedef されていないことでしょう.

コード:

typedef int chtype;
struct a
{
    chtype x;
};

をそのままコピペしたのと,1行目を削除したのを gcc -c してエラーメッセージを比較してください.

今手元に有るカーネルソースは 2.6.28.9 のものですが,
chtype を typedef するのは ncurses.h で,
それを #include するのは dialog.h の #include CURSES_LOC のはずです.

ncurses.h を #include できていないのか? 原因追求の最初の一手は V スイッチを ON にすることでしょう.

$ make menuconfig V=1

コード:

  gcc -Wp,-MD,scripts/kconfig/lxdialog/.checklist.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer   -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/lxdialog/checklist.o scripts/kconfig/lxdialog/checklist.c

gcc の -D オプションで マクロ CURSES_LOC が設定されています.

ところで,# make ... が気になります.root 権限でカーネル構築しているのでしょうか?

オフライン

 

#8 2009-07-06 06:05:45

mini13i
メンバ
登録日: 2008-05-08

Re: make menuconfig

einundzwanzighundertsechs による投稿:

直接の原因は chtype が typedef されていないことでしょう.

コード:

typedef int chtype;
struct a
{
    chtype x;
};

をそのままコピペしたのと,1行目を削除したのを gcc -c してエラーメッセージを比較してください.

1行目を削除すると、同じエラーが出ます。

einundzwanzighundertsechs による投稿:

ncurses.h を #include できていないのか? 原因追求の最初の一手は V スイッチを ON にすることでしょう.

$ make menuconfig V=1

コード:

  gcc -Wp,-MD,scripts/kconfig/lxdialog/.checklist.o.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer   -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o scripts/kconfig/lxdialog/checklist.o scripts/kconfig/lxdialog/checklist.c

gcc の -D オプションで マクロ CURSES_LOC が設定されています.

同じになります。

einundzwanzighundertsechs による投稿:

ところで,# make ... が気になります.root 権限でカーネル構築しているのでしょうか?

最初にカーネル(2.0か2.4の頃)をビルドしたとき、rootでないとコンパイルに失敗して、それ以来ずーっと、root権限でやってました…。orz

なお、2.6.30系は、別の環境(hardy)では問題なくコンパイル〜起動出来ています。

オフライン

 

#9 2009-07-06 08:34:52

mini13i
メンバ
登録日: 2008-05-08

Re: make menuconfig

環境を書くのを忘れてました。
9.04のx86_64版です。

hardyで2.6.30をコンパイルしたのは、x86版です。

オフライン

 

#10 2009-07-06 17:11:54

einundzwanzighundertsechs
メンバ
登録日: 2008-12-28

Re: make menuconfig

gcc へのオプションがわかったので,私ならば次の原因追求に移ります.

さらに -H オプションを加えて #include をトレースする.

さらに -E -C オプションを加えてプリプロセッサ出力を調べる. この場合 -o オプションの引数は結果の出力先に換える.

オフライン

 

#11 2009-07-06 17:30:00

einundzwanzighundertsechs
メンバ
登録日: 2008-12-28

Re: make menuconfig

補足です.
-H オプションを加えたときはエラー出力に次の様なものが流れます.(冒頭のみ)

コード:

. scripts/kconfig/lxdialog/dialog.h
.. /usr/include/sys/types.h
... /usr/include/features.h
.... /usr/include/sys/cdefs.h
..... /usr/include/bits/wordsize.h
.... /usr/include/gnu/stubs.h

-E -C による出力(chtype の typedef あたりの抜粋)は次のようなものです.

コード:

/*
 * NCURSES_CH_T is used in building the library, but not used otherwise in
 * this header file, since that would make the normal/wide-character versions
 * of the header incompatible.
 */







typedef unsigned long chtype;
typedef unsigned long mmask_t;


# 1 "/usr/include/stdio.h" 1 3 4
/* Define ISO C stdio on top of C++ iostreams.
   Copyright (C) 1991, 1994-2007, 2008 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

オフライン

 

#12 2009-07-06 20:21:02

mini13i
メンバ
登録日: 2008-05-08

Re: make menuconfig

コード:

% gcc -H -E -C ...

をしたところ、NCURSES_CH... が出てこなかったので、

コード:

% ls -l /usr/include/ncurses.h 
lrwxrwxrwx 1 root root 8 2009-07-06 20:09 /usr/include/ncurses.h -> curses.h
% ls -l /usr/include/curses.h 
-rw-r--r-- 1 root root 0 2009-02-12 17:48 /usr/include/curses.h

ということで、libncurses5-devが壊れていると思われたため、パッケージの再インストールをしました。

コード:

# dpkg -i --force-overwrite libncurses5-dev_5.7+20090207-1ubuntu1_amd64.deb

その結果、

コード:

% ls -l /usr/include/curses.h 
-rw-r--r-- 1 root root 64614 2009-02-12 17:48 /usr/include/curses.h

となり、menuconfigできるようになりました。

丁寧なアドバイス、ありがとうございました。

オフライン

 

Board footer

Powered by FluxBB