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

Vladimir Sokolovsky vlad at mellanox.co.il
Tue Oct 17 06:48:41 PDT 2006


Hi Nam,
I reviewed the patch and I see that only ibv_* 64-bit binaries are
included with suffix 64 and all other binaries are overrided by 32-bit
versions.

Why do think that all binaries on ppc64 should be 32-bit?

I have here ppc64 server with SLES10 installed. I have checked the
binaries under /usr/bin directory: 
there are 64-bit binaries, 64-bit binaries with suffix 64 and 32-bit
binaries. So, I didn't see some standart there...

OFED-1.1-rc7 installs on ppc64 (same as on x86_64) both 32 and 64-bit
libraries under 'prefix'/lib and 'prefix'/lib64 correspondently and
64-bit binaries under 'prefix'/bin.

If you want to change this, lets do it for OFED-1.2.
If you have some issue with the current installation please describe it.

See example from PPC64 with SLES10:
ibv_devinfo - 64-bit, linked with /usr/local//lib64/libibverbs.so.1
which is also 64-bit.



mac01:/usr/local/bin # file ibv_devinfo
ibv_devinfo: ELF 64-bit MSB executable, cisco 7500, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped
mac01:/usr/local/bin # ldd ibv_devinfo
        linux-vdso64.so.1 =>  (0x0000000000100000)
        libibverbs.so.1 => /usr/local//lib64/libibverbs.so.1 (0x0000040000039000)
        libsysfs.so.1 => /lib64/libsysfs.so.1 (0x0000040000068000)
        libpthread.so.0 => /lib64/power4/libpthread.so.0 (0x0000040000089000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00000400000b8000)
        libc.so.6 => /lib64/power4/libc.so.6 (0x00000400000cd000)
        /lib64/ld64.so.1 (0x0000040000000000)
mac01:/usr/local/bin # file /usr/local//lib64/libibverbs.so.1
/usr/local//lib64/libibverbs.so.1: symbolic link to `libibverbs.so.1.0.0'
mac01:/usr/local/bin # file /usr/local//lib64/libibverbs.so.1.0.0
/usr/local//lib64/libibverbs.so.1.0.0: ELF 64-bit MSB shared object, cisco 7500, version 1 (SYSV), not stripped
mac01:/usr/local/bin # ibv_devinfo
hca_id: mthca0
        fw_ver:                         3.3.5
        node_guid:                      0002:c902:0021:2da8
        sys_image_guid:                 0002:c902:0021:2dab
        vendor_id:                      0x02c9
        vendor_part_id:                 23108
        hw_ver:                         0xA1
        board_id:                       MT_02B0120001
        phys_port_cnt:                  2
                port:   1
                        state:                  PORT_INIT (2)
                        max_mtu:                2048 (4)
                        active_mtu:             512 (2)
                        sm_lid:                 0
                        port_lid:               0
                        port_lmc:               0x00

                port:   2
                        state:                  PORT_INIT (2)
                        max_mtu:                2048 (4)
                        active_mtu:             512 (2)
                        sm_lid:                 0
                        port_lid:               0
                        port_lmc:               0x00


On Mon, 2006-10-16 at 14:57 +0200, Hoang-Nam Nguyen wrote: 
> Hi,
> > > Below is a patch to activate scaling code of ehca as default
> > > when building ehca module with OFED install script.
> > Do you need this patch for 1.1 release?
> > How critical is this?
> This is very important for us as it prevents in stress situation
> less drop packets for UD eg. by flood ping.
> Currently I've encountered another important issue as I reported
> once. That is: If I use install.sh to build and install
> kernel and user space stuff on ppc64, I got the user space
> binaries in 64bit only, eg. ibv_ud_pingpong64, ibv_devices64,
> while only 32bit libs eg. libibverbs.so are found. Hence
> the 64bit binaries are useless. I've been struggling with
> openib.spec, since I do think that the compiling is correct,
> but rpmbuild might mix up things inconsistently.
> Vlad, I appreciate if you could provide me with some hints
> why that does not work for me.
> Thanks!
> Nam Nguyen

Regards,
Vladimir



On Tue, 2006-10-17 at 13:42 +0200, Hoang-Nam Nguyen wrote:
> Hello,
> here is the patch to solve the reported issue with 64/32 bit binaries and libraries on ppc64
> in openib.spec.
> Note that this patch considers ppc64 only!
> Thanks!
> Nam
> 
> 
> Signed-off-by: Hoang-Nam Nguyen <hnguyen at de.ibm.com>
> ---
> 
> 
>  openib.spec |   22 ++++++++++++++++++++++
>  1 file changed, 22 insertions(+)
> 
> 
> diff -Nurp openib-1.1/openib.spec openib-1.1_patched/openib.spec
> --- openib-1.1/openib.spec 2006-10-05 06:11:33.000000000 -0700
> +++ openib-1.1_patched/openib.spec 2006-10-17 03:53:13.000000000 -0700
> @@ -38,6 +38,10 @@
>  %{!?_libdir: %define _libdir %{_prefix}/lib64}
>  %endif
>  
> +%ifarch ppc64
> +%define _libdir %{_prefix}/lib64
> +%endif
> +
>  %{!?build_32bit: %define build_32bit 0}
>  %{!?_libdir32: %define _libdir32 %{_prefix}/lib}
>  
> @@ -562,6 +566,16 @@ make DESTDIR=$RPM_BUILD_ROOT install_use
>          if [ -d $RPM_BUILD_ROOT%{_prefix}/bin ]; then
>              mv $RPM_BUILD_ROOT%{_prefix}/bin $RPM_BUILD_ROOT%{_prefix}/bin64
>          fi
> +%ifarch ppc64
> +     mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_ud_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_ud_pingpong64
> +     mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_rc_pingpong $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_rc_pingpong64
> +     mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_asyncwatch $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_asyncwatch64
> +     mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devices $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devices64
> +     mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devinfo $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_devinfo64
> +     mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_srq_pingpong  $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_srq_pingpong64
> +     mv $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_uc_pingpong  $RPM_BUILD_ROOT%{_prefix}/bin64/ibv_uc_pingpong64
> +%endif
> +         
>          if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin ]; then
>              mv $RPM_BUILD_ROOT%{_prefix}/sbin $RPM_BUILD_ROOT%{_prefix}/sbin64
>          fi
> @@ -586,6 +600,14 @@ make DESTDIR=$RPM_BUILD_ROOT install_use
>          if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin64 ]; then
>              mv $RPM_BUILD_ROOT%{_prefix}/sbin64 $RPM_BUILD_ROOT%{_prefix}/sbin
>          fi
> +%ifarch ppc64
> + if [ -d $RPM_BUILD_ROOT%{_prefix}/bin32 ]; then
> +    cp $RPM_BUILD_ROOT%{_prefix}/bin32/* $RPM_BUILD_ROOT%{_prefix}/bin
> + fi
> + if [ -d $RPM_BUILD_ROOT%{_prefix}/sbin32 ]; then
> +    cp $RPM_BUILD_ROOT%{_prefix}/sbin32/* $RPM_BUILD_ROOT%{_prefix}/sbin
> + fi
> +%endif
>          if [ -f $RPM_BUILD_ROOT%{_prefix}/sbin32/tvflash ] && [ ! -f $RPM_BUILD_ROOT%{_prefix}/sbin/tvflash ]; then
>              mkdir -p $RPM_BUILD_ROOT%{_prefix}/sbin
>              install -m 0755 $RPM_BUILD_ROOT%{_prefix}/sbin32/tvflash $RPM_BUILD_ROOT%{_prefix}/sbin/tvflash




More information about the ewg mailing list