Extension Development :: pkgconfig



By default compile-3.3.5 is set to use the headers for the most up to date libpng in the base dsl - I'd take a guess that libcairo in gtk 2.10.9 was compiled against a newer version of png but is looking at one of the dsl base versions instead.

Setting PKG_CONFIG_PATH to the location of the libpng pc file in gtk+-2.10.9_devs.dsl might fix the problem - alternatively, you could modify the Makefile(s) by hand to point to libpng in gtk+-2.10.9.dsl and the libpng headers in gtk+-2.10.9_devs.dsl

Setting PKG_CONFIG_PATH doesn't seems to change anything. modifying the Makefile is getting out of my depth now (used to know how to understand these files - but have now forgotten!)
andrewb -
There should be a libpng.pc or png.pc included with the gtk+-2.1.09 extension and that would be the one to use since it is the one included in the gtk extension and it is the one cairo was built against.  The libpng in gtk+-2.10.9 is version 1.2.8, and the latest version in base DSL is 1.2.5 I believe.  That may be the issue if you are using the pc file from compile-3.3.5 in this case.

Quote
modifying the Makefile is getting out of my depth now

- it shouldn't be too big a deal - if Jason's solution above doesn't work (sometimes the pkgconfig setting is ignored), you could try searching the Makefile on "lpng" which should turn up something like "PNG_LIBS = -lpng" and close to it there should be something like "PNG_CFLAGS = ...". You could then alter these to:

PNG_LIBS = -L/path-to-lib/ -lpng
PNG_CFLAGS = -I/path-to-header/

One issue I could see would be that it looks like you are compiling a dsl extension and that your libs will be amongst the base dsl libs in /usr/lib (unless the libpng in question is in /usr/local/lib). This means that there will be several libpng* in the same place and thus ./configure cannot figure out which one to use - you might need to modify the symlink libpng.so to point to the libpng* you want to use...

..or you could compile to /opt and hope to avoid this sort of pain  :)

Edit: BTW (and this is absolutely not a plug), libcairo in cairo-1.2.uci is compiled against the base dsl libpng -if all else fails, you could try compiling against this.

No sign of any string 'png' in the Makefile, either in the top level, or in the src directory. (only reference is to a gtkam.png icon file)

I've tried setting PKG_CONFIG_PATH to the pkconfig directory in gtk-+2.10.9 with libpng.pc in it & also creating a symlinkin /usr/local/lib (&/usr/lib)  to the libpng.so in gtk-+2.10.9. Still get the same errors.

Next Page...
original here.