Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97162 - [PATCH] [merge request] basic support of multilib on ppc64
Summary: [PATCH] [merge request] basic support of multilib on ppc64
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: PPC64 Linux
: High normal
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-26 21:02 UTC by Yuta SATOH (RETIRED)
Modified: 2005-09-08 06:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for toolchain.eclass (toolchain.eclass.patch,1.96 KB, patch)
2005-06-26 21:04 UTC, Yuta SATOH (RETIRED)
Details | Diff
patch for glibc-2.3.4.20041102-r1.ebuild (glibc-2.3.4.20041102-r1.ebuild.patch,3.68 KB, patch)
2005-06-26 21:07 UTC, Yuta SATOH (RETIRED)
Details | Diff
patch for kernel-2.eclass (kernel-2.eclass.patch,666 bytes, patch)
2005-06-26 21:08 UTC, Yuta SATOH (RETIRED)
Details | Diff
toolchain.eclass.patch (toolchain.eclass.patch,2.55 KB, patch)
2005-07-02 16:05 UTC, Jeremy Huddleston (RETIRED)
Details | Diff
patch for glibc-2.3.4.20041102-r1.ebuild (glibc-2.3.4.20041102-r1.ebuild.patch,3.01 KB, patch)
2005-07-06 06:33 UTC, Yuta SATOH (RETIRED)
Details | Diff
FYI, glibc-2.3.5.ebuild.patch (glibc-2.3.5.ebuild.patch,2.27 KB, patch)
2005-07-06 06:35 UTC, Yuta SATOH (RETIRED)
Details | Diff
new ebuild: app-emulation/emul-linux-ppc-glibc-2.3.4.20041102-r1.ebuild (emul-linux-ppc-glibc-2.3.4.20041102-r1.ebuild,1.64 KB, text/plain)
2005-07-06 06:36 UTC, Yuta SATOH (RETIRED)
Details
metadata.xml for emul-linux-ppc-glibc (metadata.xml,287 bytes, text/plain)
2005-07-06 06:42 UTC, Yuta SATOH (RETIRED)
Details
patch for glibc-2.3.4.20041102-r1.ebuild (glibc-2.3.4.20041102-r1.ebuild.patch,3.02 KB, patch)
2005-07-06 06:57 UTC, Yuta SATOH (RETIRED)
Details | Diff
glibc-2.3.4.20041102-r2.ebuild (glibc-2.3.4.20041102-r2.ebuild,39.52 KB, text/plain)
2005-07-07 14:02 UTC, Yuta SATOH (RETIRED)
Details
Difference of 2.3.5 to 2.3.4.20041102-r2 (glibc-2.3.4.20041102-r2.ebuild.patch,6.89 KB, text/plain)
2005-07-07 14:05 UTC, Yuta SATOH (RETIRED)
Details
new ebuild: glibc-2.3.4.20041102-r2.ebuild (glibc-2.3.4.20041102-r2.ebuild,39.94 KB, text/plain)
2005-07-09 11:41 UTC, Yuta SATOH (RETIRED)
Details
Difference of 2.3.5 to 2.3.4.20041102-r2 (glibc-2.3.4.20041102-r2.ebuild.patch,8.24 KB, text/plain)
2005-07-09 11:42 UTC, Yuta SATOH (RETIRED)
Details
glibc-2.3.4.20041102-r2.ebuild right before commitment (glibc-2.3.4.20041102-r2.ebuild,40.18 KB, text/plain)
2005-07-13 06:13 UTC, Yuta SATOH (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuta SATOH (RETIRED) gentoo-dev 2005-06-26 21:02:37 UTC
I added multilib support to the following packages. 
Thereby, the basic multilib environment can be made. 

* sys-devel/gcc/gcc-3.4.4
* sys-libs/glibc/glibc-2.3.4.20041102-r1
* linux-headers/linux-headers-2.6.11 

I want to merge these into portage tree in several days. 
If it is a problem, please let me know. 

Moreover, please see the following URL for details. 

http://dev.gentoo.org/~nigoro/ppc64/multilib/

Thanks!
Comment 1 Yuta SATOH (RETIRED) gentoo-dev 2005-06-26 21:04:33 UTC
Created attachment 62025 [details, diff]
patch for toolchain.eclass

This patch adds multilib support to GCC.
Comment 2 Yuta SATOH (RETIRED) gentoo-dev 2005-06-26 21:07:38 UTC
Created attachment 62026 [details, diff]
patch for glibc-2.3.4.20041102-r1.ebuild

This patch adds multilib support to glibc.

[memo]
glibc-2.3.5 seems to have a problem on PPC64. 
So, I added multilib support to glibc-2.3.4.20041102-r1.
Comment 3 Yuta SATOH (RETIRED) gentoo-dev 2005-06-26 21:08:44 UTC
Created attachment 62027 [details, diff]
patch for kernel-2.eclass

This patch adds multilib support to linux-headers.
Comment 4 Yuta SATOH (RETIRED) gentoo-dev 2005-06-26 21:13:58 UTC
And, I committed the profile which supported multilib.
 
/usr/portage/profiles/default-linux/ppc64/dev/multilib
Comment 5 Yuta SATOH (RETIRED) gentoo-dev 2005-06-27 06:10:06 UTC
amd64 herds,

I changed your code in some parts in patches. 
I am sorry to trouble you, but could you check whether the problem is contained 
in it ?
Comment 6 Simon Stelling (RETIRED) gentoo-dev 2005-06-27 06:19:41 UTC
cc'ing eradicator, he's written most of the multilib stuff
Comment 7 Danny van Dyk (RETIRED) gentoo-dev 2005-06-27 10:46:00 UTC
(In reply to comment #5) 
> amd64 herds, 
>  
> I changed your code in some parts in patches.  
> I am sorry to trouble you, but could you check whether the problem is 
contained  
> in it ? 
 
This all looks good to me. What problem are you refering to? 
 
 
Comment 8 Yuta SATOH (RETIRED) gentoo-dev 2005-06-29 05:54:51 UTC
kugelfang,
Thanks for your advice.

The problem which I pointed out is a mistake in conditional branch or multilib
support code, for example. 
Since these packages were core packages, especially I thought before the
commitment that a check was required.

Next, I want to commit these.
May I commit these ?
Or should I assign someone to a fit person ?

Thank you.
Comment 9 Yuta SATOH (RETIRED) gentoo-dev 2005-07-01 22:47:08 UTC
toolchain herds,

I want these patches to be merged into Portage tree for the multilib support on 
ppc64.
Would you check my code and merge into Portage tree ?

[NOTE]
kernel-2.eclass was already merged by dostrow.
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-02 00:26:22 UTC
the CHOST/CBUILD stuff you do in the glibc ebuild is incorrect... I know you
think it's right as I originally made the same assumptions, but read the
documentation at the top of the ebuild from vapier about it... it has to do with
the way crossdev is setup.

Also, I'll review these more thuroughly tomorrow...
Comment 11 SpanKY gentoo-dev 2005-07-02 09:01:44 UTC
this hunk against toolchain.eclass is wrong:
-	   [[ $(tc-arch) == "amd64" && -z ${SKIP_MULTILIB_HACK} ]] ; then
+	   [[ $(tc-arch) == "amd64" || $(tc-arch) == "ppc64" && -z
${SKIP_MULTILIB_HACK} ]] ; then
Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-02 16:05:32 UTC
Created attachment 62513 [details, diff]
toolchain.eclass.patch

Here's a slightly updated toolchain.eclass.patch that I'll apply after
testing... but please make any glibc.eclass changes agains 2.3.5
Comment 13 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-02 16:08:12 UTC
rrr... I meant to say glibc.ebuild changes... not eclass... 2.3.5 is much
different than 2.3.4.20041102 in that I basically rewrote all the code to handle
multilib configurations and made it much more abstract... so it might "just
work" for you... the only problem might be bootstrapping.  You might need to
provide a 32bit glibc tarball to bootstrap the process much like amd64 does in
our upgrade script to 2005.0 (but we use the emul-x86-glibc package for this
purpose.
Comment 14 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 06:33:04 UTC
Created attachment 62755 [details, diff]
patch for glibc-2.3.4.20041102-r1.ebuild

glibc-2.3.5 seem to have a problem on ppc. 
So, I stick to this version.
Please see Bug #92794 for details.

BTW, I did not add emul-linux-ppc-glibc like amd64 to PDEPEND. 

Is it satisfactory if I write an upgrade document ?
Or is it better to add this ?
If it is necessary to add to PDEPEND, I will need to change some profiles.

Thank you.
Comment 15 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 06:35:00 UTC
Created attachment 62756 [details, diff]
FYI, glibc-2.3.5.ebuild.patch

[NOTE]
I have not fully tested this yet.
Comment 16 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 06:36:58 UTC
Created attachment 62757 [details]
new ebuild: app-emulation/emul-linux-ppc-glibc-2.3.4.20041102-r1.ebuild
Comment 17 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 06:42:10 UTC
Created attachment 62760 [details]
metadata.xml for emul-linux-ppc-glibc
Comment 18 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 06:45:31 UTC
My upgrade method from 2005.0

# First, change into multilib profile.
# It is required in order to apply, when CFLAGS_ppc compiles gcc etc.

rm /etc/make.profile
ln -s /usr/portage/profiles/default-
linux/ppc/2005.1/ppc64/multilib /etc/make.profile

echo "app-emulation/emul-linux-ppc-glibc ~ppc64" 
>> /etc/portage/package.keywords

emerge -v --oneshot '<=emul-linux-ppc-glibc-2.3.4.20041102-r1'
emerge -v --oneshot '>=sys-devel/binutils-2.15.90.0.3-r4'
FEATURES=-sandbox emerge gcc
emerge -v --oneshot '>=sys-apps/portage-2.0.51-r9'
emerge -v --oneshot '>=sys-devel/gcc-config-1.3.9'
emerge -v --oneshot '>=linux-headers-2.6.11'

rm /lib32 /usr/lib32
mkdir /lib32 /usr/lib32
cp /emul/linux/ppc/lib32/libsandbox.so /usr/lib32
cp /emul/linux/ppc/usr/lib32/libc.so /usr/lib32
cp /emul/linux/ppc/usr/lib32/libpthread.so /usr/lib32
cp /emul/linux/ppc/usr/lib32/*crt*.o /usr/lib32
env-update

emerge -v --oneshot baselayout
emerge -v --oneshot '>=sys-libs/glibc-2.3.4.20041102-r1'
emerge unmerge emul-linux-ppc-glibc
Comment 19 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 06:57:47 UTC
Created attachment 62762 [details, diff]
patch for glibc-2.3.4.20041102-r1.ebuild 

my bad...
Comment 20 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 09:15:04 UTC
We want to provide stages which supported multilib at 2005.1. 
Would you merge the following, if there is no big problem in parts other than 
upgrade support ? 

* toolchain.eclass.patch (Attachment #62513 [details, diff])
* patch for glibc-2.3.4.20041102-r1.ebuild (Attachment #62762 [details, diff])
* app-emulation/emul-linux-ppc-glibc-2.3.4.20041102-r1.ebuild (Attachment 
#62757 [details])

Thank you.
Comment 21 Yuta SATOH (RETIRED) gentoo-dev 2005-07-06 09:56:46 UTC
(In reply to comment #18)
Update my upgrade method from 2005.0

# First, change into 64bit-userland profile for fix_lib64_symlinks.

rm /etc/make.profile
ln -s /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/64bit-
userland /etc/make.profile

emerge glibc

# Next, change into multilib profile.
# It is required in order to apply, when CFLAGS_ppc compiles gcc etc.

rm /etc/make.profile
ln -s /usr/portage/profiles/default-
linux/ppc/2005.1/ppc64/multilib /etc/make.profile

[snip]
Comment 22 Yuta SATOH (RETIRED) gentoo-dev 2005-07-07 14:02:34 UTC
Created attachment 62861 [details]
glibc-2.3.4.20041102-r2.ebuild

based on 2.3.5 ebuild
Comment 23 Yuta SATOH (RETIRED) gentoo-dev 2005-07-07 14:05:03 UTC
Created attachment 62862 [details]
Difference of 2.3.5 to 2.3.4.20041102-r2
Comment 24 Yuta SATOH (RETIRED) gentoo-dev 2005-07-07 14:08:56 UTC
glibc-2.3.4-patches-0.1.tar.bz2 is here.
http://dev.gentoo.org/~nigoro/ppc64/glibc/glibc-2.3.4-patches-0.1.tar.bz2

files list.

patches/1000_all_2.3.4-fedora-branch-no-libnoversion.patch
patches/1010_all_2.3.4-fedora-branch-no-force-nontls.patch
patches/2000_all_2.3.2-propolice-guard-functions-v3.patch
patches/2010_all_2.3.3-frandom-detect.patch
patches/3000_all_2.3.4-dl_execstack-PaX-support.patch
patches/3010_all_2.3.3_pre20040117-pt_pax.patch
patches/3020_all_2.3.4.20040808-i386-got-fix.patch
patches/3040_all_glibc-sec-hotfix-20040916.patch
patches/4000_all_2.3.4-hardened-sysdep-shared.patch
patches/5000_all_2.3.4-mdns-resolver-20041102.patch
patches/5010_all_2.3.4-features-header-fix.patch
patches/5020_all_nomalloccheck.patch
patches/5060_all_2.3.4-fix-_dl_next_tls_modid-assert.patch
Comment 25 Yuta SATOH (RETIRED) gentoo-dev 2005-07-07 16:10:10 UTC
(In reply to comment #22)
> Created an attachment (id=62861) [edit]
> glibc-2.3.4.20041102-r2.ebuild
> based on 2.3.5 ebuild

ug... It seems that upgrade support of my new ebuild has broken. 

<snip>
--- !targe sym /usr/lib64/libthread_db.so
--- !targe sym /usr/lib64/libbsd.a
--- !targe sym /lib64/libthread_db.so.1
--- !targe sym /lib64/libpthread.so.0
Traceback (most recent call last):
  File "/usr/bin/emerge", line 3074, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1903, in merge
    retval=unmerge("clean", [xsplit[0]])
  File "/usr/bin/emerge", line 2188, in unmerge
    retval=portage.unmerge(mysplit[0],mysplit
[1],portage.root,mysettings,unmerge_action not in ["clean","prune"])
  File "/usr/lib/portage/pym/portage.py", line 2828, in unmerge
    mylink.unmerge(trimworld=mytrimworld,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 6281, in unmerge
    a=doebuild
(myebuildpath,"postrm",self.myroot,self.settings,use_cache=0,tree="vartree")
  File "/usr/lib/portage/pym/portage.py", line 2542, in doebuild
    return spawn
(EBUILD_SH_BINARY+" "+mydo,mysettings,debug=debug,free=1,logfile=logfile)
  File "/usr/lib/portage/pym/portage.py", line 1567, in spawn
    return portage_exec.spawn_bash(mystring,env=env,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 46, in spawn_bash
    return spawn(args,env=env,opt_name=opt_name,**keywords)
  File "/usr/lib/portage/pym/portage_exec.py", line 160, in spawn
    raise str(e)+":\n   "+myc+" "+string.join(myargs)
[Errno 2] No such file or directory:
   /bin/bash [glibc-2.3.4.20041102-r1] bash -c /usr/lib/portage/bin/ebuild.sh 
postrm
!!! FAILED postrm: 1
</snip>
Comment 26 Yuta SATOH (RETIRED) gentoo-dev 2005-07-09 11:41:30 UTC
Created attachment 63022 [details]
new ebuild: glibc-2.3.4.20041102-r2.ebuild

fixes problem of comment #25 and some minor problems.

I did the basic test to this ebuild.

* Merge in the environment of 2005.0
* Upgrade to multilib environment from no-multilib profile

It seems to operate appropriately. 
Would you check this ebuild ?
After it was checked by you, we will do a more detailed test.
Comment 27 Yuta SATOH (RETIRED) gentoo-dev 2005-07-09 11:42:00 UTC
Created attachment 63023 [details]
Difference of 2.3.5 to 2.3.4.20041102-r2
Comment 28 Jeremy Huddleston (RETIRED) gentoo-dev 2005-07-10 22:53:13 UTC
( use amd64 || use ppc64 ) should be { use amd64 || use ppc64 }

Also, when youu commit the ebuild, you might also want to merge these hunks into
the 2.3.5 and 2.3.5.XXX ebuild:

@@ -274,7 +294,7 @@
 	# 2005.0 is setup properly, and this is executed as part of the
 	# 2004.3 -> 2005.0 upgrade script.
 	# It can be removed after 2004.3 has been purged from portage.
-	use amd64 && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile &&
fix_lib64_symlinks
+	( use amd64 || use ppc64 ) && [ "$(get_libdir)" == "lib64" ] && !
has_multilib_profile && fix_lib64_symlinks
 
 	# it appears that /lib/tls is sometimes not removed. See bug
 	# 69258 for more info.
@@ -942,7 +963,8 @@
 		rm ${ROOT}/lib64
 		# now that lib64 is gone, nothing will run without calling ld.so
 		# directly. luckily the window of brokenness is almost non-existant
-		/lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
+		use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
+		use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
 		# all better :)
 		ldconfig
 		ln -s lib64 ${ROOT}/lib
@@ -1040,7 +1062,7 @@
 			powerpc64*)
 				export CFLAGS_ppc="${CFLAGS_ppc--m32}"
 				export CHOST_ppc="powerpc-unknown-linux-gnu"
-				export CDEFINE_ppc="__powerpc__"
+				export CDEFINE_ppc="!__powerpc64__"
 				export LIBDIR_ppc="lib"
 
 				export CFLAGS_ppc64="${CFLAGS_ppc64--m64}"
@@ -1295,12 +1317,18 @@
 		LIBDIR_x86="lib"
 	fi
 
+	if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] &&
! is_crosscompile; then
+		OLD_LIBDIR="$(get_libdir)"
+		LIBDIR_ppc="lib"
+	fi
+
 	toolchain-glibc_src_install
 
-	# Handle stupid lib32 BS on amd64
+	# Handle stupid lib32 BS on amd64 and ppc64
 	if [[ -n ${OLD_LIBDIR} ]] ; then
 		cd ${S}
-		LIBDIR_x86="${OLD_LIBDIR}"
+		[[ $(tc-arch) == "amd64" ]] && LIBDIR_x86="${OLD_LIBDIR}"
+		[[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc="${OLD_LIBDIR}"
 		unset OLD_LIBDIR
 
 		mv ${D}/lib ${D}/$(get_libdir)
@@ -1308,7 +1336,8 @@
 		dodir /lib
 		dodir /usr/lib
 		mv ${D}/usr/$(get_libdir)/locale ${D}/usr/lib
-		dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2
+		[[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2
/lib/ld-linux.so.2
+		[[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1
 
 		for f in ${D}/usr/$(get_libdir)/*.so; do
 			local basef=$(basename ${f})
Comment 29 Yuta SATOH (RETIRED) gentoo-dev 2005-07-13 05:53:33 UTC
eradicator,
I changed into { use amd64 || use ppc64 } from ( use amd64 || use ppc64 ).
And I got the following messages. 

well... What did you want to change into ?
Thank you.

# ebuild glibc-2.3.4.20041102-r2.ebuild unpack
/usr/portage/sys-libs/glibc/glibc-2.3.4.20041102-r2.ebuild: line 1375: syntax 
error: unexpected end of file

!!! ERROR: sys-libs/glibc-2.3.4.20041102-r2 failed.
!!! Function , Line 1702, Exitcode 1
!!! error sourcing ebuild
!!! If you need support, post the topmost build error, NOT this status message.


aux_get(): (0) Error in sys-libs/glibc-2.3.4.20041102-r2 ebuild. (1)
               Check for syntax error or corruption in the ebuild. (--debug)

Comment 30 Martin Schlemmer (RETIRED) gentoo-dev 2005-07-13 06:04:24 UTC
Need a ';' in there ...
Comment 31 Yuta SATOH (RETIRED) gentoo-dev 2005-07-13 06:13:11 UTC
Created attachment 63310 [details]
glibc-2.3.4.20041102-r2.ebuild right before commitment

The code added recently was merged.
And patches file name changed.

glibc-2.3.4-patches-0.1.tar.bz2 --> glibc-2.3.4.20041102-patches-1.0.tar.bz2
Comment 32 Yuta SATOH (RETIRED) gentoo-dev 2005-07-13 08:20:01 UTC
(In reply to comment #30)
> Need a ';' in there ...
azarah,
Thanks for your advice.
I fixed this problem by your comment.
Comment 33 Yuta SATOH (RETIRED) gentoo-dev 2005-07-21 04:00:56 UTC
all merged to portage tree.
thanks!

ppc64 herds,
please test glibc-2.3.4.20041102-r2 and glibc-2.3.5 .

I made glibc-2.3.4.20041102-r2 based on ebuild of glibc-2.3.5. 
I think that we can mark stable if there is no mistake into ebuild since the 
source file is using the same thing as glibc-2.3.4.20041102-r1.

And, it seemed to operate satisfactory when I tested recently glibc-2.3.5 
simply. 
So, if you judges that 2.3.5 is stable, please mark stable not glibc-
2.3.4.20041102-r2 but 2.3.5. 

Comment 34 Markus Rothe (RETIRED) gentoo-dev 2005-07-21 04:36:29 UTC
I am running 2.3.5 *very* long now and don't have problems on my G5. Also I have
positive reports on power3. I am currently testing on power5, but I'm looking
forward that this does not break.

So I vote for marking 2.3.5 stable, when we have testet it on a few more systems.
Comment 35 Yang Dehua 2005-08-29 08:54:24 UTC
I tried to use multilib in accordance with  your doc of 
"http://dev.gentoo.org/~nigoro/ppc64/multilib/", and failed with  'checking size of long   
double... configure: error: cannot compute sizeof (long double), 77' at 18th step(to 
emerge glibc for the second time). I looked at the config.log file, and it indicated that 
libsandbox.so could not be found. Actually libsandbox.so was in /usr/lib32 dir. What's 
wrong with it?   
Thank you. 
 
Dehua 
Comment 36 Jeremy Huddleston (RETIRED) gentoo-dev 2005-09-01 09:02:55 UTC
Yang, check out:
http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=1

Yes, it's amd64, but maybe you're hitting one of the common problems listed at
the bottom.
Comment 37 Yuta SATOH (RETIRED) gentoo-dev 2005-09-08 06:49:41 UTC
Yang,
I'm sorry. My guide was old contents. 
I updated the guide.
Please see it, when you shift to the multilib environment newly.

I think that glibc is installable by the following methods from your report.

# rm -rf /lib32 /usr/lib32 (Please make a backup copy, if you think that you 
are required.)
# ACCEPT_KEYWORDS=~ppc64 emerge -v --oneshot '>=emul-linux-ppc-glibc-
2.3.4.20041102-r1' 
# FEATURES=-sandbox emerge sandbox

# rm /lib32 /usr/lib32 
# mkdir /lib32 /usr/lib32 
# cp /emul/linux/ppc/usr/lib32/libsandbox.so /usr/lib32 
# cp /emul/linux/ppc/usr/lib32/libc.so /usr/lib32 
# cp /emul/linux/ppc/usr/lib32/libpthread.so /usr/lib32 
# cp /emul/linux/ppc/usr/lib32/*crt*.o /usr/lib32 
# env-update 

# ACCEPT_KEYWORDS=~ppc64 emerge -v --oneshot '=sys-libs/glibc-2.3.4.20041102-
r2' 
# emerge unmerge emul-linux-ppc-glibc