[Gimp-developer] GIMP build: XDG_DATA_DIRS causing "Unrecognized image file format"

Elle, we traded notes about a week ago about environment variables
needed for GIMP's build, and you gave this example that worked for
you on Debian Sid:

Elle Stone writes:
export SRC_DIR=/home/elle/code-build/gimp210/build
export PATH=$PREFIX/bin:$PATH
export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal"
export LD_LIBRARY_PATH=$PREFIX/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$PREFIX/lib/x86_64-linux-gnu:$PKG_CONFIG_PATH
export PKG_CONFIG_PATH=$PREFIX/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$PREFIX/share:/usr/local/share/:/usr/share/"

plus a similar stanza for Gentoo.

I've been struggling with my build lately because of gdk-pixbuf
problems: I kept running into problems like:

    gtk-encode-symbolic-svg -o 64 scalable/dialog-warning-symbolic.svg 64x64

    Can't load file: Unrecognized image file format

I finally came across a note you posted at the beginning of this year:
where you tracked this down to setting XDG_DATA_DIRS, covered in
the Hacking:Problems_and_solutions page (a wonderful page I hadn't known
about which wasn't showing up in any of my searches):

and the solution was not to set XDG_DATA_DIRS for the build.
I tried unsetting XDG_DATA_DIRS and indeed, the problem went away.

Does setting
actually work for you, and you don't see the "Unrecognized image
file format" problem any more?

I've been updating the various wiki Hacking: pages with some issues
I've hit recently, and I changed the example for the variables I
used to omit XDG_DATA_DIRS and added a warning that it can cause
problems, but I left it in to the two examples you provided in case
they're actually needed on your system. I'm curious why this seems
to vary so much. Maybe in your case, XDG_DATA_DIRS is already set,
and since you set it to add the system version before the $PREFIX
directories, it uses that? In my case, it wasn't set before I run
the GIMP build; I had
so it was set to "$GIMP_PREFIX/share:", and that broke the build.

I've added links to Hacking:Problems_and_solutions from the
Hacking:Building pages hoping to make it easier to find, because
there are a lot of great solutions there.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]