[WBEL-users] 64-bit lib adventure

Robert Heller heller at deepsoft.com
Tue May 30 18:17:29 CDT 2006


  Jerry Amundson <jerry at pbs.com>,
  In a message on Tue, 30 May 2006 16:30:27 -0500, wrote :

JA> Short question : Why are i368 rpm's on the x86_64 iso's?

The AMD x86_64 processors are downwardly compatible with the 32-bit x86.
That is an Opteron is also an i686 processor and can run i686 programs. 
There is little point in re-compiling every silly like 3-line (or
30-line) utility for 64-bit.  So, the 32-bit shared libraries are
included with the 64-bit shared libraries.  The processor needs to make
a context switch to change between 64 and 32 bit operating modes.  This
means that a program built for an ix86 (32-bit) processor cannot
dynamically link to a 64-bit shared library --  it must dynamically link
to a 32-bit library.  And a 64-bit application cannot dynamically link
to a 32-bit library.  So, you need both libraries installed, in their
own separate execlib trees:

	/usr/lib 	for the 32-bit libraries
AND	/usr/lib64 	for the 64-bit libraries
(similarly for /lib and /lib64).

The 64-bit executables know to look for the 64-bit ld.so (in /lib64) and
the 32-bit executables will look for the 32-bit ld.so in /lib.  

JA> 
JA> Long question : 
JA> Trying an install to an image file (for xen, in this case) from a local 
JA> repo (also an x86_64 WBEL 4 system), something like...
JA> 
JA> dd if=/dev/zero of=/u0/xen/xen1r.img bs=1M count=2 seek=1024
JA> /sbin/mke2fs -F -j /u0/xen/xen1r.img
JA> mount -o loop /u0/xen/xen1r.img /mnt
JA> for i in console null zero ; do /sbin/MAKEDEV -d /mnt/dev -x $i ; done
JA> mkdir /mnt/etc
JA> mkdir /mnt/proc
JA> mount -t proc none /mnt/proc
JA> cat - > /mnt/etc/fstab<<EOF
JA> /dev/sda1               /                       ext3    defaults 1 1
JA> none                    /dev/pts                devpts  gid=5,mode=620 0 0
JA> none                    /dev/shm                tmpfs   defaults 0 0
JA> none                    /proc                   proc    defaults 0 0
JA> none                    /sys                    sysfs   defaults 0 0
JA> yum -c /root/yum-xen.conf --installroot=/mnt -y groupinstall Base
JA> 
JA> Results in...
JA> Error: Missing Dependency: libaudit.so.0 is needed by package pam
JA> Error: Missing Dependency: cracklib-dicts at i386 = 2.7-29 is needed by package cracklib
JA> 
JA> Did various things to succeed (will narrow it down for the next install),
JA> including...
JA> yum.conf:
JA> [main]
JA> cachedir=/var/cache/yum
JA> debuglevel=2
JA> logfile=/var/log/yum.log
JA> pkgpolicy=newest
JA> distroverpkg=redhat-release
JA> tolerant=1
JA> exactarch=1
JA> obsoletes=1
JA> #Added line for the Box to stay x86_64 clean
JA> exclude=*.i386 *.i686 *.i586
JA> 
JA> Also removed the audit-libs, cracklib, and pam "i386" packages from
JA> my /var/ftp/pub repo, and running...
JA> createrepo -x "*.i386.rpm" -g WhiteBox/base/comps.xml .
JA> 

You don't really want to do this!

You might need to tweek yum (or whatever) to make sure it updates both
the 32-bit and 64-bit shared libraries.  You don't need to install any
32-bit *programs* iff there is a 64-bit version and generally you don't
even think about 32-bit -devel packages.  There might be times when you
will want some silly little utility that has not been ported to 64-bit
(and might not be worth going through the hassle to make sure it is
totally 100% 64-bit clean).  You'll need the 32-bit shared libraries for
such programs.

JA> jerry
JA> _______________________________________________
JA> Whitebox-users mailing list
JA> Whitebox-users at beau.org
JA> http://beau.org/mailman/listinfo/whitebox-users
JA> 
JA>                                                                                      

Robert Heller             -- 978-544-6933
Deepwoods Software        -- Linux Installation and Administration
http://www.deepsoft.com/  -- Web Hosting, with CGI and Database
heller at deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk






                                       


More information about the Whitebox-users mailing list