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...

> 
> 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.
> 
> I don't have access to a x86_64 box right now, but can someone confirm
> that all the binaries we build (eg. parted) are 64-bit and also the
> libraries which come from boel_binaries.tar.gz?

On a x86_64 box:

# find bin sbin usr/bin usr/sbin lib lib64 -type f -exec file {} \; | grep 32
#

The same for the initrd_template:

# find . -type f -exec file {} \; | grep 32
#

So, for x86_64 *all* seems to be correctly compiled with 64-bit bins.

Unfortunately I've not a PPC64 to test it, but it would be very interesting to
execute the same commands in such arch.

BTW... shoudln't we replace all the statements:

< ifeq ($(ARCH),x86_64)

with:

> ifeq ($(USERSPACE64),1)

-Andrea

-------------------------------------------------------------------------
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