*Gentooインストールファイルをインストールする [#mc581654]
#ref(icon-penguin.png,nolink,right,around);~
-''初めに''
--作業環境~
---linux-2.6.14-sh(landisk.0.1)+debian26-etch上で作業を行った。
---/dev/hda7上にgentooシステムを構築する。ファイルシステムはext3で、容量はとりあえず10GB。
~
~
-''stage1 tarballのインストール''
#pre{{
landisk:~# mkfs.ext3 /dev/hda7
landisk:~# fsck.ext3 -c /dev/hda7

landisk:~# mkdir /mnt/gentoo
landisk:~# mount -t ext3 /dev/hda7 /mnt/gentoo

landisk:~# wget http://dev.gentoo.org/~matsuu/lantank/stage1-sh4-20051023.tar.bz2
landisk:~# tar xvjpf stage1-sh4-20051023.tar.bz2 -C /mnt/gentoo
}}

-''Portageのインストール''~
#pre{{
landisk:~# wget http://mirror.gentoo.gr.jp/snapshots/portage-20051125.tar.bz2
landisk:~# tar xvjpf portage-20051125.tar.bz2 -C /mnt/gentoo/usr
}}

-''__fpscr_values問題の回避''~
debian26-etchから以下のファイルをコピーする。~
#pre{{
landisk:~# cp /lib/libncurses.so.5.4 /mnt/gentoo/lib
}}


//-''distcc''~
//(gentoo本来のインストール方法から逸脱しますが、) 凄く時間がかかりそうなので、distccを導入してみます。~
//distccサーバはcolinux上で動作させます。~
//詳細は、[[distccを使ったクロスビルド環境構築メモ]]のLANDISK側の設定を参照のこと。~
//なお、distccを用いないのが本来のやり方ですので念のため。~
//--debian26環境下からコピー~
//<pre>
//landisk:~# cp /usr/bin/distcc    /mnt/gentoo/usr/bin
//landisk:~# cp -a /usr/lib/distcc /mnt/gentoo/usr/lib
//}}
//--設定スクリプト … /mnt/gentoo/root/distcc_setup
//<pre>
//export DISTCC_HOSTS=192.168.1.2
//export PATH=/usr/lib/distcc/bin:$PATH
//}}
//--/mnt/gentoo/etc/make.conf~
//distccで並列コンパイルを行います。下記を追加します。(4並列ビルドの例)~
//<pre>
//MAKEOPTS="-j4"
//}}
*Gentooベースシステムのインストール [#x20000bf]
-''ミラーサイトの選択''~
下記を/mnt/gentoo/etc/make.confに追加
#pre{{
GENTOO_MIRRORS="http://mirror.gentoo.gr.jp http://distfiles.gentoo.org \
 http://www.ibiblio.org/pub/Linux/distributions/gentoo"
}}
-''新しい環境に入る -- chroot''
#pre{{
landisk:~# cp /etc/resolv.conf /mnt/gentoo/etc
landisk:~# mount -t proc none /mnt/gentoo/proc

landisk:~# chroot /mnt/gentoo /bin/bash
landisk / # env-update
>>> Regenerating /etc/ld.so.cache...
landisk / # source /etc/profile
}}

-''Portageツリーの更新''~
&color(red){3時間近くかかりました。};~
#pre{{
landisk / # emerge --sync
}}

-''GLIBCのロケール''
#pre{{
landisk / # mkdir -p /etc/portage
landisk / # echo "sys-libs/glibc userlocales" >> /etc/portage/package.use
}}
/etc/locales.build へ下記を追加
#pre{{
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
de_DE/ISO-8859-1
de_DE@euro/ISO-8859-15
ja_JP.EUC-JP/EUC-JP
ja_JP.UTF-8/UTF-8
ja_JP/EUC-JP
}}

-''Native POSIX Threading Library (NPTL) を指定''~
--/etc/make.conf に下記を追加
#pre{{
USE="nptl"
}}

//-''distccでビルドを加速''~
//セルフでビルドすると何時になっても終わりそうに無いので、distccを使用してビルドを加速することにします。~
//手順は、[[Gentoo distcc ドキュメント「distccをブートストラップに使う」:http://www.gentoo.org/doc/ja/distcc.xml#doc_chap4]]を参考にしました。~
//~
//--/etc/make.conf に下記を追加
//<pre>
//FEATURES="distcc"
//MAKEOPTS="-j3"
//CC="sh4-unknown-linux-gnu-gcc
//}}
//--ユーザー distcc の追加
//<pre>
//landisk / # echo "distcc:x:240:2:distccd:/dev/null:/bin/false" >> /etc/passwd
//}}
//--distccのインストール
//<pre>
//landisk / # USE='-*' emerge --nodeps sys-devel/distcc
//}}
//--distccの設定~
//Win XP上のcolinuxをdistccサーバにするため、そのIPアドレスを指定した。~
//<pre>
//landisk / # /usr/bin/distcc-config --set-hosts "192.168.1.2"
//}}
//--distccクライアント(LANDISK)の設定~
//distccサーバはdebian26-etchを作成時に用いたcolinux環境を使用することにした。~
//本環境では、cc、gccの実体はgcc-4.0であるため、gentooが期待するgcc-3.4系とマッチしない。~
//つまり、gcc(cc)は使用できないので、その代わりにsh4-unknown-linux-gnu-gccを使用することにした。~
//(先に/etc/make.confでCC=sh4-unknown-linux-gnu-gccを指定したのはこのためである)。~
//~
//万が一、gcc(cc)が呼ばれた場合は、セルフのgcc(cc)が呼ばれるように、~
///usr/lib/distcc/bin/gcc(cc)を削除してdistcc対象からはずしておく。~
//<pre>
//landisk / # cd /usr/lib/distcc/bin
//landisk bin # rm cc gcc 
//}}
//--distccサーバ(colinux)の設定~
//sh4-unknown-linux-gnu-gccを、sh4-linux-gcc-3.4へリンクしておきます。~
//以上でdistccの設定は完了です。~
//~
//--パス設定~
//<pre>
//landisk / # export PATH="/usr/lib/ccache/bin:/usr/lib/distcc/bin:${PATH}"
//}}
-''Stage1 -> Stage2''~
#pre{{
landisk / # cd /usr/portage
landisk / # scripts/bootstrap.sh
}}
-''Stage2 -> Stage3''~
--ビルドパッケージの確認~
下記パッケージがビルドされるということ?
#pre{{
landisk / # emerge --pretend --newuse system

These are the packages that I would merge, in order:

Calculating system dependencies  ...done!

[ebuild  N    ] sys-libs/readline-5.0-r2  
[ebuild   R   ] sys-apps/baselayout-1.11.13-r1  
[ebuild   R   ] app-arch/bzip2-1.0.3-r5  
[ebuild  N    ] app-arch/cpio-2.6-r4  
[ebuild   R   ] app-arch/tar-1.15.1  
[ebuild   R   ] app-shells/bash-3.0-r12  
[ebuild  N    ] sys-libs/db-4.2.52_p2  
[ebuild   R   ] dev-lang/perl-5.8.6-r6  
[ebuild  N    ] sys-devel/bc-1.06-r6  
[ebuild  N    ] dev-libs/openssl-0.9.7e-r2  
[ebuild  N    ] dev-libs/expat-1.95.8  
[ebuild  NS   ] dev-lang/python-2.4.2  
[ebuild  N    ] net-misc/iputils-021109-r3  
[ebuild  N    ] dev-libs/popt-1.7-r1  
[ebuild  N    ] dev-perl/Locale-gettext-1.03  
[ebuild  N    ] sys-apps/help2man-1.33.1  
[ebuild  N    ] sys-devel/autoconf-2.13  
[ebuild  N    ] sys-devel/autoconf-wrapper-3-r1  
[ebuild  N    ] sys-devel/autoconf-2.59-r6  
[ebuild  N    ] sys-devel/automake-1.5  
[ebuild  N    ] sys-devel/automake-1.8.5-r3  
[ebuild  N    ] sys-devel/automake-1.6.3  
[ebuild  N    ] sys-devel/automake-1.7.9-r1  
[ebuild  N    ] sys-devel/automake-1.4_p6  
[ebuild  N    ] sys-devel/automake-wrapper-1-r1  
[ebuild  N    ] sys-devel/automake-1.9.6-r1  
[ebuild  N    ] sys-devel/libtool-1.5.20  
[ebuild  N    ] sys-apps/attr-2.4.19-r1  
[ebuild  N    ] sys-apps/acl-2.2.27  
[ebuild   R   ] net-misc/rsync-2.6.0-r6  
[ebuild     U ] net-misc/wget-1.10.2 [1.9.1-r5] 
[ebuild   R   ] sys-apps/coreutils-5.2.1-r6  
[ebuild   R   ] sys-apps/debianutils-2.14.1-r1  
[ebuild   R   ] sys-apps/diffutils-2.8.7-r1  
[ebuild   R   ] sys-apps/file-4.13  
[ebuild   R   ] sys-apps/findutils-4.1.20-r1  
[ebuild   R   ] sys-apps/gawk-3.1.4-r4  
[ebuild   R   ] sys-apps/grep-2.5.1-r8  
[ebuild  N    ] sys-apps/groff-1.19.1-r2  
[ebuild  N    ] sys-process/cronbase-0.3.2  
[ebuild  N    ] sys-apps/man-1.6-r1  
[ebuild  N    ] sys-apps/kbd-1.12-r5  
[ebuild  N    ] sys-apps/man-pages-2.13  
[ebuild   R   ] sys-apps/net-tools-1.60-r11  
[ebuild   R   ] sys-apps/portage-2.0.51.22-r3  
}}
 *** Portage will stop merging at this point and reload itself,
#pre{{
    recalculate dependencies, and complete the merge.
    You may avoid the remerging of packages by updating portage on its own.
[ebuild  N    ] sys-process/procps-3.2.5-r1  
[ebuild  N    ] sys-process/psmisc-21.6  
[ebuild   R   ] sys-apps/sed-4.1.4  
[ebuild  N    ] sys-libs/cracklib-2.8.3-r1  
[ebuild  N    ] dev-util/pkgconfig-0.17.2-r1  
[ebuild  N    ] sys-libs/pam-0.78-r3  
[ebuild  N    ] sys-apps/shadow-4.0.7-r4  
[ebuild  N    ] sys-apps/pam-login-3.17  
[ebuild   R   ] sys-apps/texinfo-4.8-r2  
[ebuild  N    ] sys-apps/which-2.16  
[ebuild   R   ] sys-devel/binutils-2.16.1  
[ebuild   R   ] sys-devel/bison-1.875d  
[ebuild   R   ] sys-devel/flex-2.5.4a-r6  
[ebuild   R   ] sys-devel/gcc-3.4.4-r1  
[ebuild   R   ] sys-devel/m4-1.4.3  
[ebuild   R   ] sys-devel/make-3.80-r2  
[ebuild  N    ] sys-libs/com_err-1.38  
[ebuild  N    ] sys-libs/ss-1.38  
[ebuild  N    ] sys-fs/e2fsprogs-1.38  
[ebuild   R   ] sys-libs/ncurses-5.4-r6  
[ebuild  N    ] sys-apps/hotplug-base-20040401  
[ebuild  N    ] sys-fs/udev-070-r1  
[ebuild   R   ] app-editors/nano-1.3.7  
[ebuild   R   ] app-arch/gzip-1.3.5-r8  
[ebuild   R   ] sys-libs/glibc-2.3.5-r2  
[ebuild  N    ] sys-apps/module-init-tools-3.1-r1  
[ebuild  N    ] sys-apps/tcp-wrappers-7.6-r8  
[ebuild  N    ] net-misc/openssh-4.2_p1  
[ebuild  N    ] sys-apps/busybox-1.00-r4  
[ebuild  N    ] sys-apps/hdparm-5.9  
[ebuild  N    ] app-crypt/hashalot-0.3-r1  
[ebuild  N    ] sys-apps/util-linux-2.12r  
[ebuild  N    ] sys-libs/pwdb-0.62  
}}
--システムのビルド~
#pre{{
landisk / # emerge --newuse system
}}
* コメント欄 [#j083cd64]

-勝手ながらコメント欄つけました。stage1はstage2,stage3+αを経由する必要があります。[[オフィシャルのハンドブック:http://www.gentoo.org/doc/ja/handbook/index.xml]]を参考にしていただけると幸いです。rebootする前にchrootして環境を構築するカタチになります。 -- [[matsuu]] &new{2005-10-07 (金) 12:42:50};
--sh用ハンドブックは用意できてませんが、ほぼx86のハンドブックに従えば構築できるはずです(kernelはsh-sourcesで読み替え、bootloaderはまだ用意できてません)。 -- [[matsuu]] &new{2005-10-07 (金) 12:48:41};
--それらしきドキュメントをみつけました。[[「5. Gentooインストールファイルをインストールする」:http://www.gentoo.org/doc/ja/handbook/handbook-x86.xml?part=1&chap=5]]この手順に沿ってやってみます。 -- [[管理人]] &new{2005-10-07 (金) 22:02:04};


-nptlはUSEフラグで設定可能です。/etc/make.confにUSE="nptl"を追加してやればnptlでコンパイルされます。 -- [[matsuu]] &new{2005-10-13 (木) 23:30:53};
--ひと段落したら、matsuuさんの使っているmake.confを公開してくだりませんか?gentoo素人の私にとっては、自由度が大きすぎて制御しきれないのです。汗 -- [[管理人]] &new{2005-10-14 (金) 00:27:05};
-何のオプションもつけずほぼデフォルト状態です。[[make.conf:http://dev.gentoo.org/~matsuu/lantank/make.conf.example]] -- [[matsuu]] &new{2005-10-15 (土) 07:45:11};


#comment
*↓過去のメモ [#me55ce86]
こける。
#pre{{
terminal.o: In function `terminal_goto_xy':
terminal.c:(.text+0x90): undefined reference to `tgoto'
terminal.c:(.text+0x98): undefined reference to `tputs'
terminal.o: In function `terminal_clear_to_eol':
terminal.c:(.text+0x194): undefined reference to `tputs'
terminal.o: In function `terminal_clear_screen':
terminal.c:(.text+0x1f4): undefined reference to `tputs'
terminal.o: In function `terminal_up_line':
terminal.c:(.text+0x254): undefined reference to `tputs'
terminal.o: In function `terminal_down_line':
terminal.c:(.text+0x2b4): undefined reference to `tputs'
terminal.o:terminal.c:(.text+0x314): more undefined references to `tputs' follow
terminal.o: In function `terminal_delete_lines':
terminal.c:(.text+0x4c0): undefined reference to `tgoto'
terminal.c:(.text+0x4c4): undefined reference to `tputs'
terminal.o: In function `terminal_insert_lines':
terminal.c:(.text+0x580): undefined reference to `tgoto'
terminal.c:(.text+0x584): undefined reference to `tputs'
terminal.o: In function `terminal_get_screen_size':
terminal.c:(.text+0x77c): undefined reference to `tgetnum'
terminal.o: In function `terminal_initialize_terminal':
terminal.c:(.text+0x904): undefined reference to `tgetent'
terminal.c:(.text+0x954): undefined reference to `tgetstr'
terminal.c:(.text+0x95c): undefined reference to `BC'
terminal.c:(.text+0x960): undefined reference to `PC'
terminal.c:(.text+0x974): undefined reference to `ospeed'
terminal.c:(.text+0xbc0): undefined reference to `ospeed'
terminal.c:(.text+0xc18): undefined reference to `tgetstr'
terminal.c:(.text+0xc64): undefined reference to `tgetflag'
terminal.o: In function `terminal_prep_terminal':
terminal.c:(.text+0xe54): undefined reference to `tputs'
terminal.o: In function `terminal_unprep_terminal':
terminal.c:(.text+0xf68): undefined reference to `tputs'
collect2: ld returned 1 exit status
make[3]: *** [ginfo] Error 1
make[3]: Leaving directory `/var/tmp/portage/texinfo-4.8-r1/work/texinfo-4.8/info'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/texinfo-4.8-r1/work/texinfo-4.8/info'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/texinfo-4.8-r1/work/texinfo-4.8'
make: *** [all] Error 2
}}
下記configureのワーニングが原因?~
/usr/lib/下ライブラリを見に行ってくれないような気がする。~
#pre{{
checking build system type... sh4-unknown-linux-gnu
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermlib... no
checking for tgetent in -ltermcap... no
checking for tgetent in -lterminfo... no
configure: WARNING: probably need a terminal library, one of: ncurses curses termlib termcap terminfo
}}

**解析 [#d82793f9]
-エラーログ詳細~
#pre{{
configure:6388: checking for tgetent in -lcurses
configure:6418: sh4-unknown-linux-gnu-gcc -o conftest -O2 -m4   conftest.c -lcurses   >&5
/lib/libcurses.so: undefined reference to `__fpscr_values@GLIBC_2.2'
collect2: ld returned 1 exit status
configure:6424: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GNU Texinfo"
| #define PACKAGE_TARNAME "texinfo"
| #define PACKAGE_VERSION "4.8"
| #define PACKAGE_STRING "GNU Texinfo 4.8"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "texinfo"
| #define VERSION "4.8"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define STDC_HEADERS 1
| #define HAVE_FCNTL_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_PWD_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_TERMCAP_H 1
| #define HAVE_TERMIO_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_SYS_FCNTL_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_WAIT_H 1
| #define GWINSZ_IN_SYS_IOCTL 1
| #define RETSIGTYPE void
| #define HAVE_DECL_MEMCHR 1
| #define HAVE_DECL_STRCOLL 1
| #define HAVE_DECL_STRERROR 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_STRCOLL 1
| #define HAVE_VPRINTF 1
| #define HAVE_BZERO 1
| #define HAVE_GETCWD 1
| #define HAVE_MEMSET 1
| #define HAVE_SETVBUF 1
| #define HAVE_SIGACTION 1
| #define HAVE_SIGPROCMASK 1
| #define HAVE_SIGSETMASK 1
| #define HAVE_STRCHR 1
| #define HAVE_MEMCPY 1
| #define HAVE_MEMMOVE 1
| #define HAVE_STRDUP 1
| #define HAVE_STRERROR 1
| #define HAVE_STRCASECMP 1
| #define HAVE_STRNCASECMP 1
| /* end confdefs.h.  */
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char tgetent ();
| int
| main ()
| {
| tgetent ();
|   ;
|   return 0;
| }
}}
ちなみに __fpscr_values は何処にあるかというと。。~
debian26上でgccを "-v" オプション付で実行し、リンクしてるLibを全部表示させてみる。~
そして、全てのLibを nm コマンドでなめて、__fpscr_valuesを探す。~
#pre{{
landisk:~# gcc -v -o conftest -O2 -m4  conftest.c -lcurses
省略…
 /usr/lib/gcc/sh4-linux/3.4.4/collect2 --eh-frame-hdr -m shlelf_linux 
-dynamic-linker /lib/ld-linux.so.2 -o conftest 
/usr/lib/gcc/sh4-linux/3.4.4/../../../crt1.o 
/usr/lib/gcc/sh4-linux/3.4.4/../../../crti.o 
/usr/lib/gcc/sh4-linux/3.4.4/crtbegin.o 
-L/usr/lib/gcc/sh4-linux/3.4.4 
-L/usr/lib/gcc/sh4-linux/3.4.4 
-L/usr/lib/gcc/sh4-linux/3.4.4/../../.. 
/tmp/cciAIf9t.o 
-lcurses 
-lgcc --as-needed -lgcc_s 
--no-as-needed -rpath-link /lib:/usr/lib -lc -lgcc 
--as-needed -lgcc_s --no-as-needed 
/usr/lib/gcc/sh4-linux/3.4.4/crtend.o 
/usr/lib/gcc/sh4-linux/3.4.4/../../../crtn.o

landisk:~# nm /usr/lib/gcc/sh4-linux/3.4.4/../../../crt1.o 
0000002c t L_abort
00000024 t L_fini
00000020 t L_init
00000028 t L_libc_start_main
0000001c t L_main
00000000 R _IO_stdin_used
00000000 D __data_start
&color(red){00000004 D __fpscr_values};
         U __libc_csu_fini
         U __libc_csu_init
         U __libc_start_main
00000000 T _start
         U abort
00000000 W data_start
         U main

}}
debian26では、/usr/lib/crt1.o に含まれることが判明。~
gentooの /usr/lib/crt1.o には、、、、存在するな〜!あれ?~
ちなみに、crt1.o は、glibc の一部。~
gentooでも同じように、"-v" オプション付で実行してみる。~
#pre{{
landisk ~ # sh4-unknown-linux-gnu-gcc -v -o  conftest -O2 -m4   conftest.c -lcurses
省略…
 /usr/libexec/gcc/sh4-unknown-linux-gnu/3.4.4/collect2 --eh-frame-hdr -m shlelf_linux 
-dynamic-linker /lib/ld-linux.so.2 -o conftest 
/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4/../../../crt1.o 
/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4/../../../crti.o 
/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4/crtbegin.o 
-L/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4 
-L/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4 
-L/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4/../../../../sh4-unknown-linux-gnu/lib 
-L/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4/../../.. /tmp/cccNCZOg.o 
-lcurses -lgcc -lgcc_eh -rpath-link /lib:/usr/lib -lc -lgcc -lgcc_eh 
/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4/crtend.o 
/usr/lib/gcc/sh4-unknown-linux-gnu/3.4.4/../../../crtn.o
/lib/libcurses.so: undefined reference to `__fpscr_values@GLIBC_2.2'
collect2: ld returned 1 exit status
}}
どうやら、__fpscr_values は存在するが、名前の解決ができないらしい。~
/lib/libcurses.so ってことは、ダイナミックライブラリ側に解決手段を持っているのかな〜?よ〜わからん!!~
debian26でlibcの実体 /lib/libc-2.3.5.so をチェック。~
#pre{{
landisk:~# objdump -T /lib/libc-2.3.5.so  | grep fpscr
001164c8  w   DO .data  00000008  GLIBC_2.2   __fpscr_values
}}
gentooでも、同様にチェック。~
#pre{{
landisk ~ # objdump -T /lib/libc-2.3.5.so  | grep fpscr
}}
存在しない。。。きっと、これだな!~
~
-''matsuuさんへ''~
%%下記にdebian26で使っているglibc-2.3.5用パッチを置いています。%%~
%%もし宜しければ、確認してみてもらえないでしょうか?%%~
%%http://eggplant.ddo.jp/www/download/debian26/source/glibc/additional-patch/ %%
--その後の調査で…~
%%glibcは正しいような気がしてきました。1st-stageのラベルミスマッチの原因は、推測ですが、%%~
%%gentoo以外の環境でビルドしたライブラリをパッケージングしているからかも?%%~
~
~
-''その他''
--これは趣味の問題でしょうけど、gentooのlibcはNPTLじゃないみたいですね。~
#pre{{
gentoo版
landisk ~ # getconf GNU_LIBPTHREAD_VERSION
linuxthreads-0.10

debian26版
landisk:~# getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.5
}}

--glibc-cvsでは、~
&color(red){GLIBC_PRIVATE __fpscr_values};になっているようです。~
debian26では&color(red){GLIBC_2.2};となっていますが、これは間違いのようです。~
&color(red){これは今後深刻な問題に発展するかもしれない!!。};~
&color(red){debian26(FC2や3も)の環境を使っている限り無問題ではあるけれど…};~
---多分下記パッチでOK!~
#pre{{
--- glibc-2.3.5/sysdeps/sh/sh4/Versions~        1970-01-01 09:00:00.000000000 +0900
+++ glibc-2.3.5/sysdeps/sh/sh4/Versions 2005-01-12 11:58:13.000000000 +0900
@@ -0,0 +1,5 @@
+ld {
+  GLIBC_PRIVATE {
+    __fpscr_values;
+  }
+}
--- glibc-2.3.5/sysdeps/sh/dl-machine.h~        2004-10-26 04:04:03.000000000 +0900
+++ glibc-2.3.5/sysdeps/sh/dl-machine.h 2005-10-13 22:07:08.000000000 +0900
@@ -459,6 +459,12 @@ _dl_start_user:\n\
        .long _rtld_local@GOT\n\
 .L_dl_fini:\n\
        .long _dl_fini@GOT\n\
+       .type __fpscr_values,@object\n\
+       .global __fpscr_values\n\
+__fpscr_values:\n\
+       .long   0\n\
+       .long   0x80000\n\
+       .weak __fpscr_values\n\
 .previous\n\
 ");
 
}}

~
**旧コメント欄 [#hc9d0a9c]
-あれ?ダメですか?なんでだろう... -- [[matsuu]] &new{2005-10-11 (火) 23:56:30};
--__fpscr_values@GLIBC_2.2が解決できないみたいです。どうやって対策するんだったけかな?思い出せない。。。 -- [[管理人]] &new{2005-10-12 (水) 21:53:27};
--stage1ファイルの生成はgentooネイティブで実施しているんですが...うーん。stage2も用意してみたのですがいかがでしょうか?すんません。 -- [[matsuu]] &new{2005-10-13 (木) 23:12:16};
--あ、だめかも... -- [[matsuu]] &new{2005-10-13 (木) 23:13:12};
--stage2でもダメっぽいです。objdunpやmnを駆使して、%%「GLIBC_2.2   __fpscr_values」となっているライブラリをgentoo環境でリビルドすれば、その世界で閉じた環境が作れると思います。%% &color(red){←嘘かも}; 結果的に、SH-LinuxのFC版やウチのdebian26版と非互換になってしまうかもしれませんが、それが本来あるべき姿だと思います。debian26も将来的には修正しなければ…。問題を気付かせて頂き、ありがとうございます。 -- [[管理人]] &new{2005-10-14 (金) 00:10:48};
-stage1-sh4-20050712.tar.bz2は__fpscr__values@GLIBC_2.2が含まれています。20050712は自分もそこから構築した実績があるので大丈夫だと思います。 -- [[matsuu]] &new{2005-10-15 (土) 15:23:08};
--そのglibcは何処の物ですか?debian26の物?もしそうなら、glibcを固定(ビルド対象から除外)すれは、、それでうまく行きそうです。ところで、gentooの方針として、glibc(__fpscr__values)はどうしますか?debian26では、[[memo/__fpscr_values]]の方針で行こうと思っていますが。 -- [[管理人]] &new{2005-10-16 (日) 12:28:21};
-gentooにはfedoraの__fpscr__valuesパッチを取り込んでたつもりですが、どこかでうまく行ってなかったようです。正直なところ私自身はよくわかってないので判断できないのですが、追随する方向で検討してみます。 -- [[matsuu]] &new{2005-10-19 (水) 22:50:30};
-/usr/portage/sys-libs/glibc/files/digest-glibc-2.3.5.20050722で参照されるglibc-2.3.5-branch-update-20050722.patch.bz2には、__fpscr_valuesのパッチが含まれていますね。もしこれを使用しているのなら問題なさそうです。 -- [[管理人]] &new{2005-10-20 (木) 00:24:24};

#comment

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS