View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012253CMakeCPackpublic2011-06-07 10:192011-06-10 05:04
ReporterFabien Spindler 
Assigned ToEric NOULARD 
StatusclosedResolutionwon't fix 
PlatformLinuxOSFedoraOS Version15 x86_64
Product VersionCMake 2.8.4 
Target VersionFixed in VersionCMake 2.8.4 
Summary0012253: CPack RPM generator self dependency trouble
DescriptionI'm able to produce an rpm package on my fedora 15 x86_64 system with cmake 2.8.4, but when I try to install the package I get the following error:

$ rpm -i libvisp-devel-2.6.1-1.fc15.x86_64.rpm
error: Failed dependencies: is needed by libvisp-devel-2.6.1-1.x86_64

libvisp-2 is created as a shared library by cmake:
ADD_LIBRARY(visp-2 ..)
  VERSION "2.6.1"
  COMPONENT libraries
In _CPack_Packages/x86_64/RPM/SPECS/libvisp-devel.spec I have:

Requires: cmake >= 2.6, libX11-devel >= 1.3, lapack-devel >= 3.2, libv4l-devel >= 0.6.2, libdc1394-devel >= 2.1.2, libxml2-devel >= 2.7.6, libpng-devel >= 2:1.2.44, libjpeg-devel >= 6b-46, Coin2-devel >= 2.5.0, SoQt-devel >= 1.5.0, opencv-devel >= 2.0


Here and are symlinks to The symlinks are created by cmake.

Note that when I build the library visp-2 as a static library libvisp-2.a, I'm able to install properly the rpm.

Any suggestion?

Additional InformationThis bug seems in relation with 0009927: CPack RPM generator does not seem to install symlinks
TagsNo tags attached.
Attached Files? file icon libvisp-devel.spec [^] (9,359 bytes) 2011-06-08 09:54
? file icon rpmbuild.out [^] (778 bytes) 2011-06-09 01:28

related to 0009927closedEric NOULARD CPack RPM generator does not seem to install symlinks 
related to 0011964closedEric NOULARD Handle lib64 library on Linux 

Eric NOULARD (developer)
2011-06-08 04:25

Hi Fabien,

I'm not sure about the issue, this may be related to bug 0011964 too.
In fact I do generate RPMs on F11..F13 for projects which includes
lib and symlinks created by CMake without trouble.

I dot not have F15 x86_64 at hand, but could try 2 things:

1) build & install the very same RPM on F15 x86 (32bits)
   and/or F14 x86_64 and see what happen.

2) on 64 bits system try to install in lib64 and not lib
  COMPONENT libraries
With 2.8.5 you'll be able to use GnuInstallDirs.cmake modules
which define CMAKE_INSTALL_LIBDIR with appropriate value
(lib or lib64) depending on the system.
Eric NOULARD (developer)
2011-06-08 04:58

Some complement,
If you don't want to install current 2.8.5 rc you can pick
the GNUInstallDirs.cmake module and use it locally in your project:;a=blob;f=Modules/GNUInstallDirs.cmake;h=a114dcb2e18c5c74ae32b092849b9e45be73379a;hb=126c993d [^]
Fabien Spindler (reporter)
2011-06-08 09:31

Hi Eric,

Thanks for your response.
I tried your second point without success.

In the spec file _CPack_Packages/x86_64/RPM/SPECS/libvisp-devel.spec I have now:


but when I try to install the rpm I come to the same error:

$ rpm -i libvisp-devel-2.6.1-1.fc15.x86_64.rpm
error: Failed dependencies: is needed by libvisp-devel-2.6.1-1.x86_64

I will now try to install Fedora 15 32bit on my VM.

Eric NOULARD (developer)
2011-06-08 09:43

Hi Fabien,

Could you tell me what you see when doing:

rpm -qpl libvisp-devel-2.6.1-1.fc15.x86_64.rpm
rpm -qp --requires libvisp-devel-2.6.1-1.fc15.x86_64.rpm
rpm -qp --provides libvisp-devel-2.6.1-1.fc15.x86_64.rpm

and may be attaching the corresponding spec file to the tracker.
Eric NOULARD (developer)
2011-06-08 09:46

One more question.
Do you use RPM component packaging ?
If so could you try a monolithic RPM build:
see [^]
Fabien Spindler (reporter)
2011-06-08 10:02

Below are the rpm command results:

$ rpm -qpl libvisp-devel-2.6.1-1.fc15.x86_64.rpm

$ rpm -qp --requires libvisp-devel-2.6.1-1.fc15.x86_64.rpm
cmake >= 2.6
lapack-devel >= 3.2
libX11-devel >= 1.3
libdc1394-devel >= 2.1.2
libjpeg-devel >= 6b-46
libpng-devel >= 2:1.2.44
libv4l-devel >= 0.6.2
libxml2-devel >= 2.7.6
opencv-devel >= 2.0
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

$ rpm -qp --provides libvisp-devel-2.6.1-1.fc15.x86_64.rpm
libvisp-devel = 2.6.1-1
libvisp-devel(x86-64) = 2.6.1-1

I see here a dash instead of an underscore in (x86-64) which seems strange to me!

Attached you will also found the spec file.

I use componant packaging. If I add set(CPACK_MONOLITHIC_INSTALL 1)
to build a monolithic rpm I get the same error.
Fabien Spindler (reporter)
2011-06-08 13:10

I have the same error on a F15 32bits.
Eric NOULARD (developer)
2011-06-08 13:39

Thank you for testing Fabien.
I'll try myself on some F14 or F15 32 bits tomorrow.

Currently I have no clue why it is requesting a dependency on itself.
By the way is the visp project this one: [^]

Is the current problem occuring on svn trunk or in some
uncommited changes?

I may have a look at the set of CMakeLists.txt you use
may I'll find something unsual.
Fabien Spindler (reporter)
2011-06-08 15:55

Yes, you point out the right project. The problem appears in the trunk

svn checkout svn:// [^] ViSP-code

The CPack config is handled in
CMakeModules/CPackConfig.cmake and

Fabien Spindler (reporter)
2011-06-08 16:04

If I remove all the material to handle components I get the same error.
Eric NOULARD (developer)
2011-06-08 17:30

I saw nothing special inside CMakeLists.txt

I'll try tomorrow on Fedora but could attach the rpmbuild output
to the tracker.
Eric NOULARD (developer)
2011-06-09 09:35

Renaming because the title is misleading
Eric NOULARD (developer)
2011-06-09 09:46
edited on: 2011-06-10 03:22

Hi Fabien,
Thanks you for the rpmbuild.out.

I did try to produce your RPM in a FC15-64 VM and I can reproduce the issue.

Now I know the precise symptom but I am not able to track down the cause...

In the process of building an RPM, rpmbuild scans the packaged files
in order to discover dependencies: [^]

In your case
/usr/lib/rpm/find-requires does find the required dependencies
/usr/lib/rpm/find-provides does NOT!!!

(this is NOT shown in rpmbuild.our after the line
  "Processing files: libvisp-devel-2.6.1-1.x86_64"
  Provides should appear here and there is none)

I tried with another project ( [^])
which builds shared libs and its works as expected.

There must be something odd I did not catch in your case.

May be you can try yourself with a stupid project build 1 shared lib and 1 exe
depending on it and you'll see (I hope) that the rpm building just works...

I suspect rpmbuild is not scanning the appropriate directory but
I cannot understand why it would work for requires and not for provides...

Eric NOULARD (developer)
2011-06-10 03:28

Hi Fabien,

I did some more investigation this morning and I must admit I did not
find anything uselfull. I wasn't able to find what in your CMake configuration
could cause this...
Launching rpmbuild by hand with extra verbose mode -vv did not bring more infos.

The fact that F15 32 bits show the same issue makes me think that
the culprit should be in the generated spec files somehow.

Do you have some other project for which you build RPMs with CPack ?
If yes do they exhibit the same kind of problem?
Fabien Spindler (reporter)
2011-06-10 04:13

I will create a new basic project to see if I can reproduce the error on it.
Eric NOULARD (developer)
2011-06-10 04:16


I found the culprit:
  COMPONENT libraries

you install the lib without execute permission which seems to break
the automatic provides machinery of rpmbuild.

could you try with:
  COMPONENT libraries

and tell me if the generated rpm becames installable after that.
You can check the rpm using:

rpm -qp --provides libvisp-devel-2.6.1-1.fc15.x86_64.rpm
Fabien Spindler (reporter)
2011-06-10 04:56

Wonderful it works.

$ rpm -qp --provides libvisp-devel-2.6.1-1.fc15.x86_64.rpm
libvisp-devel = 2.6.1-1
libvisp-devel(x86-64) = 2.6.1-1

Merci beaucoup.

Eric NOULARD (developer)
2011-06-10 05:04

This wasn't really a CPackRPM issue but a previously unknown rpmbuild behavior which does not handle library dependency discovery properly if they are not executable.

 Issue History
Date Modified Username Field Change
2011-06-07 10:19 Fabien Spindler New Issue
2011-06-08 04:04 Eric NOULARD Assigned To => Eric NOULARD
2011-06-08 04:04 Eric NOULARD Status new => assigned
2011-06-08 04:05 Eric NOULARD Relationship added related to 0009927
2011-06-08 04:11 Eric NOULARD Relationship added related to 0011964
2011-06-08 04:25 Eric NOULARD Note Added: 0026748
2011-06-08 04:58 Eric NOULARD Note Added: 0026752
2011-06-08 09:31 Fabien Spindler Note Added: 0026757
2011-06-08 09:43 Eric NOULARD Note Added: 0026758
2011-06-08 09:46 Eric NOULARD Note Added: 0026759
2011-06-08 09:54 Fabien Spindler File Added: libvisp-devel.spec
2011-06-08 10:02 Fabien Spindler Note Added: 0026760
2011-06-08 13:10 Fabien Spindler Note Added: 0026765
2011-06-08 13:39 Eric NOULARD Note Added: 0026766
2011-06-08 15:55 Fabien Spindler Note Added: 0026771
2011-06-08 16:04 Fabien Spindler Note Added: 0026773
2011-06-08 17:30 Eric NOULARD Note Added: 0026777
2011-06-09 01:28 Fabien Spindler File Added: rpmbuild.out
2011-06-09 09:35 Eric NOULARD Note Added: 0026804
2011-06-09 09:35 Eric NOULARD Summary CPack RPM generator cannot handle dependencies with symlinks => CPack RPM generator self dependency trouble
2011-06-09 09:46 Eric NOULARD Note Added: 0026806
2011-06-10 03:22 Eric NOULARD Note Edited: 0026806
2011-06-10 03:28 Eric NOULARD Note Added: 0026816
2011-06-10 03:29 Eric NOULARD Reproducibility always => sometimes
2011-06-10 03:29 Eric NOULARD Status assigned => feedback
2011-06-10 04:14 Fabien Spindler Note Added: 0026817
2011-06-10 04:14 Fabien Spindler Status feedback => assigned
2011-06-10 04:16 Eric NOULARD Note Added: 0026818
2011-06-10 04:56 Fabien Spindler Note Added: 0026819
2011-06-10 05:04 Eric NOULARD Note Added: 0026820
2011-06-10 05:04 Eric NOULARD Status assigned => closed
2011-06-10 05:04 Eric NOULARD Resolution open => won't fix
2011-06-10 05:04 Eric NOULARD Fixed in Version => CMake 2.8.4

Copyright © 2000 - 2018 MantisBT Team