Gimp's configure do not find Gegl libs

Hello, I have been trying to compile Gimp. To do so, I had to compile its dependencies Babl and Gegl. After doing so I use this command to try to compile it:

./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Gimp-2.6.0/ PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Gegl-0.1.6/lib/pkgconfig/

. And configures tells me:

It works fine for Babl but not for Gegl. Why is that? WHat can I do to change that? Thanks for your time.

First: i don't think you can set the variable PKG_CONFIG that way. Try:

export PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Gegl-0.1.6/lib/pkgconfig/
./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Gimp-2.6.0/

instead. You can also have a look into the configure script (its a shell script) and find out what it does when checking for Babl, then apply that knowledge to where it searches for Gegl. Most probably some environment setting is either missing or not in the correct form.

I hope this helps.

bakunin

Well I already used it before when compiling Gegl that needed Glib and Babl. Anyway the export attempt did not work. I started to look in the configure with

and of relevant stuff (it returned a lot of occurrences of "proBABLy") it returned this:

{ (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"babl >= 0.0.22\"") >&5
  ($PKG_CONFIG --exists --print-errors "babl >= 0.0.22") 2>&5
  pkg_cv_BABL_CFLAGS=`$PKG_CONFIG --cflags "babl >= 0.0.22" 2>/dev/null`
    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"babl >= 0.0.22\"") >&5
  ($PKG_CONFIG --exists --print-errors "babl >= 0.0.22") 2>&5
  pkg_cv_BABL_LIBS=`$PKG_CONFIG --libs "babl >= 0.0.22" 2>/dev/null`
            BABL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "babl >= 0.0.22"`
            BABL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "babl >= 0.0.22"`
                { { echo "$as_me:$LINENO: error: Test for babl failed. Please get it from http://gegl.org/" >&5
echo "$as_me: error: Test for babl failed. Please get it from http://gegl.org/" >&2;}
    { { echo "$as_me:$LINENO: error: Test for babl failed. Please get it from http://gegl.org/" >&5
echo "$as_me: error: Test for babl failed. Please get it from http://gegl.org/" >&2;}
now with gegl: { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gegl >= 0.0.18\"") >&5
  ($PKG_CONFIG --exists --print-errors "gegl >= 0.0.18") 2>&5
  pkg_cv_GEGL_CFLAGS=`$PKG_CONFIG --cflags "gegl >= 0.0.18" 2>/dev/null`
    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gegl >= 0.0.18\"") >&5
  ($PKG_CONFIG --exists --print-errors "gegl >= 0.0.18") 2>&5
  pkg_cv_GEGL_LIBS=`$PKG_CONFIG --libs "gegl >= 0.0.18" 2>/dev/null`
            GEGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gegl >= 0.0.18"`
            GEGL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gegl >= 0.0.18"`
                { { echo "$as_me:$LINENO: error: Test for GEGL failed. Please get it from http://gegl.org/" >&5
echo "$as_me: error: Test for GEGL failed. Please get it from http://gegl.org/" >&2;}
    { { echo "$as_me:$LINENO: error: Test for GEGL failed. Please get it from http://gegl.org/" >&5
echo "$as_me: error: Test for GEGL failed. Please get it from http://gegl.org/" >&2;}

I don't have knowledge of shell scripting but these two pieces seems to do the same checking for both. However gegl also has this:

ac_config_files="$ac_config_files tools/Makefile tools/pdbgen/Makefile ..... /*lots of directories not related to gegl*/  app/gegl/Makefile ..... /*more many other dir not gegl related*/ .... 

and finally

"app/gegl/Makefile") CONFIG_FILES="$CONFIG_FILES app/gegl/Makefile" ;;

On this app/geggl/Makefile dir there is a lot of .h and .c file and a Makefile.am and a Makefile.in file. Shall I look into them?

Also using ./configure --help, there are these environment variables

BABL_CFLAGS C compiler flags for BABL, overriding pkg-config
  BABL_LIBS   linker flags for BABL, overriding pkg-config
  GEGL_CFLAGS C compiler flags for GEGL, overriding pkg-config
  GEGL_LIBS   linker flags for GEGL, overriding pkg-config

I tried to use

 ./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Gimp-2.6.0/ PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig/ GEGL_LIBS=/media/34GB/Arquivos-de-Programas-Linux/Gegl-0.1.6/lib/ 

and also

./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Gimp-2.6.0/ PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.10/lib/pkgconfig/ GEGL_LIBS=/media/34GB/Arquivos-de-Programas-Linux/Gegl-0.1.6/lib/pkgconfig

and neither worked.

Fair enough. My reasoning was that somehow babl worked and gegl didn't. Comparing the two might have given a reason for why that is the case.

Whenever i have to compile something from source instead of directly calling the configure script i create a little script for that which looks like this:

export SOMEVAR="<some-setting>"
...
./configure --option1="...." \
            --option2="...." \
            .... | tee ./configure.lastrun

and i add/remove/change options only there. This way i can more easily reproduce what i have done and learn from what failed. Further, i have the file configure.lastrun with all the output to examine it even when it is not on screen any more.

I also found a pointer in the Developers Wiki about maybe the wrong gegl version being used:

See the given link for details about how to deal with that.

I hope this helps.

bakunin

[*] In GEGLs build directory run make uninstall.
[*] For GEGL checkout gegl-0-2, run make and make install.
[*] Go to the GIMP build directory and run autogen.sh again, run make and make install.


Ok, I went to the dir gegl-0.1.6 (its the building dir, the install dir is Gegl-0.1.6 with capital G) and executed make uninstall.

I am not sure of what he means by

 GEGL checkout gegl-0-2

It is to I simply run make and make install again from the build dir?

What s/he means is to get a fresh set of sources by checking them out from the version control system, presumably git. The underlying suspicion is that you have a version mismatch between the gegl library and the main gimp program.

I hope this helps.

bakunin

I did that, but there is no makefile, just a makefile.am. I tried to execute the autogen.sh file, but he complains that I do not have autoreconf. Do I have to download, compile and run autotools?

I also downloaded two never versions of Gegl, 0.2.2 and 0.3.0 and tried to build both. First Both complained about my Glib versions (2.28) being two old. The first required 2.32 and the second, 2.36. I downloaded it and build it. When passing it the new Glib to both with

./configure --prefix=/media/34GB/Arquivos-de-Programas-Linux/Gegl-0.2.0/ PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Babl-0.1.12/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Glib-2.28.0/lib/pkgconfig/ --disable-docs

, I received this same message from both (outisde gegl 0.3 requiring glib 2.36)

checking for GLIB - version >= 2.32.3... 
*** 'pkg-config --modversion glib-2.0' returned 2.36.0, but GLIB (2.28.0)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error: 
*** GLIB 2.32.3 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/.

Then I followed the error message tip and set up

 export LD_LIBRARY_PATH=/media/34GB/Arquivos-de-programas/Glib-2.36/lib

. It allowed the pass the configure part of gegl 0.2.2, but with the 0.3.0 I receive

Moved on to try to build the 0.2.0 and received this:

file=`echo ca | sed 's,.*/,,'`.gmo \
      && rm -f $file && /usr/local/bin/msgfmt -o $file ca.po
ca.po:6045:4: parse error
ca.po:6045: missing `msgstr' section
ca.po:6050:4: parse error
ca.po:6050: missing `msgstr' section
ca.po:6055:4: parse error
ca.po:6055: missing `msgstr' section
ca.po:6060:4: parse error
ca.po:6060: missing `msgstr' section
ca.po:6065:4: parse error
ca.po:6065: missing `msgstr' section
ca.po:6070:4: parse error
ca.po:6070: missing `msgstr' section
ca.po:6075:4: parse error
ca.po:6075: missing `msgstr' section
ca.po:6080:4: parse error
ca.po:6080: missing `msgstr' section
ca.po:6085:4: parse error
ca.po:6085: missing `msgstr' section
ca.po:6090:4: parse error
ca.po:6090: missing `msgstr' section
/usr/local/bin/msgfmt: too many errors, aborting
make[2]: *** [ca.gmo] Error 1
make[2]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/gegl-0.2.2/po'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/34GB/Arquivos-de-Programas-Linux/gegl-0.2.2'
make: *** [all] Error 2

This msgstr on /usr/local/bin is just a sym link to its real location in /media/34GB/Arquivos-de-Programas-Linux/Gettext-0.15/bin/msgfmt. Maybe that is the cause of the error messages?