On Mon, Jun 04, 2007 at 12:29:21PM +0200, Andrea Righi wrote:
> Bernard Li wrote:
> > Currently the issue I am facing is that the gcc which came with the
> > ppc64 system would some times build 32-bit binaries/libraries and some
> > times build 64-bit binaries/libraries.  Things like parted, are
> > compiled 32-bit but libc.so.6 ended up being 64-bit so when my
> > boel_binaries.tar.gz was retrieved, I would get the ELFCLASS error
> > (the gcc which came with my system is 32-bit even though my OS is
> > 64-bit).
> > 
> > Actually this may be an issue with the mklibs script in initrd_source
> > -- I'm not sure.  Not sure if updating the mklibs script would help in
> > this case, but currently we cannot update it to the latest version
> > since it requires building.  We also have some local modifications to
> > the script itself.
> 
> Another way could be to run mklibs in 2 steps (for 64-bit archs):
> 1 - find the 64-bit binaries (grepping for example the output of ldd and
> checking if there's a /lib64/), run mklibs only for this binaries and put the
> libraries in /lib64 (into the initrd and boel_binaries)
> 2 - find the 32-bit binaires in the same way and put the libraries in /lib (in
> initrd and boel_binaries)
> 
> Anyway, the best approach would be to build *only* 64-bit binaries in 64-bit
> architectures...

On a Power system it is typical to have userspace 32bit.  Unlike x86,
Power has access to the same number of general purpose registers in
32bit mode as 64bit (in x86_64 you get 8 more in 64bit mode), so 64bit
is just slower (by effectively 1/2ing you cache lines).  If you don't
need > 4GB memory, staying with 32bit binary is probably the way to go.

> > Right now I got things working by manually hacking the
> > boel_binaries.tar.gz (much like how Jing Sun described in his post:
> > http://www.mail-archive.com/[email protected]/msg02530.html),
> > but it would be nice if we can get SystemImager to do the right
> > thing.

My guess is that mklibs is doing it, based on the output of uname.  I
know the gentoo guys have a script for faking uname for a chroot from 64
-> 32bit mode.  That might be all you need to wedge in here to get
things to come out the way you want.

       -Sean

-- 
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________

Attachment: pgpTuMul6iJE2.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sisuite-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to