login about faq

On compiling OS products with pkg-config there is some times the problem that some include paths are missing. Why does that happen?

This question is marked "community wiki".

asked Mar 30 '12 at 10:45

cgrzemba's gravatar image

cgrzemba
1225

edited Mar 31 '12 at 21:37

Dagobert's gravatar image

Dagobert ♦♦
151367


The reason is that configure use pkg-config --cflags to get the include paths from pc file of packages which it depends on. configure reports if the dependend package is not installed: no problem.

But a problem raise if the pc file contains Requires and Requires.private keys like libgnome-2.0.pc. Then the first test if libgnome-2.0 package is installed will be true, but the command

pkg-config --cflags libgnome-2.0

will fail if some packages of Requires are missing. Unfortunatly configure will continue without report a problem and lets the CFLAGS variable empty!

With the following script it is possible to see if there are such problems possible

for p in `grep PKG_CHECK_MODULES work/build-isa*/*/configure.in | cut -d, -f2 | awk '{ print $1 }' | sed -e 's/\[//' -e 's/)//' | sort | uniq` ; { 
    pkg-config --cflags $p > /dev/null || echo ">>> problem with package $p";
}
link

answered Mar 31 '12 at 21:38

Dagobert's gravatar image

Dagobert ♦♦
151367

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2
×1

Asked: Mar 30 '12 at 10:45

Seen: 705 times

Last updated: Apr 10 '12 at 11:23

powered by OSQA