"Aucun fichier ou dossier de ce type" == "No such file or directory"
PKG_CONFIG_PATH contains (non-default) paths to add in order to find extra
.pc files, not the packages themselves. If you have the correct
.pc file in that directory it should work.
Check the output of:
pkg-config --cflags --libs glib-2.0
(with and without setting
It should show your glib-2.0 install path for includes & libraries, this is mine, installed to
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include \
If it's wrong then check the
However, the path you give for
glib.h looks more like it's just the unpacked source, not a complete installation of glib-2.0.
Did you have glib-2.0 installed and built already? If you are building it following the instructions URL then it does not seem correct, and you need to repeat that step.
There's no reason not to do a normal configure/make/install of some of these packages to
/usr/local, especially glib-2.0, zlib, libpng, libXML2 -- unless they conflict with something you already have installed.
The logic behind the RRDtool build document is to build everything under
/tmp and install everything under
/opt to make it as self-contained as possible. While it's likely to be a reasonably robust method, there are some drawbacks to it (including the requirement to set various magic environment variables).
the problem is the install path of glib-2.0 is conflicting with the includes used in rrdtool . When you install it to
is built to specify an include directory of
. This path already contains the sub-directory
so when rrdtool tries to include
it fails. I believe this to be an rrdtool issue, it is masked when glib-2.0 is installed to an "expected" place under
(and presumably when you use the build guideline paths exactly).
If you install to
/usr/local, an include path of
/usr/local/include will cause "
#include <glib-2.0/glib.h>" to work correctly.
As a fix I suggest either building and installing all the dependencies in
/usr/local (then you only need to set
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig) or following the rrdtool build instructions exactly, or you can set
CFLAGS to where you installed glib-2.0 before you run
(i.e. one directory above that reported by
pkg-config --cflags glib-2.0)
You can see better what's going on if the compile breaks by running:
just after an error, the commands used will be retried and printed this time, so you can check the
gcc -I flags.
OK, Found a bug report, it's fixed (though the title "Fix build with non-standard glib location" is slightly misleading). There has been no new stable release since then though. FWIW, there are several unanswered questions on the user list that seem to be this same problem.