> Gesendet: Samstag, 22. Dezember 2012 um 21:19 Uhr > Von: "Michael Schwendt" <mschwendt@xxxxxxxxx> > An: packaging@xxxxxxxxxxxxxxxxxxxxxxx > Betreff: Re: guayadeque pkgconfig question > On Sat, 22 Dec 2012 16:51:25 +0100 (CET), Martin Gansser wrote: > > > i am working on a review of guayadeque https://bugzilla.redhat.com/show_bug.cgi?id=853553 > > since serveral month. > > > > my question is: how is the best way to handle this particular wx lib using cmake. > > Can someone with more knowledge suggest a solution. > > > > Ivan the reviewer[mailto:drizt@xxxxxxx] didn't respond on any questions... > > he continues to insist that pkgconfig is the right way to do it. > > Part of this is due to language barriers and because you could have asked > Ivan early to quote/attach unified patches. > > Comment 40 of the ticket suggests that there exist helper methods for CMake > to query pkgconfig. That sounds just fine, provided that wxsqlite3-devel > included a working pkgconfig file, but it does not. Check this out: > > $ rpm -q wxsqlite3-devel > wxsqlite3-devel-3.0.1-1.fc18.x86_64 > $ rpmls wxsqlite3-devel|grep pc > -rw-r--r-- /usr/lib64/pkgconfig/wxsqlite3.pc > $ pkg-config --exists wxsqlite3 || echo "no" > no > > Just to demonstrate that it fails. Let's see why while still using > pkg-config instead of displaying the .pc file directly: > > $ pkg-config --libs wxsqlite3 > Package wxGTK-devel was not found in the pkg-config search path. > Perhaps you should add the directory containing `wxGTK-devel.pc' > to the PKG_CONFIG_PATH environment variable > Package 'wxGTK-devel', required by 'wxsqlite3', not found > > Oh! wxGTK-devel is an RPM package name, not a pkgconfig template name. > That doesn't work. The "Requires" dependencies in .pc files are pkgconfig > dependencies, not RPM dependencies. > > $ grep ^Req /usr/lib64/pkgconfig/wxsqlite3.pc > Requires: wxGTK-devel sqlite-devel > > Same mistake for sqlite-devel. > Does wxGTK-devel include a .pc file you could depend on? > The one for sqlite-devel is named "sqlite3": > > $ rpmls sqlite-devel|grep pkg > -rw-r--r-- /usr/lib64/pkgconfig/sqlite3.pc > > However, wxsqlite3 is linked with libsqlite already, so it shouldn't > be necessary to depend on sqlite3.pc. Unless the dep is needed for > the pkg-config --cflags query (i.e. if wxsqlite3 headers include > sqlite3 headers). > > Primary objective should be to fix wxsqlite3.pc, so that you can > query it with pkgconfig. > -- Michael thanks for the detailed explanation. I hope that I have understood everything correct. I proceed now to your instructions and have modified the file wxsqlite3.pc. Now it looks like this: prefix=/usr libdir=/usr/lib64 WXSQLITE_MINOR_VERSION=2.8 includedir=/usr/include Name: wxsqlite3 Description: C++ wrapper around the SQLite 3.x database URL: http://wxcode.sourceforge.net/components/wxsqlite3/ Version: 3.0.1 Requires: Libs: -L${libdir} -lwxcode_gtk2u_wxsqlite3-${WXSQLITE_MINOR_VERSION} -lgdk_pixbuf-2.0 Cflags: -I${includedir}/wx pkg-config --libs wxsqlite3 gives now the following: -lwxcode_gtk2u_wxsqlite3-2.8 -lgdk_pixbuf-2.0 finally the link loader had issued the following message: /bin/ld: CMakeFiles/guayadeque.dir/iPodMedia.o: undefined reference to symbol 'gdk_pixbuf_save_to_buffer' /bin/ld: note: 'gdk_pixbuf_save_to_buffer' is defined in DSO /lib64/libgdk_pixbuf-2.0.so.0 so try adding it to the linker command line /lib64/libgdk_pixbuf-2.0.so.0: could not read symbols: Invalid operation then I added also the option-lgdk_pixbuf-2.0 to the wxsqlite3.pc. If you have no objection, I would report the changes on wxsqlite3.pc upstream. Martin -- packaging mailing list packaging@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/packaging