Poppler, build fails, incorrect required_pkg_config_package?

I had been noticing this for a long time on my RHEL 5 system, but didn’t
pay much attention to it as I was stuck with too old a version of
poppler anyways.

I was recently playing around with building the latest ruby-gnome2 on a
Fedora 17 machine, and looked into it a bit more.

When building, poppler, extconf.rb runs checks for poppler-glib. If it
doesn’t find it it has this line

unless required_pkg_config_package(package_id,
:debian => “libpoppler-glib-dev”,
:redhat => “glib2-devel”,
:homebrew => “poppler”, …
:macports => “poppler”)

For :redhat, I think that is the wrong library. I tested out
poppler-glib-devel and that seems to do the trick

So it would change from
:redhat => “glib2-devel”,
to
:redhat => “poppler-glib-devel”,

I’d change this myself, but this area of the extconf stuff, I am never
as sure how it all really works.

I’m not sure how to determine that make sense for all versions that
would be identified redhat. My guess, is that is as it seems to be the
same between RHEL5, and Fedora 17, which are lightyears apart…

I also cringe at the fact that this actually tries to sudo install
something behind the scene…

Hi,

In [email protected]
“[ruby-gnome2-devel-en] poppler, build fails, incorrect
required_pkg_config_package?” on Sat, 10 Nov 2012 22:59:57 +0100,
Grant S. [email protected] wrote:

For :redhat, I think that is the wrong library. I tested out
poppler-glib-devel and that seems to do the trick

So it would change from
:redhat => “glib2-devel”,
to
:redhat => “poppler-glib-devel”,

I’d change this myself, but this area of the extconf stuff, I am never
as sure how it all really works.

Thanks!
I’ve fixed it!

I also cringe at the fact that this actually tries to sudo install
something behind the scene…

Umm…

Thanks,

kou

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] poppler, build fails, incorrect
required_pkg_config_package?” on Mon, 12 Nov 2012 06:23:27 +0100,
Grant S. [email protected] wrote:

On the systems I support, the poppler package always “passes” the
mkmf/extconf.rb part, but then fails at build time. I assume this is
because I am using poppler 0.5.4. I see in the README it says 0.8.0 or
later is required.

Would it make sense to change the following line this way?
unless required_pkg_config_package(package_id,

unless required_pkg_config_package([package_id, 0, 8, 0],

Thanks!
You’re right. I’ve fixed it.

Maybe lead to one less “hey why won’t this compile” email question?

:slight_smile:

Thanks,

kou

I’d change this myself, but this area of the extconf stuff, I am never
as sure how it all really works.

Thanks!
I’ve fixed it!

Great! So I’m now getting a better grasp of how extconf.rb works, its
pretty slick. I have one other question, on this package in particular.

On the systems I support, the poppler package always “passes” the
mkmf/extconf.rb part, but then fails at build time. I assume this is
because I am using poppler 0.5.4. I see in the README it says 0.8.0 or
later is required.

Would it make sense to change the following line this way?
unless required_pkg_config_package(package_id,

unless required_pkg_config_package([package_id, 0, 8, 0],

Maybe lead to one less “hey why won’t this compile” email question?