- PR -

glibcのコンパイル時にエラーが出てしまいます

1
投稿者投稿内容
stai
会議室デビュー日: 2005/11/12
投稿数: 4
投稿日時: 2005-11-12 19:22
題の通り、glibcをコンパイルしようとしたらエラーが出ます

状況は、ホームディレクトリにglibc用のディレクトリを作り、その中にソースを展開し、
さらにその中にlinuxthreadsを展開し、ビルド用(build)とインストール用(usrとusr/bin)ディレクトリを作成しました。
その後ビルド用ディレクトリの中で
../glibc-2.3.6/configure --enable-add-ons --prefix=/home/hoge/glibc-2.3.6/usr --libexecdir=/home/hoge/glibc-2.3.6/usr/bin
echo "cross-compiling = no" > configparms
を実行しmakeしました。
結果、
make -C sunrpc others
make[2]: Entering directory `/home/hoge/glibc-2.3.6/glibc-2.3.6/sunrpc'
CPP='gcc -E -x c-header' /home/hoge/glibc-2.3.6/build/elf/ld-linux.so.2 --library-path /home/hoge/glibc-2.3.6/build:/home/hoge/glibc-2.3.6/build/math:/home/hoge/glibc-2.3.6/build/elf:/home/hoge/glibc-2.3.6/build/dlfcn:/home/hoge/glibc-2.3.6/build/nss:/home/hoge/glibc-2.3.6/build/nis:/home/hoge/glibc-2.3.6/build/rt:/home/hoge/glibc-2.3.6/build/resolv:/home/hoge/glibc-2.3.6/build/crypt:/home/hoge/glibc-2.3.6/build/nptl /home/hoge/glibc-2.3.6/build/sunrpc/rpcgen -Y ../scripts -c rpcsvc/bootparam_prot.x -o /home/hoge/glibc-2.3.6/build/sunrpc/xbootparam_prot.T
make[2]: Leaving directory `/home/hoge/glibc-2.3.6/glibc-2.3.6/sunrpc'
make[1]: Leaving directory `/home/hoge/glibc-2.3.6/glibc-2.3.6'
Makefile:283: warning: overriding commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
../Makerules:1033: warning: ignoring old commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
Makefile:283: warning: overriding commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
../Makerules:1033: warning: ignoring old commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
Makefile:283: warning: overriding commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
../Makerules:1033: warning: ignoring old commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
Makefile:283: warning: overriding commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
../Makerules:1033: warning: ignoring old commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
Makefile:283: warning: overriding commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
../Makerules:1033: warning: ignoring old commands for target `/home/hoge/glibc-2.3.6/usr/bin/getconf'
cannot set up thread-local storage: set_thread_area failed when setting up thread-local storage

make[2]: *** [/home/hoge/glibc-2.3.6/build/sunrpc/xbootparam_prot.stmp] Error 127
make[1]: *** [sunrpc/others] Error 2
make: *** [all] Error 2
このようなエラーメッセージを吐いてとまります。
環境はslackware10.0、gcc3.3.4です。
いくら調べても解決方法がわかりませんでした。
どなたかご教授いただければ幸いです。
コブラ
ぬし
会議室デビュー日: 2003/07/18
投稿数: 1038
お住まい・勤務地: 神奈川
投稿日時: 2005-11-13 00:48
glibcのバージョンが適切でないような。
stai
会議室デビュー日: 2005/11/12
投稿数: 4
投稿日時: 2005-11-13 09:49
コブラさん、返信ありがとうございます。
>glibcのバージョンが適切でないような。
2.3.6ではまずいのですか?
具体的にはどのバージョンを使えばよいのでしょうか?
教えていただけたら助かります。
未記入
会議室デビュー日: 2005/11/17
投稿数: 1
投稿日時: 2005-11-17 00:14
自分もsunrpcで”cannot set up thread-local storage: set_thread_area failed ..."
のエラーが出てしまいます。調べるとkernel-2.6.xxでないとだめようなのですが、
(set_thread_area()が無いから??)どうなのでしょうか? 自分は kernel-2.4.xx(31)
でしかコンパイルできないので2.6.xx系を試せないのですが、sati さんの場合は
どうでしょうか?
それとsatiさんがlinuxthreadを新たに展開されてますが、" --enable-add-ons "を
付ければ、linuxthreadを展開する必要はないと思います。glibcにすでに含まれている
ようです。”warning: overriding commands for target”もそれが原因かも。
miyachan
会議室デビュー日: 2005/11/17
投稿数: 2
投稿日時: 2005-11-17 03:27
Slackware-8.0 + linux-2.4.31 + gcc-3.3.4な環境で
configure --enable-add-ons=linuxthreads --without-tls --without-__thread --prefix=/usr
でmakeできました...。但し、glibc-2.3.6のthread関係はlinux-2.6.x系nativeの
thread機能を前提としてるようなので、そろそろ私も2.4.x系カーネルは潮時かと
思っています...。
--enable-add-ons=linuxthreads はlinux-2.6.x系との組合せでmakeする時はたぶ
ん必要ないと思います(若干推測が入ってますが...)
(参考 http://web.kyoto-inet.or.jp/people/m-ito/linux/glibcvup.html )

[ メッセージ編集済み 編集者: miyachan 編集日時 2005-11-17 03:28 ]

[ メッセージ編集済み 編集者: miyachan 編集日時 2005-11-17 03:33 ]

[ メッセージ編集済み 編集者: miyachan 編集日時 2005-11-17 03:38 ]
stai
会議室デビュー日: 2005/11/12
投稿数: 4
投稿日時: 2005-11-17 03:30
未記入さん、返信ありがとうございます。
自分も2.6系列は試せないのでカーネルは2.4.31です。

>" --enable-add-ons "を
付ければ、linuxthreadを展開する必要はないと思います。

なんだかここが重要っぽいですね。。。
とりあえずこれが原因であることを願って、またチャレンジしてみます。
stai
会議室デビュー日: 2005/11/12
投稿数: 4
投稿日時: 2005-11-17 22:12
miyachanさん、お返事ありがとうございます。
>configure --enable-add-ons=linuxthreads --without-tls --without-__thread --prefix=/usr
この方法で無事ビルドできました。
ありがとうございます!
ずっと行き詰っていたポイントなので解決できて本当に助かっています。

お返事していただいたみなさん、ありがとうございました!
1

スキルアップ/キャリアアップ(JOB@IT)