[openfabrics-ewg] [PATCH OFED-1.1-rc7] openib.spec: solve rpm packaging issue with 64/32 bit binaries and libraries on ppc64

Hoang-Nam Nguyen hnguyen at de.ibm.com
Wed Oct 18 09:30:18 PDT 2006


Hi Michael,
> It might be easier to see what you are saying if you repost the fixed patch.
I just tested OFED-1.1-pre1 and here is what I see after install.sh terminated:
/usr/local/ofed # ls -1
backup/
bin/
lib/
man/
uninstall.sh

/usr/local/ofed # ls -1 bin
ibv_asyncwatch
ibv_devices
ibv_devinfo
ibv_rc_pingpong
ibv_srq_pingpong
ibv_uc_pingpong
ibv_ud_pingpong

/usr/local/ofed # file bin/ibv_devices 
bin/ibv_devices: ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV), for GNU/Linux 2.4.21, dynamically linked (uses shared libs), not stripped

/usr/local/ofed # ls -1 lib/
infiniband
libibverbs.so.1
libibverbs.so.1.0.0

/usr/local/ofed # file lib/libibverbs.so.1.0.0 
lib/libibverbs.so.1.0.0: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), not stripped

That means I got on my system 64-bit binaries and 32-bit libraries as 
explained in previous emails.

Below is my patch, which 1) makes sure that _libdir (dir for 64-bit libs) 
and _libdir32 (dir for 32-bit libs) don't point to the same dir and
2) sets _libdir to %prefix/lib64 and _libdir32 to %prefix/lib as
you proposed in another email.
Vlad, currently I check only for ppc64, but this could be necessary for
IA64 as well, isn't it?
Needless to say that this patch is very important for us as it
prevents inconsistent build results. Please accept it!

Thanks!
Nam


Signed-off-by: Hoang-Nam Nguyen <hnguyen at de.ibm.com>
---


 openib.spec |    5 +++++
 1 file changed, 5 insertions(+)


diff -Nurp openib-1.1_orig/openib.spec openib-1.1_work/openib.spec
--- openib-1.1_orig/openib.spec 2006-10-05 06:11:33.000000000 -0700
+++ openib-1.1_work/openib.spec 2006-10-17 13:42:05.000000000 -0700
@@ -40,6 +40,11 @@

 %{!?build_32bit: %define build_32bit 0}
 %{!?_libdir32: %define _libdir32 %{_prefix}/lib}
+ 
+%ifarch ppc64
+%define _libdir %{_prefix}/lib64
+%define _libdir32 %{_prefix}/lib
+%endif

 # %{!?MEMTRACK: %define MEMTRACK 0}
 %define MEMTRACK %(if ( echo %{configure_options} | grep "with-memtrack" > /dev/null ); then echo -n '1'; else echo -n '0'; fi)




More information about the ewg mailing list