Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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; \
    fi
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.

share|improve this question
    
I suggest you add a link to the linux_monitor source, if it is publicly available. Does this package not have a configure step? –  Faheem Mitha May 28 '11 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 '11 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. –  Faheem Mitha May 31 '11 at 18:59
    
Many thanks for taking the time to do that. I am going to look for a better option. –  AJweb May 31 '11 at 19:20

1 Answer 1

up vote 2 down vote accepted

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.

EDIT

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

COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
          $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)

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

EDIT EDIT

Or more nicely

./configure --with-cpp-flags=-I/usr/include/glib-1.2
share|improve this answer
    
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 '11 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) . –  Iain May 27 '11 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 '11 at 17:41
    
@AJweb: See my update which may help. –  Iain May 31 '11 at 22:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.