
Ubuntu日本語フォーラム

ログインしていません。
Linux From ScratchをUbuntu10.04をホストに構築中です。
(参考)
http://lfsbookja.sourceforge.jp/svn.ja/index.html
glibc-2.11.2 の make時にコンパイルエラーが発生しました。
最終的には自己解決しましたが、同様の事象に関する情報が日本語では見つからず、
苦労したので投稿します。
[環境]
Ubuntu10.04
GCC (Ubuntu 4.4.3-4ubuntu5) 4.4.3
[事象]
LFS構築準備のためのツールチェーン構築時に、
以下のオプションでconfigre後
configure --prefix=/tools \
--host=/mnt/lfs/sources/glibc-build --build=$(../glibc-2.11.2/scripts/config.guess) \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.22.5 --with-headers=/tools/include \
libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
makeすると
../misc/syslog.c: In function ‘__vsyslog_chk’:
../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to ‘syslog’: function body not available
../misc/syslog.c:155: sorry, unimplemented: called from here
make[2]: *** [/mnt/adm/sources/glibc-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/mnt/adm/sources/glibc-src/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/adm/sources/glibc-src'
make: *** [all] Error 2
がでてコンパイル不可。
[解決法]
作業ディレクトリに " configparms"ファイルを以下内容で作成
CFLAGS += -O2 -U_FORTIFY_SOURCE -march=i486 -mtune=native -fno-stack-protector
その後上記の通りconfigureすれば、makeは問題なく実行可能でした。
その後の動作確認はこれからですが・・・・ね。
オフライン
kau さん による投稿:
LFS構築準備のためのツールチェーン構築時に、
以下のオプションでconfigre後
configure --prefix=/tools \
--host=/mnt/lfs/sources/glibc-build --build=$(../glibc-2.11.2/scripts/config.guess) \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.22.5 --with-headers=/tools/include \
libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
問題の make のエラーとは無関係かも知れませんが,強調表示した部分が間違ってます.
ここはプラットフォームの「三つ組」を指定します.
/* LFS ツールチェーンでは $LFS_TGT すなわち $(uname -m)-lfs-linux-gnu-gcc だそうです */
リンク先の文書を熟読されることを薦めます.
オフライン
>einundzwanzighundertsechsさん
ご指摘ありがとうございます。ご指摘の通りです。
環境変数に設定してた部分をここに書き写すときに・・・間違えました(汗)
実際は三つ組(i686-lfs-linux-gnu)を指定してました。
configure --prefix=/tools \
--host=i686-lfs-linux-gnu --build=$(../glibc-2.11.2/scripts/config.guess) \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.22.5 --with-headers=/tools/include \
libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes
です。
オフライン