[CMake] Using CPack to include shared libraries in rpms

Eric Noulard eric.noulard at gmail.com
Mon Feb 22 12:49:48 EST 2010


2010/2/22 Robert Knapke <knapkerd5 at gmail.com>:
> Eric,
>
> I looked online at the two websites you gave me, but they dont seem to have
> rpms for the linux builds that I am sending to.

>  I am using Suse 11.x.
> The people who are currently trying to install the program have Redhat.

This may not work as expected. Unfortunately if you build an [binary]
RPM on SuSE 11.x
it may not be installable and/or work on RedHat X.Y.

The baseline is an RPM built on SuSE may not work at all on another
RPM based distros
(RedHat, CentOS, Fedora, Mandriva...)

> If I made an rpm of the boost python library, would it work on their system?

For the same reason I doubt it. The version patchwork dependencies from
your system may be different from theirs.

> Either way (finding it online or creating it myself) the linux type will be different.

That's your main problem, if you want to be able to distributed binary
of your software
(either RPM or any other binary format) you should either built on the
same machine
as the target OR try to build static executable.

My favourite way to do that is to avoid binary distribution
alltogether and document
HOWTO to build from source, which may be fairly easy with CMake,
as an example:
http://www.nongnu.org/certi/certi_doc/Install/html/build.html

If you NEED to distribute binaries then build your application statically
(no shared lib dependencies) or built a binary for each platform you
need to support
(including the various linux distros).

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list