1

I am trying to build librsvg on an Amazon Linux distro instance. I've install most of the dependencies via yum. There where a few that where not available in the default yum repo's enabled on the instance so had to build them from scratch. I've got pretty far but am stuck on one final bit. When running sudo ./configure for librsvg I get No package 'gdk-pixbuf-2.0' found. I did get this message originally for some of the packages I installed via yum and installing the -dev version of those libs solved my problem. Currently gdk-pixbuf-2.0 is the only lib I install from source.

Here are the results of pkg-config for the missing lib:

$ pkg-config --list-all | grep pixbuf
> gdk-pixbuf-2.0        GdkPixbuf - Image loading and scaling
$ pkg-config --modversion pixbuf
> 2.26.1
  1. Why is this package not being found?
  2. What do the -dev/-devel packages usually install/configure?
  3. Are there any other environment coming into play? i.e. LD_LIBRARY_PATH, CPPFLAGS, LDFLAGS
  4. Am I missing a step in my build steps which would register this package/lib properly?
whyvez
  • 303
  • 3
  • 12
  • Generally you don't need (or want) to run `./configure` scripts as root. Generally not `make` either. `make install` though does, generally, need it. – Etan Reisner Dec 11 '14 at 13:44
  • Did you have to set any pkg-config related environment variables to get `pkg-config` to find it? Does `sudo 'pkg-config --list-all | grep pixbuf'` find it? – Etan Reisner Dec 11 '14 at 13:45
  • Yes I had to set ``PKG_CONFIG_PATH`` manually. I searched for the gdk-pixbuf-2.0.pc file and added that path to ``PKG_CONFIG_PATH``. – whyvez Dec 11 '14 at 13:54
  • Running ``./configure`` as non-root user yields ``./configure: line 2097: config.log: Permission denied``. – whyvez Dec 11 '14 at 13:58
  • Yes, once you've run it as root it will have touched all sorts of files and caused permission issues. You'll need to fix all the root-owned files in your directory before you'll be able to run it as non-root. – Etan Reisner Dec 11 '14 at 14:11
  • And that path almost certainly hasn't been set for the root user if you set it locally. (This is part of why running configure as root isn't generally a good idea. Different contexts. But the main reason is it doesn't need it and you don't run things that don't need root as root to avoid security problems, etc.) – Etan Reisner Dec 11 '14 at 14:11
  • @whyvez did you read my answer? did it work? – Iharob Al Asimi Dec 11 '14 at 16:44
  • Yes running things as root caused alll sorts of issues. Still at it and will report back. – whyvez Dec 11 '14 at 19:49

1 Answers1

1

Run pkg-config --libs gdk-pixbuf-2.0 and pkg-config --cflags gdk-pixbuf-2.0 some other package is missing and is required by gdk-pixbuf-2.0 and pkg-config is reporting the error to configure but not to you when listing all packages.

Iharob Al Asimi
  • 52,653
  • 6
  • 59
  • 97
  • BTW a great source of information for this kind of thing is the Linux From Scratch Book. – Iharob Al Asimi Dec 11 '14 at 15:01
  • 1
    Even though this answer was not the exact solution I marked it since you where the one who pointed me in the right direction in your comments on my main post. Setting the env vars properly and knowing when to use sudo was key. I finally got everything working and saved it in this gist: https://gist.github.com/whyvez/1e0212a35da97aa8f1b1. This was my first in depth encounter with the c/native world and its now got me very curious. After writing this post I'm starting to read the "Linux From Scratch" book you recommended. – whyvez Dec 13 '14 at 02:46