I am trying to install the linux_monitor package under Centos 5.5. When I try make I get:

make[3]: Entering directory `/tmp/linux_monitor-2.0RC3/src/server'
if gcc -DHAVE_CONFIG_H -I. -I. -I../../src   -I/usr/include/openssl  -g -O2 -Wall -MT linux_mond.o -MD -MP -MF ".deps/linux_mond.Tpo" \
      -c -o linux_mond.o `test -f 'linux_mond.c' || echo './'`linux_mond.c; \
    then mv -f ".deps/linux_mond.Tpo" ".deps/linux_mond.Po"; \
    else rm -f ".deps/linux_mond.Tpo"; exit 1; \
In file included from linux_mond.c:23:
linux_mond.h:40:18: error: glib.h: No such file or directory
linux_mond.c: In function ‘server’:
linux_mond.c:155: warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness
linux_mond.c: In function ‘client’:
linux_mond.c:334: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness

I understand it is not finding glib.h, right? I know it is present at /usr/include/glib-1.2/, but I tried several configure flags and looked at the different files and can't find how to let know to configure where that library is.

  • I suggest you add a link to the linux_monitor source, if it is publicly available. Does this package not have a configure step? May 28, 2011 at 7:10
  • Yes, I should have included it: sourceforge.net/projects/linux-mon. And yes, it has a configure step, but I tried passing the path to glib there to no avail:./configure --libdir=/usr/include/glib-1.2
    – AJweb
    May 31, 2011 at 17:36
  • 1
    I downloaded and took a look at this project. If it makes you feel any better, it doesn't recognize libglib on my system (Debian squeeze) either. 2.0 seems to be the standard now, but I have 1.2 installed too. If you take a look at the changelog you'll see the last activity on this project took place in Aug 2004. That's nearly 7 years ago. This is clearly a dead project. IF you have a compelling need for this software, I suggest you try and contact the developer directly, before you go any further. Your only other option is to debug the code yourself. May 31, 2011 at 18:59
  • Many thanks for taking the time to do that. I am going to look for a better option.
    – AJweb
    May 31, 2011 at 19:20

1 Answer 1


If you know it's in /usr/include/glib-1.2 then you should be able to add -I/usr/include/glib-1.2 to the 'INCLUDE' definition in your Makefile. I don't have the package or it's source so I can't be any less vague than that.


I just downloaded the package you indicated above. Go to src/server and add -I/usr/include/glib-1.2 to the line DEFAULT_INCLUDES =-I. -I$(srcdir) -I$(top_builddir)/src

DEFAULT_INCLUDES =-I. -I$(srcdir) -I$(top_builddir)/src -I/usr/include/glib-1.2

If you look just below that line you'll see

          $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

which is the line I was referring to in my comment below.


Or more nicely

./configure --with-cpp-flags=-I/usr/include/glib-1.2
  • Thanks. I checked the Makefile, and I found a line that is already including the glib libs with the correct path! So, lost again.
    – AJweb
    May 27, 2011 at 21:02
  • 1
    @AJweb: but that's clearly not getting to gcc because it only says -I. -I. -I../../src -I/usr/include/openssl. Check which macros are being used with $(CC) .
    – user591
    May 27, 2011 at 21:10
  • @lain, I don't follow you, sorry. How do I do that checking with $(CC) ? The Makefile has this line: libdir = -I/usr/include/glib-1.2, which points correctly to the glib directory.
    – AJweb
    May 31, 2011 at 17:41
  • @AJweb: See my update which may help.
    – user591
    May 31, 2011 at 22:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .