[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: basic biarch for amd64



a user told me off list:
> install amd64-libs

This alone mostly solved my problems: I was able to run a 64 bit binary on
an otherwise stock 32bit debian system with a 64 bit kernel

$ ldd hello_64                                                                  
        libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95658000)                  
        /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x0000002a95556000)

Ernest jw ter Kuile said:
> but note extra requirement: you must have a kernel compiled for Amd64 running.
> 
> I seem to remember that i386 arch came with a package with just such a kernel. 
> Install that (if indeed it does exist) and you'll be fine.

yes, they have 64bit kernels, and I had one on the machine I tested on.

Alex Perry <alex.perry@qm.com> said:
> > We already have a custom toolchain to build 64 binaries, static or
> > dynamic, and my only requirement for now is to be able to run 64
> > binaries on them.  Static only would be ok initially.
>
> Static is trivial; just put them into a suitable directory in the
> path. Nothing special required since no library searching will occur.

I thought it'd depend on ld.so, but apparently not even that. Good to know,
thanks.

> > At this point, I'd be much better off with a single debian 32 bit base
> > pushed to all machines (32 and 64 bits) so that I don't have to maintain
> > two sets of packages.  My only requirement for the 64 bit machines is to
> > be able to run custom compiled 64bit binaries on them.
>
> One of my machines is installed and administered as pure 32 bit but it has
> a 64 bit kernel with 32 bit emulation. There is a chroot that has a full
> amd64 environment (fully bootable, etc, for easy administration). However,
> the amd64 environment only exists as a convenient place to inherit
> libraries and the like for 64 bit applications. Such apps are installed on
> the 64 bit side, native, and the 32 bit /usr/local/bin has a soft link to
> a shared script that switches the environment over and execs the 64 bit
> binary. Yes, I know, I'm lazy. You can do better with having that script
> be changed into a compiled 32 bit C program that does an in-situ exec()
> and therefore behaves like a multicall binary.

that sounds a bit complicated, but indeed, I could install the 64bit
userland in a chroot if necessary.

> > Can I just steal that and whatever /lib64/libc.so is required from a RH
> > FC3 system, or maybe even some debian source, and be on my way? (that'd
> > be in addition to running your amd64 kernel)
>
> What you might want to do is create local deb packages that contain the
> static 64 bit package and do a dpkg-divert followed by a soft link if the
> kernel appears to be 64 bit capable. That will make it easy to push the
> packages out and administer them centrally across all machines.

Not bad idea.

Now, I'm curious about this:
gandalf [mc]# dpkg -L amd64-libs | grep lib64 | grep ld
/lib64/ld-2.3.2.so
/lib64/ld-linux-x86-64.so.2
/lib64/tls/ld-2.3.2.so
/lib64/tls/ld-linux-x86-64.so.2

gandalf [mc]# dpkg -L amd64-libs | grep usr/lib64/lib
/usr/lib64/libbz2.so.1.0.2
/usr/lib64/libpanel.so.5.4
/usr/lib64/libform.so.5.4
/usr/lib64/libmenu.so.5.4
/usr/lib64/libz.so.1.2.1.1
/usr/lib64/libbz2.so.1.0
/usr/lib64/libpanel.so.5
/usr/lib64/libform.so.5
/usr/lib64/libmenu.so.5
/usr/lib64/libz.so.1

I'm starting to think that maybe I can get the amd64 libs I'm missing from the
amd64 port, and copy them in /usr/lib64

For instance, I'm hoping that if I download
http://debian-amd64.alioth.debian.org/debian-pure64/pool/main/d/db2/libdb2_2.7.7.0-9_amd64.deb
I can just extract the content of lib in the package, and put it in /lib64
instead and be done

Does that sound like a reasonable hope?

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger marc_f@merlins.org for PGP key



Reply to: