Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-23 Thread Michael Natterer
On Sun, 2015-02-22 at 12:14 -0500, Elle Stone wrote:
 On 02/22/2015 11:27 AM, Partha Bagchi wrote:
  Welcome back. :)
 Thanks!
 
  Can you not simply pass the LIB statement to configure/autogen or
  adjust PKG_CONFIG_PATH?
 
 I use these commands to set up the prefix before installing and updating 
 babl/GEGL/GIMP:
 
 prefix=/home/elle/code/gimpdefault/run
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 datarootdir=${prefix}/share

Hi Elle,

these variables won't help at all. A more-or-less complete development
prefix environment looks like this (working example from my disk, with
all the same packages in prefix also installed by the OS in /usr):

PREFIX=/home/elle/code/gimpdefault/run
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS=-I $PREFIX/share/aclocal
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH

If you also build glib in that prefix, it needs to find
OS-installed modules. On debian unstable 64 bit this looks
like:

export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules

but might be different depending on the distribution.

Regards,
--Mitch


___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-23 Thread Elle Stone

On 02/23/2015 07:11 AM, Michael Natterer wrote:


A more-or-less complete development
prefix environment looks like this (working example from my disk, with
all the same packages in prefix also installed by the OS in /usr):

PREFIX=/home/elle/code/gimpdefault/run
export PATH=$PREFIX/bin:$PATH
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
export ACLOCAL_FLAGS=-I $PREFIX/share/aclocal
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH

If you also build glib in that prefix, it needs to find
OS-installed modules. On debian unstable 64 bit this looks
like:

export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules

but might be different depending on the distribution.


Mitch, thanks! Following your setup worked perfectly.

glib did complain that $PREFIX/share/aclocal didn't exist, so I created 
the empty directory and then everything went smoothly, with GIMP and 
glib both writing .m4 files to the aclocal directory. From curiosity, 
why didn't babl and GEGL also write .m4 files?


In case anyone else is running Gentoo, the path (at least for a pure 
64-bit build) is /usr/lib/gio/modules.


For the next person who encounters this problem, maybe a link to Mitch's 
post could be added to 
http://wiki.gimp.org/wiki/Hacking:Problems_and_solutions#GIMP_build_fails_for_missing_BABL_function?


Elle

___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-22 Thread Elle Stone

On 02/22/2015 11:27 AM, Partha Bagchi wrote:

Welcome back. :)

Thanks!


Can you not simply pass the LIB statement to configure/autogen or
adjust PKG_CONFIG_PATH?


I use these commands to set up the prefix before installing and updating 
babl/GEGL/GIMP:


prefix=/home/elle/code/gimpdefault/run
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
datarootdir=${prefix}/share

The babl/GEGL/GIMP run/lib/pkgconfig/ pc files have text like this 
(sometimes fewer or more lines):


prefix=/home/elle/code/gimpdefault/run
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
datarootdir=${prefix}/share

Is there another step involved in passing the LIB statement to 
configure/autogen or adjusting the PKG_CONFIG_PATH?


Elle
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-22 Thread Mukund Sivaraman
Hi Elle

On Sun, Feb 22, 2015 at 12:14:20PM -0500, Elle Stone wrote:
 Is there another step involved in passing the LIB statement to
 configure/autogen or adjusting the PKG_CONFIG_PATH?

I use these steps for building and installing GIMP into my home
directory: https://mukund.org/tmp/gimp-build-script.txt

It has (historically) worked for others too.  It may need some fiddling
of version numbers for the deps. After the exports, You can start from
the babl step if you have a very new distro such as Fedora 21 which has
the gtk+-2.0 version that GIMP needs.

Mukund


pgpkkiNvy_KDZ.pgp
Description: PGP signature
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-22 Thread Elle Stone
I installed babl/GEGL/GIMP from git in a prefix. Then I installed 
babl/GEGL/GIMP-2.8 from Gentoo portage. When I tried to update GIMP from 
git in the prefix, I got the following terminal output


core/libappcore.a(gimphistogram.o): In function `gimp_histogram_calculate':
/home/elle/code/gimpdefault/build/gimp/app/core/gimphistogram.c:261: 
undefined reference to `babl_format_get_model'

. . .
collect2: error: ld returned 1 exit status
Makefile:890: recipe for target 'gimp-2.9' failed
make[4]: *** [gimp-2.9] Error 1
. . .

This problem is documented here:
http://wiki.gimp.org/wiki/Hacking:Problems_and_solutions#GIMP_build_fails_for_missing_BABL_function

Why is GIMP looking for babl outside the prefix?

Is there a way to make GIMP look inside the prefix and ignore the babl 
install that's outside the prefix? I mean besides uninstalling babl/GEGL 
from portage before updating GIMP in the prefix?


Elle
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-22 Thread Partha Bagchi
Welcome back. :)

Can you not simply pass the LIB statement to configure/autogen or
adjust PKG_CONFIG_PATH?

On Sun, Feb 22, 2015 at 11:03 AM, Elle Stone
ellest...@ninedegreesbelow.com wrote:
 I installed babl/GEGL/GIMP from git in a prefix. Then I installed
 babl/GEGL/GIMP-2.8 from Gentoo portage. When I tried to update GIMP from git
 in the prefix, I got the following terminal output

 core/libappcore.a(gimphistogram.o): In function `gimp_histogram_calculate':
 /home/elle/code/gimpdefault/build/gimp/app/core/gimphistogram.c:261:
 undefined reference to `babl_format_get_model'
 . . .
 collect2: error: ld returned 1 exit status
 Makefile:890: recipe for target 'gimp-2.9' failed
 make[4]: *** [gimp-2.9] Error 1
 . . .

 This problem is documented here:
 http://wiki.gimp.org/wiki/Hacking:Problems_and_solutions#GIMP_build_fails_for_missing_BABL_function

 Why is GIMP looking for babl outside the prefix?

 Is there a way to make GIMP look inside the prefix and ignore the babl
 install that's outside the prefix? I mean besides uninstalling babl/GEGL
 from portage before updating GIMP in the prefix?

 Elle
 ___
 gimp-developer-list mailing list
 List address:gimp-developer-list@gnome.org
 List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
 List archives:   https://mail.gnome.org/archives/gimp-developer-list
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-22 Thread Christopher Curtis
Hi Elle,

Not a GIMP dev, so just some general advice here.

It looks like the problem is from compiling gimphistogram.c. Scroll back
through the history to find the 'gcc' line where this is compiled and look
at the full arguments. Make sure that there's a -L/home/elle/... argument
that appears before any other -L/usr/lib type arguments.

Then, I'd look at the Makefile to see if it makes sense. Where are the -L
arguments coming from? Are you running some pkgconfig command from /usr/bin
instead of your custom path? Etc.

Regards,
Chris


On Sun, Feb 22, 2015 at 12:14 PM, Elle Stone ellest...@ninedegreesbelow.com
 wrote:

 On 02/22/2015 11:27 AM, Partha Bagchi wrote:

 Welcome back. :)

 Thanks!

  Can you not simply pass the LIB statement to configure/autogen or
 adjust PKG_CONFIG_PATH?


 I use these commands to set up the prefix before installing and updating
 babl/GEGL/GIMP:

 prefix=/home/elle/code/gimpdefault/run
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 datarootdir=${prefix}/share

 The babl/GEGL/GIMP run/lib/pkgconfig/ pc files have text like this
 (sometimes fewer or more lines):

 prefix=/home/elle/code/gimpdefault/run
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 datarootdir=${prefix}/share

 Is there another step involved in passing the LIB statement to
 configure/autogen or adjusting the PKG_CONFIG_PATH?


 Elle
 ___
 gimp-developer-list mailing list
 List address:gimp-developer-list@gnome.org
 List membership: https://mail.gnome.org/mailman/listinfo/gimp-
 developer-list
 List archives:   https://mail.gnome.org/archives/gimp-developer-list

___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-22 Thread Partha Bagchi
Let's say that you are building it somewhere like /opt

Let's also say that your babl/gegl are in /opt/babl and /opt/gegl respectively.

Then, I would do the following:

export 
PKG_CONFIG_PATH=/opt/babl/lib/pkgconfig;/opt/gegl/lib/pkgconfig;$PKG_CONFIG_PATH

Babl has no dependencies and so you can build it first.

Then to build gegl, I would say
./configure --prefix=/opt/gegl LIBS=-L/opt/babl/lib CPPFLAGS=-I/opt/babl/include

For gimp then I would say
./configure --prefix=/opt/gimp LIBS=-L/opt/babl/lib -L/opt/gegl/lib
CPPFLAGS=-I/opt/babl/include -I/opt/gegl/include

etc.

Note that both gegl and gimp pick up the libraries from PKG_CONFIG_PATH


On Sun, Feb 22, 2015 at 12:14 PM, Elle Stone
ellest...@ninedegreesbelow.com wrote:
 On 02/22/2015 11:27 AM, Partha Bagchi wrote:

 Welcome back. :)

 Thanks!

 Can you not simply pass the LIB statement to configure/autogen or
 adjust PKG_CONFIG_PATH?


 I use these commands to set up the prefix before installing and updating
 babl/GEGL/GIMP:

 prefix=/home/elle/code/gimpdefault/run
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 datarootdir=${prefix}/share

 The babl/GEGL/GIMP run/lib/pkgconfig/ pc files have text like this
 (sometimes fewer or more lines):

 prefix=/home/elle/code/gimpdefault/run
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
 datarootdir=${prefix}/share

 Is there another step involved in passing the LIB statement to
 configure/autogen or adjusting the PKG_CONFIG_PATH?

 Elle
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] GIMP looking for babl and GEGL outside the prefix

2015-02-22 Thread Elle Stone

Hi Partha, Chris, and Mukund, and thanks! for trying to help sort this out.

I've rebuilt babl/GEGL/GIMP in a prefix many times without any problems. 
The problem started when I installed babl/GEGL/GIMP-2.8 from Gentoo 
portage. For some reason GIMP from git is looking for babl in /usr 
before checking the prefix.


Mukund, the build script failed with gegl saying it couldn't find babl.

Chris, I don't know how to make sense of what's in the makefile. I did 
look at it.


Partha, I'm not sure how to interpret these lines:

export 
PKG_CONFIG_PATH=/opt/babl/lib/pkgconfig;/opt/gegl/lib/pkgconfig;$PKG_CONFIG_PATH

Babl has no dependencies and so you can build it first.

Then to build gegl, I would say
./configure --prefix=/opt/gegl LIBS=-L/opt/babl/lib CPPFLAGS=-I/opt/babl/include


because there is no blah/babl/lib but rather blah/lib/babl. So I 
tried the following:


./autogen.sh --prefix=/home/elle/code/gimpdefault/run 
LIBS=-L/home/elle/code/gimpdefault/run/lib/babl-0.1 
CPPFLAGS=-I/home/elle/code/gimpdefault/run/include/babl-0.1


and similarly for GIMP, which ended in the same GIMP make error 
message about an undefined reference to `babl_format_get_model'.


I'm sure Partha's advice is on the right track. The babl build ends with 
the following:


Libraries have been installed in:
   /home/elle/code/gimpdefault/run/lib/babl-0.1

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
 during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
 during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

Unfortunately I don't know the right syntax and place to implement above.

Anyway, thanks! everyone for trying to help. At this point I'll use the 
workaround of uninstalling babl/GEGL from portage before updating 
babl/GEGL/GIMP from git, unless someone knows how to implement the above 
babl output.


Elle

___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list