[lsb-discuss] pkgconfig in LSB Build Environment

Daniel Yek dyek at real.com
Mon Mar 5 12:53:56 PST 2007

At 06:05 PM 3/2/2007, Wichmann, Mats D wrote:
> > The problem is pkg-config within LSB BE pulling in modules not
> > defined in LSB:
> > I heard that one possible solution is to use a LSB .pc file
>it's in the LSB package lsb-build-desktop, if that is installed
>appropriate pkgconfig files are in /opt/lsb/lib/pkgconfig.
>I had thought the buildenv had equivalent files in place by

Thanks Mats! That helped.

I didn't realize that only lsb-buildenv-3.1.1-1.i486.rpm from the following 
URLs should be installed on the host system and the rest 
(lsb-build-desktop-3.1.1-1.i486.rpm and lsb-build-cc-3.1.1-1.i486.rpm) 
should be installed after chroot-ing into the Build Environment. I 
concluded, before, wrongly that lsb-buildenv was the big bundle of all 
other rpms.

Probably adding a README file in the directory explaining that not all rpms 
should be installed to the host system would help.

So, in chroot BE environment, I installed these 2 packages:
rpm -ivh --nodeps lsb-build-cc-3.1.1-1.i486.rpm 

>but I know very little about the buildenv personally.
>Showing how much I know, I also thought that the default
>condiguration of cc/gcc in the buildenv gave the correct
>dynamic linker.  It may be that this never got fixed when
>a newer compiler was installed, it used to be you could make
>an entry in the gcc specs file, but with gcc4.x compilers,
>there is no longer an external specs file you can put it in.

Thanks for the information.

So, with the pkgconfig's .pc files in place, things (pkgconfig) looks 
better now.

The same gtkhello.c is now giving me preprocessor errors:

In file included from /opt/lsb/include/gtk-2.0/gtk/gtk.h:5,
                  from gtkhello.c:3:
/usr/include/glib-2.0/glib.h:30:26: error: glib/galloca.h: No such file or 
/usr/include/glib-2.0/glib.h:31:25: error: glib/garray.h: No such file or 
/usr/include/glib-2.0/glib.h:32:30: error: glib/gasyncqueue.h: No such file 
or directory
/usr/include/glib-2.0/glib.h:33:26: error: glib/gatomic.h: No such file or 
/usr/include/glib-2.0/glib.h:34:29: error: glib/gbacktrace.h: No such file 
or directory
/usr/include/glib-2.0/glib.h:35:25: error: glib/gcache.h: No such file or 
/usr/include/glib-2.0/glib.h:36:30: error: glib/gcompletion.h: No such file 
or directory
/usr/include/glib-2.0/glib.h:37:27: error: glib/gconvert.h: No such file or 
/usr/include/glib-2.0/glib.h:38:27: error: glib/gdataset.h: No such file or 
/usr/include/glib-2.0/glib.h:39:24: error: glib/gdate.h: No such file or 

Those were caused missing GLib headers:
$ ls /opt/lsb-buildenv-ia32/opt/lsb/include/glib-2.0/glib
gprintf.h  gstdio.h

Note that galloca.h, etc. aren't in the above directory. Those header files 
are included as follow:

#ifndef __G_LIB_H__
#define __G_LIB_H__

#include <glib/galloca.h>
#include <glib/garray.h>
#include <glib/gasyncqueue.h>
#include <glib/gatomic.h>

Any idea why these GLib headers are missing from the BE rpms?

Daniel Yek

More information about the lsb-discuss mailing list