[openib-general] OFED 1.2 dapl and dat.conf

Doug Ledford dledford at redhat.com
Tue Feb 20 07:55:27 PST 2007


On Tue, 2007-02-20 at 17:44 +0200, Vladimir Sokolovsky wrote:
> On Tue, 2007-02-20 at 10:21 -0500, Doug Ledford wrote:
> > On Tue, 2007-02-20 at 17:05 +0200, Vladimir Sokolovsky wrote:
> > > > > Vladimir, can you tell me how the OFED 1.2 install scripts are 
> > > > > handling the dat.conf?
> > > > > 
> > > > > -arlin
> > > > > 
> > > 
> > > dat.conf updated by rpmbuild process:
> > > /usr/lib is replaced by %{_libdir} (<prefix>/lib for x86, ppc, ia64 and <prefix>/lib64 otherwise).
> > 
> > Which creates a multilib regression, aka when you install both the i386
> > and x86_64 versions of the dapl rpm, they both contain a dat.conf file
> > at the same location in the filesystem, but with different contents.
> > Whether you get the 32bit or 64bit version of the dat.conf file depends
> > on which is installed later.  Correspondingly, whichever version of the
> > library was installed first will be rendered inoperative by this problem
> > as it will be either a 32 or 64bit library that is searching for a
> > provider library, and the one it finds will be the opposite arch type of
> > itself, thereby preventing the dapl library from doing a dlopen on the
> > file.  Therefore, whatever version of the dapl library is installed
> > first will no longer be able to find any valid provider libraries.  This
> > is considered an error condition by our automated package testing tools
> > and we are not allowed to ship a package in this state.
> > 
> I can create /etc/dat32.conf and /etc/dat64.conf.

That's pretty much what I did for our next release, but it's crude.  The
other solution we've been discussing would be far preferable.

> Currently, in the OFED there is no separation to 32 and 64 bit RPMs.
> That is on x86_64, fot example, if 32bit libraries compilation succeeded
> then both 32 and 64bit libraries will be a part of the same RPM.

Assuming you actually built both 32 and 64bit dapl libraries, them being
in the same rpm wouldn't solve the problem that the generated dat.conf
would only be correct for one or the other, not for both.  And if you
want to create a dat32.conf and dat64.conf, then you need to munge the
dapl source code so that during a 64bit build it looks for dat64.conf
and in a 32bit build it looks for dat32.conf.  However, you need to
munge the source code in such a way as to have it be the same on both
32bit and 64bit builds, aka something like:

#ifdef __i386__
default_dapl_file = "/usr/local/ofed/etc/dat32.conf";
#else
default_dapl_file = "/usr/local/ofed/etc/dat64.conf";
#endif

If you make the mistake I made, which was to do one patch on 32bit
arches and a different patch on 64bit arches, then the source code
between the 32 and 64bit arches  differs, and guess what, that throws a
multilib regression as well because it breaks debuginfo packages :-/

I'll fix that in our next release.


-- 
Doug Ledford <dledford at redhat.com>
              GPG KeyID: CFBFF194
              http://people.redhat.com/dledford

Infiniband specific RPMs available at
              http://people.redhat.com/dledford/Infiniband
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20070220/cc5612bc/attachment.sig>


More information about the general mailing list