# Poppler, build fails, incorrect required\_pkg\_config\_package?

**URL:** <https://www.ruby-forum.com/t/poppler-build-fails-incorrect-required-pkg-config-package/224414>\
**Category:** Ruby-Gnome 2\
**Created:** [November 10, 2012, 10:59pm UTC](https://www.ruby-forum.com/t/poppler-build-fails-incorrect-required-pkg-config-package/224414 "2012-11-10T22:59:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 10, 2012, 10:59pm UTC](https://www.ruby-forum.com/t/poppler-build-fails-incorrect-required-pkg-config-package/224414/1 "2012-11-10T22:59:57Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![grantspeelman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/da6949/32.png) [@grantspeelman](https://www.ruby-forum.com/u/grantspeelman)\
**Post date:** [November 11, 2012, 3:43pm UTC](https://www.ruby-forum.com/t/poppler-build-fails-incorrect-required-pkg-config-package/224414/2 "2012-11-11T15:43:53Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] poppler, build fails, incorrect  
required\_pkg\_config\_package?” on Sat, 10 Nov 2012 22:59:57 +0100,  
Grant S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![grantspeelman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/da6949/32.png) [@grantspeelman](https://www.ruby-forum.com/u/grantspeelman)\
**Post date:** [November 14, 2012, 2:38pm UTC](https://www.ruby-forum.com/t/poppler-build-fails-incorrect-required-pkg-config-package/224414/3 "2012-11-14T14:38:03Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] poppler, build fails, incorrect  
required\_pkg\_config\_package?” on Mon, 12 Nov 2012 06:23:27 +0100,  
Grant S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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?

🙂

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![grantspeelman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/da6949/32.png) [@grantspeelman](https://www.ruby-forum.com/u/grantspeelman)\
**Post date:** [November 12, 2012, 6:23am UTC](https://www.ruby-forum.com/t/poppler-build-fails-incorrect-required-pkg-config-package/224414/4 "2012-11-12T06:23:27Z")

</div>

> > 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?
