Re: [Forum] RH 8.0 og kompilering

From: Torben Andersen <the.beauty@get2net.dk>
Date: Sun Jun 22 2003 - 18:18:14 CEST

Jeg har vedhæftet output fra "autogen.sh, ./configure og make. Output
fra den foreslåede kommando er:

[root@0x50a44f3a include]# pkg-config --cflags gtk+-2.0
 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/Xft2
-I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include

Så burde den vel finde gtk.h, som ligger i
"/usr/include/gtk-2.0/gtk/gtk.h" eller har jeg misforstået kommandoen.
Jeg forstår det derhen, at output er std. søgestien. Så når den fejler i
at finde "gtk/gtk.h" må der være et eller andet galt eller hva ??

MVH Torben

>>Jeg mener, at have installeret rub og stub:
>>
>>[root@0x50a12f39 toran]# rpm -qa |grep gtk |grep devel
>>pygtk2-devel-1.99.12-7
>>gtk+-devel-1.2.10-22
>>gtk2-devel-2.0.6-8
>>gtkhtml2-devel-2.0.1-2
>>gtkhtml-devel-1.0.4-3
>>
>>og find viser:
>>
>>[root@0x50a12f39 toran]# find / -name "gtk.h"
>>/usr/include/gtk-1.2/gtk/gtk.h
>>/usr/include/gtk-2.0/gtk/gtk.h
>>
>>Så det er ikke det. Men ligger de der, hvor gcc forventer det eller
>>skal gcc konfigureres ??
>>
>>
>
>Placeringen bliver håndteret af pkg-config under GTK2. Prøv
>
>pkg-config --cflags gtk+-2.0
>
>og se om den giver det rette.
>
>Det ser ikke ud som om den prøver at bruge GTK2 -- der skulle være mange
>flere options til GCC. Hvad siger ./configure?
>
>-Lars
>
>
>

[root@0x50a44f3a nvclock0.6.2]# ./autogen.sh
configure.in:91: CFLAGS was already defined in condition TRUE, which implies condition HAVE_GTK1_TRUE
  CFLAGS (User, where = configure.in:91) =
  {
    TRUE => @CFLAGS@
  }
configure.in:92: LIBS was already defined in condition TRUE, which implies condition HAVE_GTK1_TRUE
  LIBS (User, where = configure.in:92) =
  {
    TRUE => @LIBS@
  }
configure.in:91: CFLAGS was already defined in condition TRUE, which implies condition HAVE_GTK2_TRUE
  CFLAGS (User, where = configure.in:91) =
  {
    TRUE => @CFLAGS@
  }
configure.in:92: LIBS was already defined in condition TRUE, which implies condition HAVE_GTK2_TRUE
  LIBS (User, where = configure.in:92) =
  {
    TRUE => @LIBS@
  }

[root@0x50a44f3a nvclock0.6.2]# !./configure
./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for working aclocal-1.6... found
checking for working autoconf... found
checking for working automake-1.6... found
checking for working autoheader... found
checking for working makeinfo... found
checking for working tar... found
checking whether make sets ${MAKE}... (cached) yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for gtk-config... /usr/bin/gtk-config
checking for GTK - version >= 1.2.0... yes
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.0.0... yes (version 2.0.6)
configure: creating ./config.status
config.status: creating src/Makefile
config.status: creating src/backend/Makefile
config.status: creating src/qt/Makefile
config.status: creating src/gtk/Makefile
config.status: creating src/gtk2/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: executing default-1 commands
config.status: executing depfiles commands

NVClock build summary:
----------------------
- Commandline version enabled
- GTK1 GUI disabled
- GTK2 GUI enabled
- QT GUI disabled

[root@0x50a44f3a nvclock0.6.2]# make
cd . && autoheader
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.

WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':

WARNING: AC_DEFINE([NEED_MAIN], 1,
WARNING: [Define if a function `main' is needed.])

WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
autoheader: `config.h.in' is updated
touch ./config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
make all-recursive
make[1]: Entering directory `/home/toran/nvclock0.6.2'
Making all in src
make[2]: Entering directory `/home/toran/nvclock0.6.2/src'
Making all in backend
make[3]: Entering directory `/home/toran/nvclock0.6.2/src/backend'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/toran/nvclock0.6.2/src/backend'
Making all in gtk
make[3]: Entering directory `/home/toran/nvclock0.6.2/src/gtk'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/toran/nvclock0.6.2/src/gtk'
Making all in gtk2
make[3]: Entering directory `/home/toran/nvclock0.6.2/src/gtk2'
source='main.c' object='main.o' libtool=no \
depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
depmode=gcc3 /bin/sh ../../depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../backend -c `test -f 'main.c' || echo './'`main.c
main.c:10:21: gtk/gtk.h: No such file or directory
In file included from main.c:12:
callbacks.h:1:21: gtk/gtk.h: No such file or directory
In file included from main.c:12:
callbacks.h:9: parse error before "memclk"
callbacks.h:10: parse error before '*' token
callbacks.h:11: parse error before '*' token
callbacks.h:12: parse error before "nvclock_exit"
callbacks.h:12: parse error before '*' token
callbacks.h:12: warning: data definition has no type or storage class
callbacks.h:13: parse error before '*' token
In file included from main.c:13:
interface.h:5: parse error before '*' token
interface.h:5: warning: data definition has no type or storage class
interface.h:6: parse error before '*' token
interface.h:6: warning: data definition has no type or storage class
In file included from main.c:14:
support.h:9:21: gtk/gtk.h: No such file or directory
In file included from main.c:14:
support.h:44: parse error before '*' token
support.h:44: parse error before '*' token
support.h:45: warning: data definition has no type or storage class
support.h:51: parse error before '*' token
support.h:59: parse error before '*' token
support.h:59: parse error before '*' token
support.h:60: warning: data definition has no type or storage class
main.c: In function `main':
main.c:22: `GtkWidget' undeclared (first use in this function)
main.c:22: (Each undeclared identifier is reported only once
main.c:22: for each function it appears in.)
main.c:22: `window1' undeclared (first use in this function)
make[3]: *** [main.o] Error 1
make[3]: Leaving directory `/home/toran/nvclock0.6.2/src/gtk2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/toran/nvclock0.6.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/toran/nvclock0.6.2'
make: *** [all] Error 2
Received on Sun Jun 22 18:18:15 2003

This archive was generated by hypermail 2.1.8 : Tue Jul 19 2005 - 16:04:50 CEST