GNOME Bugzilla – Bug 550231
missing dep on libffi in pygobject-2.0.pc
Last modified: 2009-05-17 15:09:16 UTC
If pygobject was built with ffi support, -lffi is manually added to the pkgconfig file. It would be better to add libffi as requirement to the pkgconfig file, then this dep is caught by rpm automatically.
Created attachment 117770 [details] [review] fix pkgconfig files This is how I have fixed this in the Mandriva package.
Does it mean libffi become mandatory? Or is it still possible to build without libffi?
No, libffi is still optional. But the pkg-config file should properly reflect this if ffi is enabled.
OK, hopefully it works as advertised ;) Sending ChangeLog Sending configure.ac Sending pygobject-2.0-uninstalled.pc.in Sending pygobject-2.0.pc.in Transmitting file data .... Committed revision 1065.
Unless there is a point linking all packages using pygobject directly against libffi (and I don’t think there is), it should be in Requires.private, not in Requires.
I'm absolutely clueless about packaging. Can you provide a patch?
Created attachment 134466 [details] [review] Use Requires.private Something like this should do the trick.
Götz: does it still work for your original purpose after this correction?
No, with the patch applied I get this error when building pygtk: checking for PYGOBJECT... configure: error: Package requirements (pygobject-2.0 >= 2.16.1) were not met: Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing `libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'PyGObject', not found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Deps in Requires.private are not picked up by rpm but they are still needed by pkg-config (it seems). So is this a bug in the automatic rpm dependancy generation?
I think we can settle on a rpm automatic deps or a pkg-config problem, so it is not a bug in pygobject if the ffi dep is in Requires.private. pygtk is fine if it is not linked with -lffi.
(In reply to comment #9) > Deps in Requires.private are not picked up by rpm but they are still needed by > pkg-config (it seems). So is this a bug in the automatic rpm dependancy > generation? Yes; for dependency generation purposes, Requires.private should be treated exactly as Requires.
OK, as I understand the correction patch from Josselin is correct and should be applied, and further fixes should go into rpm dependency finder, right?
I'll commit this as we are going to release 2.18 and as I understood the patch is correct.