Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] RPM build errors when creating multiple rpms
From: Christopher Irving (cirving_at_[hidden])
Date: 2008-03-18 15:15:34

On Tue, 2008-03-18 at 08:32 -0400, Jeff Squyres wrote:
> On Mar 17, 2008, at 2:34 PM, Christopher Irving wrote:
> > Well that fixed the errors for the case prefix=/usr but after
> > looking at
> > the spec file I suspected it would cause a problem if you used the
> > install_in_opt option. So I tried it and got the following errors:
> >
> > RPM build errors:
> > Installed (but unpackaged) file(s) found:
> > /opt/openmpi/1.2.5/etc/openmpi-default-hostfile
> > /opt/openmpi/1.2.5/etc/openmpi-mca-params.conf
> > /opt/openmpi/1.2.5/etc/openmpi-totalview.tcl
> >
> > I just don't think the inclusion of _sysconfdir needs to be wrapped
> > in
> > a condition statement. It needs to be included in either case,
> > installing to /opt or to /usr, and will already be correctly defined
> > for
> > both. So in the new spec file if you get rid of line 651 - %if !
> > %{sysconfdir_in_prefix} - and the closing endif on 653 it will work
> > for
> > both cases.
> Hmm. I'm having problems getting that to fail (even with a 1.2.5
> tarball and install_in_opt=1). That %if is there because I was
> running into errors when rpm would complain that some files were
> listed twice (e.g., under %{prefix} and %{sysconfdir}).
> I must not be understanding exactly what you're running if I can't
> reproduce the problem. Can you specify your exact rpmbuild command?

Okay, I'm no longer sure to which spec file you're referring. For
clarity, I'm now using the spec file you pointed me to in your original
reply, from revision 17372. With this file I no longer get any errors
when I run:

rpmbuild -bb --define 'build_all_in_one_rpm 0' --define
'configure_options \
--with-mip-f90-size=medium --with-tm=/usr/local/lib64' openmpi.spec

This is great for me since this is how I want to build my rpms. However
if I use the following command line with the new spec file I get the
above installed (but unpackaged) errors which is fine for me but bad for
anyone who wants to install in /opt.

rpmbuild -bb --define 'install_in_opt 1' \
--define 'build_all_in_one_rpm 0' --define 'configure_options \
--with-mip-f90-size=medium --with-tm=/usr/local/lib64' openmpi.spec

Now, if you removed line 651 and 653 from the new spec file it works for
both cases. You wont get the files listed twice error because although
you have the statement %dir %{_prefix} on line 649 you never have a
line with just %{_prefix}. So the _prefix directory itself gets
included but not all files underneath it. You've handled that by
explicitly including all files and sub directories on lines 672-681 and
in the runtime.file.

Going back to the original spec file, the one that came with the source
RPM, the problems where kind of reversed. Building with the
'install_in_opt 1' option worked just fine but when it wasn't set you
got the files listed twice error as I described in my original message.