[CMake] Fwd: CPack does not generate a RPM

Domen Vrankar domen.vrankar at gmail.com
Thu Apr 7 13:39:28 EDT 2016


> Let's assume, I have a library, e.g. liblibrary.so.5.6.7 and I have
> two symbolic links, so the result of "ls -l" would look like this
>
> liblibrary.so -> liblibrary.so.0
> liblibrary.so.0 -> liblibrary.so.5.6.7
> liblibrary.so.5.6.7
>
> And let's assume, I have these lines in my CMakeLists.txt:
>
> *******
> set(LIBRARIES
>         ${LIB}/liblibrary.so
>         ${LIB}/liblibrary.so.0
>         ${LIB}/liblibrary.so.5.6.7)
> #...
> install(FILES ${LIBRARIES} DESTINATION lib)
> *******
>
> Now, I call the commands "cmake . && make package" and I get a package
> "project1.1-Linux.rpm". After that, I try to install that package with
> "yum install project1.1-Linux.rpm", I get some strange dependency
> resolution errors, which would look like this
>
> --> Finished Dependency Resolution
> Error: Package: project1.1-1.x86_64 (/project1.1-Linux)
>            Requires: liblibrary.so.0()(64bit)
>  You could try using --skip-broken to work around the problem
>  You could try running: rpm -Va --nofiles --nodigest

Hi,

Not certain why that dependency problem occurs - will have to look
into it a bit further but it seems to be rpm issue (somehow it gets
the file dependencies wrong with symlinks to symlinks).

As a workaround you could disable auto requirements generation by setting:
set(CPACK_RPM_PACKAGE_AUTOREQ "NO")

Regards,
Domen


More information about the CMake mailing list