include paths using glib-2.0 with Anjuta

Asked by Nemo1234

Upgrade from 12.xx to 14.04. Install the Gnome fall back. Have some programs that need to be compiled
from sources that are six years old. Gtk-3.0 caused a problem so I tried to go back to 2.0.
Anjuta won't compile even the main.c. Problems with finding the glib-2.0 includes.
Example:
#include <glib.h> has to be #include<glib-2.0/glib.h> even then any includes in the included file
fail.
Example: galloca.h is called by glib.h
galloca.h:32.25: fatal error: glib/gtypes.h: No such file or directory, but glib is in glib-2.0.
Have tried to modify the CFLAGS in autoconf/make by mods to "/usr/local/share/config.site".
The path to glib-2.0 is in the make file, but it still fails. Looks like problem in in the configure/make stuff.

Any suggestions?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu glib2.0 Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
Manfred Hampl (m-hampl) said :
#2

Is there a configure script in your source?
Have you executed it?
Does is show errors?

Do you have libglib2.0-dev installed?

Revision history for this message
Nemo1234 (jsharr2) said :
#3

I didn't get much in the way of wise advice about the problem, so I did the fall back thing, switched machines. This one had a clean install of 14.04 (64 bit version). Couldn't duplicate my problem BUT the original remained. Linker couldn't find
"pthread_create". Went in to the x86-x64-linux-gnu/libpthread.so and couldn't use nm. Text output was this:
/* GNU ld script
   Use the shared library, but some functions are only in
   the static library, so try that secondarily. */
OUTPUT_FORMAT(elf64-x86-64)
GROUP ( /lib/x86_64-linux-gnu/libpthread.so.0 /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a )

I will leave it to the experts to figure that one out.

I added -lpthread to the Makefile.am in the src folder of the project like this
adprogram_LDADD = $(ADPROGRAM_LIBS) \
 -lpthread

Now everything works as it should, EXCEPT why doesn't "configure" find this out for its self?
There are lots of questions about linking pthread out there, this is only one of a lot of fixes that will solve
linking problems

Revision history for this message
Nemo1234 (jsharr2) said :
#4

Thanks actionparsnip, that solved my question.