[CentOS] Is there a way to _remove_ dependencies from an RPM built from source?

Fri Mar 2 09:06:35 UTC 2012
Phoenix, Merka <merka.phoenix at hp.com>

> -----Original Message-----
> From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf Of Michael Lampe
> I'm building my own openmpi packages derived from upstream SRPMs.
> Problem: The ones built with Intel's compiler can only be installed by force, because Intel doesn't register their provided libs with rpm.
> Any idea how this can be done?
> (Alternative ideas are appreciated as well -- as long as they don't read as: "make Intel fix this".)
> -Michael

This Intel knowledgebase article lists which libraries are redistributable from their compiler collection:


and this article on Intel's web site addresses which components may be redistributed by the end-developer to the end-user:


"Intel's redistributable compiler libraries package may be added to the distributed application package for any end-user application built or partially built with an Intel compiler that is distributed by an Intel customer who holds an Intel Commercial or Academic license for the associated Intel compiler product. The Intel redistributable compiler libraries package may be distributed as a separate non-modified module to the end-users of the distributed application."

In the paragraph above, Intel explicitly states that you may redistribute the libraries as a separate non-modified module to end users of your distributed application. This means that you could package the redistributable libraries into a sub-package (for example, as 'openmpi-libs') and list the sub-package as a dependency in the main package. If you need some help on how to create a sub-package within your SPEC file, I would be glad to provide some pointers -- as a systems integrator, I've had to maintain both existing RPMs and create new ones from scratch where there wasn't one.

Reading between the lines here, Intel may also have an implied restriction that the libraries only be redistributed with your application. When in doubt, ask. A link to Intel's forum for their C++ compiler is here: http://software.intel.com/en-us/forums/intel-c-compiler/ 

Regarding 'implicit' dependencies being recorded by RPM into the package, refer to the RPM documentation for an explanation of how RPM  (rpmbuild) determines the dependencies and how it records these into the package being built:


Internally, the rpmbuild utility uses a shell script to call the 'ldd' (list dynamic dependencies) utility to list and parse which shared libraries that an executable (or library) has been linked against.



Other helpful information:

Refer to this tech note available on Intel's web site for more information about using Intel compilers (C++, Fortran) with RedHat / CentOS / Fedora Linux: