LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   lame configure problem (https://www.linuxquestions.org/questions/linux-newbie-8/lame-configure-problem-72343/)

Ad01932 07-13-2003 01:05 PM

lame configure problem
 
When conifguring lame I was give this error

*** Could not run GTK test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK was incorrectly installed
*** or that you have moved GTK since it was installed. In the latter case, you
*** may want to edit the gtk-config script: gtk12-config

I checked the conifg.log

configure:11088: checking for gtk-config
configure:11120: result: gtk12-config
configure:11128: checking for GTK - version >= 1.2.0
configure:11231: gcc -o conftest conftest.c >&5
configure:11153:21: gtk/gtk.h: No such file or directory
configure: In function `main':
configure:11166: warning: assignment makes pointer from integer without a cast
configure:11172: `gtk_major_version' undeclared (first use in this function)
configure:11172: (Each undeclared identifier is reported only once
configure:11172: for each function it appears in.)
configure:11172: parse error before ')' token
configure:11173: `gtk_minor_version' undeclared (first use in this function)
configure:11173: parse error before ')' token
configure:11174: `gtk_micro_version' undeclared (first use in this function)
configure:11174: parse error before ')' token
configure:11177: parse error before ',' token
configure:11234: $? = 1
configure: program exited with status 1
configure: failed program was:
#line 11151 "configure"
#include "confdefs.h"

#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>

int
main ()
{
int major, minor, micro;
char *tmp_version;

system ("touch conf.gtktest");

/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("1.2.0");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "1.2.0");
exit(1);
}

if ((gtk_major_version != ) ||
(gtk_minor_version != ) ||
(gtk_micro_version != ))
{
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
, , ,
gtk_major_version, gtk_minor_version, gtk_micro_version);
printf ("*** was found! If gtk-config was correct, then it is best\n");
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
printf("*** before re-running configure\n");
}

So I looked in the ld.so.conf file and it has:

/usr/X11R6/lib
/usr/lib/qt3/lib

What would I need to add or edit here?

german 07-13-2003 01:15 PM

find out where gtk.h is...

# find / -name gtk.h

add it to ld.so.conf

# cat /usr/path/to/file >> ld.so.conf

# ldconfig

and try again.

Good luck

Ben.

Ad01932 07-13-2003 01:40 PM

I ran find / -name gtk.h

and it's displayed two directories for the file

/usr/include/gtk-1.2/gtk/gtk.h

and

/usr/include/gtk-2.0/gtk/gtk.h

Would I direct it to the first both or take another action as they may conflict?

german 07-13-2003 01:52 PM

If the app you're compiling supports GTK2.0, use the second... that way it will use your usual gnome fonts, antialiasing, and other nice stuff... otherwise use the first... you could just add both of the dirs to ld.so.conf, like this:

/usr/include/gtk-1.2
/usr/include/gtk-2.0

in which case it should find both... BTW anyone that has read the thread here about which distro for newbies to use, this is EXACTLY the sort of thing I'm talking about when I mention standards compliance.

B.

german 07-13-2003 01:53 PM

oh wait I forgot to mention, RTFM to see if you can just specify the location of gtk headers on the command line... this is the better way to do it... see if you can do something like

$ ./configure --gtk-headers=/usr/include/gtk-1.2

B.


All times are GMT -5. The time now is 06:36 PM.