[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 07:45:19 PDT 2006


Hi Nam,
See my comments below,

On Tue, 2006-10-17 at 16:26 +0200, Hoang-Nam Nguyen wrote:

> Hi Vlad!
> > 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?
> Say, that's what Doug Ledford from RedHat told me and what's I heard
> from some other people. I personally don't mind to have all binaries
> also in 64-bit. The actual reason why I did that so far is because
> of my uncertainty which binaries OFED will build in total, hence this
> defensive solution for pre-release. I actually wanted a nicer solution
> via configure but was not able to put something like EXEEXT=64 to
> config-options or to use --program-suffix option.
> > 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...
> OK, that's true. On SELS 9ppc64 there is gdb for 32-bit and gdb64
> for 64-bit. And I just adopt that scheme.
> > 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.
> No. That's not true in my case. In openib.spec _libdir is thought to
> specify lib dir for 64 bit and should be 'prefix'/lib64 as you said.
> But it is 'prefix'/lib as I checked it.


I checked openib.spec:  

  35 %ifarch %{ix86} ia64
  36 %{!?_libdir: %define _libdir %{_prefix}/lib}
  37 %else
  38 %{!?_libdir: %define _libdir %{_prefix}/lib64}
  39 %endif


And for 32-bit libraries:
 559 %ifarch x86_64 ppc64
 560     %if %{build_32bit}

 .........
 571         env CFLAGS=%{flags32} CXXFLAGS=%{flags32} LDFLAGS=
%{ldflags32} FFLAGS=%{flags32} \
 572         ./configure --prefix=%{_prefix} --libdir=%{_libdir32}
--without-patch %{configure_options32}
 573         make user
 574         make DESTDIR=$RPM_BUILD_ROOT install_user
.........
 598     %else # Build libsdp 32 bit in any case
 599         %if %{build_libsdp}
 600             make -C src/userspace/libsdp clean
 601             env CFLAGS=%{flags32} CXXFLAGS=%{flags32} LDFLAGS=
%{flags32} FFLAGS=%{flags32} \
 602             ./configure --prefix=%{_prefix} --libdir=%{_libdir32}
--without-patch --with-libsdp
 603             make libsdp
 604             make DESTDIR=$RPM_BUILD_ROOT install_libsdp
 605         %endif
 606     %endif
 607 %endif


So, it is wierd that you got all libraries installed into 'prefix'/lib.

Are you working with OFED-1.1-rc7? 
Here, on PPC64 SLES10 I got both lib and lib64...

> That means both _libdir and _libdir32 point to the same dir. This
> causes the 64-bit libraries to be overwritten by the 32-bit
> libraries with the same name when configure is called
> second time. Furthermore the %files rule for libibverbs-util
> specifies only dir bin, not bin32 in addition. And the result is
> libibverbs-utils-1.0.4-0.ppc64.rpm contains only 64-bit binaries and
> 32-bit libraries. So the 64-bit binaries are useless without the
> corresponding 64-bit libraries.
> > 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 above.
> > See example from PPC64 with SLES10:
> > ibv_devinfo - 64-bit, linked with /usr/local//lib64/libibverbs.so.1
> > which is also 64-bit.
> Well, as explained above. But I hope you understand my problem.
> We only need to define which scheme of 64- and 32-bit exec and libs
> we want to pursue.
> So what do you think?
> Regards
> Nam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ewg/attachments/20061017/0b4cfeac/attachment.html>


More information about the ewg mailing list