Bug 125903 - driftnet doesn't compile with USE=gtk
Bug#: 125903 Product:  Gentoo Linux Version: 2006.0 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: netmon@gentoo.org Reported By: askwar@digitalprojects.com
Component: Applications
URL: 
Summary: driftnet doesn't compile with USE=gtk
Keywords:  
Status Whiteboard: 
Opened: 2006-03-12 01:24 0000
Description:   Opened: 2006-03-12 01:24 0000
Tried to build driftnet with the following flags:

[ebuild  N    ] net-analyzer/driftnet-0.1.6-r2  USE="gtk" 0 kB

And right at the beginning, I got the following:

>>> Compiling source in /Gentoo/Portage/build/portage/driftnet-0.1.6-r2/work/driftnet-0.1.6.orig ...
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' -o endian endian.c
( echo '.\" DO NOT EDIT THIS FILE-- edit driftnet.1.in instead' ; sed
s/@@@VERSION@@@/0.1.6/ ) < driftnet.1.in > driftnet.1
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found

And then a LOT more of error messages. I suppose they are related, because
there's no gtk+-2.0 package. I only have gtk+ 1.2 installed.


Do you want me to merge these packages? [Yes/No] >>> Emerging (1 of 41)
net-analyzer/driftnet-0.1.6-r2 to /
>>> checksums files   ;-) driftnet-0.1.6-r1.ebuild
>>> checksums files   ;-) driftnet-0.1.6.ebuild
>>> checksums files   ;-) driftnet-0.1.6-r2.ebuild
>>> checksums files   ;-) files/driftnet-0.1.6-tmpnam-is-bad.diff
>>> checksums files   ;-) files/digest-driftnet-0.1.6-r1
>>> checksums files   ;-) files/digest-driftnet-0.1.6-r2
>>> checksums files   ;-) files/digest-driftnet-0.1.6
>>> checksums src_uri ;-) driftnet_0.1.6.orig.tar.gz
>>> checksums src_uri ;-) driftnet_0.1.6-4.diff.gz
>>> Unpacking source...
>>> Unpacking driftnet_0.1.6.orig.tar.gz to /Gentoo/Portage/build/portage/driftnet-0.1.6-r2/work
>>> Unpacking driftnet_0.1.6-4.diff.gz to /Gentoo/Portage/build/portage/driftnet-0.1.6-r2/work
 * Applying driftnet_0.1.6-4.diff.gz ...                                       
                                   [ ok ]>>> Source unpacked.
>>> Compiling source in /Gentoo/Portage/build/portage/driftnet-0.1.6-r2/work/driftnet-0.1.6.orig ...
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' -o endian endian.c
( echo '.\" DO NOT EDIT THIS FILE-- edit driftnet.1.in instead' ; sed
s/@@@VERSION@@@/0.1.6/ ) < driftnet.1.in > driftnet.1
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
./endian > endianness
makedepend -- -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall
-I/usr/include/pcap -D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config
--cflags libpng` -DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -- audio.c
mpeghdr.c gif.c img.c jpeg.c png.c driftnet.c image.c display.c playaudio.c
connection.c media.c
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o audio.o audio.c
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
makedepend: warning:  /usr/include/gnu/stubs.h:  non-portable whitespace
encountered at line 7
makedepend: warning:  /usr/include/time.h includes /usr/include/bits/types.h
more than once!
Already have
        /usr/include/bits/types.h
makedepend: warning:  /usr/include/time.h includes /usr/include/bits/types.h
more than once!
Already have
        /usr/include/bits/types.h
makedepend: warning:  /usr/include/dirent.h includes /usr/include/bits/types.h
more than once!
Already have
        /usr/include/features.h
        /usr/include/bits/types.h
        /usr/include/bits/dirent.h
makedepend: warning:  display.c, line 14: cannot find include file "gtk/gtk.h"
        not in /usr/include/pcap/gtk/gtk.h
        not in /usr/include/libpng12/gtk/gtk.h
        not in /usr/local/lib/gcc-include/gtk/gtk.h
        not in /usr/include/gtk/gtk.h
        not in /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/gtk/gtk.h
makedepend: warning:  display.c, line 15: cannot find include file "gdk/gdk.h"
        not in /usr/include/pcap/gdk/gdk.h
        not in /usr/include/libpng12/gdk/gdk.h
        not in /usr/local/lib/gcc-include/gdk/gdk.h
        not in /usr/include/gdk/gdk.h
        not in /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/gdk/gdk.h
makedepend: warning:  display.c, line 16: cannot find include file "gdk/gdkx.h"
        not in /usr/include/pcap/gdk/gdkx.h
        not in /usr/include/libpng12/gdk/gdkx.h
        not in /usr/local/lib/gcc-include/gdk/gdkx.h
        not in /usr/include/gdk/gdkx.h
        not in /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/include/gdk/gdkx.h
touch depend
rm -f Makefile.bak
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o mpeghdr.o mpeghdr.c
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o gif.o gif.c
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o img.o img.c
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o jpeg.o jpeg.c
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o png.o png.c
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o driftnet.o driftnet.c
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o image.o image.c
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o display.o display.c
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
cc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -g -Wall -I/usr/include/pcap
-D_BSD_SOURCE `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng`
-DDRIFTNET_VERSION='"0.1.6"' `cat endianness` -c -o playaudio.o playaudio.c
display.c:14:21: gtk/gtk.h: No such file or directory
display.c:15:21: gdk/gdk.h: No such file or directory
display.c:16:22: gdk/gdkx.h: No such file or directory
display.c:35: error: syntax error before '*' token
display.c:35: warning: type defaults to `int' in declaration of `window'
display.c:35: warning: type defaults to `int' in declaration of `darea'
display.c:35: warning: data definition has no type or storage class
display.c:36: error: syntax error before '*' token
display.c:36: warning: type defaults to `int' in declaration of `drawable'
display.c:36: warning: data definition has no type or storage class
display.c:49: error: syntax error before "delete_event"
display.c:49: error: syntax error before '*' token
display.c:49: warning: return type defaults to `int'
display.c: In function `delete_event':
display.c:52: error: `FALSE' undeclared (first use in this function)
display.c:52: error: (Each undeclared identifier is reported only once
display.c:52: error: for each function it appears in.)
display.c: In function `update_window':
display.c:105: error: `GdkGC' undeclared (first use in this function)
display.c:105: error: `gc' undeclared (first use in this function)
display.c:106: warning: implicit declaration of function `gdk_gc_new'
display.c:107: warning: implicit declaration of function
`gdk_draw_rgb_32_image'
display.c:107: error: `GDK_RGB_DITHER_NORMAL' undeclared (first use in this
function)
display.c:107: error: `guchar' undeclared (first use in this function)
display.c:107: error: syntax error before ')' token
display.c:108: warning: implicit declaration of function `gdk_gc_destroy'
display.c: At top level:
display.c:174: error: syntax error before '*' token
display.c: In function `expose_event':
display.c:175: error: request for member `window' in something not a structure
or union
display.c:176: warning: implicit declaration of function `gdk_window_get_size'
display.c: At top level:
display.c:185: error: syntax error before '*' token
display.c: In function `configure_event':
display.c:186: error: request for member `window' in something not a structure
or union
display.c: At top level:
display.c:250: error: syntax error before '*' token
display.c: In function `button_press_event':
display.c:251: error: `event' undeclared (first use in this function)
display.c: At top level:
display.c:255: error: syntax error before '*' token
display.c: In function `button_release_event':
display.c:258: error: `event' undeclared (first use in this function)
display.c:262: warning: implicit declaration of function `gdk_draw_rectangle'
display.c:262: error: request for member `style' in something not a structure
or union
display.c:263: warning: implicit declaration of function `gdk_flush'
display.c:266: error: request for member `style' in something not a structure
or union
display.c: At top level:
display.c:270: error: syntax error before '*' token
display.c: In function `destroy':
display.c:271: warning: implicit declaration of function `gtk_main_quit'
display.c: At top level:
display.c:298: error: syntax error before "pipe_event"
display.c:298: error: syntax error before "chan"
display.c:298: warning: return type defaults to `int'
display.c: In function `pipe_event':
display.c:374: error: `TRUE' undeclared (first use in this function)
display.c: In function `dodisplay':
display.c:378: error: `GIOChannel' undeclared (first use in this function)
display.c:378: error: syntax error before "chan"
display.c:382: error: syntax error before '=' token
display.c:383: warning: implicit declaration of function `g_io_add_watch'
display.c:383: error: syntax error before "chan"
display.c:390: warning: implicit declaration of function `gtk_init'
display.c:391: warning: implicit declaration of function `gdk_rgb_init'
display.c:393: warning: implicit declaration of function
`gtk_widget_set_default_colormap'
display.c:393: warning: implicit declaration of function `gdk_rgb_get_cmap'
display.c:394: warning: implicit declaration of function
`gtk_widget_set_default_visual'
display.c:394: warning: implicit declaration of function `gdk_rgb_get_visual'
display.c:397: warning: implicit declaration of function `gtk_window_new'
display.c:397: error: `GTK_WINDOW_TOPLEVEL' undeclared (first use in this
function)
display.c:397: warning: assignment makes pointer from integer without a cast
display.c:398: warning: implicit declaration of function `gtk_widget_set_usize'
display.c:400: warning: implicit declaration of function `gtk_drawing_area_new'
display.c:400: warning: assignment makes pointer from integer without a cast
display.c:401: warning: implicit declaration of function `gtk_container_add'
display.c:401: warning: implicit declaration of function `GTK_CONTAINER'
display.c:402: warning: implicit declaration of function
`gtk_widget_set_events'
display.c:402: error: `GDK_EXPOSURE_MASK' undeclared (first use in this
function)
display.c:402: error: `GDK_BUTTON_PRESS_MASK' undeclared (first use in this
function)
display.c:402: error: `GDK_BUTTON_RELEASE_MASK' undeclared (first use in this
function)
display.c:404: warning: implicit declaration of function `gtk_signal_connect'
display.c:404: warning: implicit declaration of function `GTK_OBJECT'
display.c:404: warning: implicit declaration of function `GTK_SIGNAL_FUNC'
display.c:414: warning: implicit declaration of function `gtk_widget_show_all'
display.c:416: warning: implicit declaration of function `gtk_main'
make: *** [display.o] Error 1
make: *** Waiting for unfinished jobs....
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
playaudio.c: In function `do_mpeg_player':
playaudio.c:170: warning: 'mpeg_pid' might be used uninitialized in this
function
playaudio.c:170: warning: 'mpeg_pid' might be used uninitialized in this
function

!!! ERROR: net-analyzer/driftnet-0.1.6-r2 failed.
Call stack:
  ebuild.sh, line 1933:   Called dyn_compile
  ebuild.sh, line 971:   Called src_compile

!!! gtk+ build failed
!!! If you need support, post the topmost build error, and the call stack if
relevant.










hetzner askwar # emerge --info

Portage 2.1_pre5-r4 (hardened/x86/2.6, gcc-3.4.5, glibc-2.3.6-r3,
2.6.14-hardened-r5.01 i686)
=================================================================
System uname: 2.6.14-hardened-r5.01 i686 AMD Athlon(tm) XP 2000+
Gentoo Base System version 1.12.0_pre16
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10, 2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/mail/dspam /usr/kde/2/share/config
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control
/var/run/dspam"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/Gentoo/Portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="        http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/   
http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/      
ftp://gentoo.itdnet.net/gentoo/         http://ftp.gentoo.or.kr/       
http://distfiles.gentoo.org/ "
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/Gentoo/Portage/packages"
PORTAGE_TMPDIR="/Gentoo/Portage/build"
PORTDIR="/Gentoo/Portage/tree"
PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc
/Gentoo/Portage/local-tree/overlays/gentoo-de"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 7zip acl apache2 async bash-completion berkdb bzip2 cap
caps ccache checkpath chroot cracklib crypt cyrus dcc discard-path dlloader ecc
erandom exif extensions firefox glep glibc-omitfp hardened hardenedphp hpn
iconv idea idled idn imagemagick imap imlib imlib2 jikes jpeg kdeenablefinal
linuxthreads-tls logrotate lynxkeymap maildir mime mmap mmx mmxext mode-owner
moznoirc mozsvg multislot nls no-old-linux noaudio nocd nodrm nolvm1 nopop3d
offensive pam pam-mysql pcre pdf php pic png posix postfix prelude pyzor razor
readline recode reiserfs sasl sendfile server sftplogging sguil sharedmem sse
ssl static svg sysvipc szip tcpd threads tiff tokenizer tools unicode
userlocales utf8 vhosts vim-pager x86 xfs xinetd zlib elibc_glibc kernel_linux
linguas_de userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL

------- Comment #1 From Alexander Skwar 2006-03-12 02:00:40 0000 -------
Created an attachment (id=81964) [details]
Patch making driftnet depend on >= gtk+-2.0.0

After installing gtk+ 2.8, I was able to compile driftnet.

This means, that a dependency on gtk+ >= 2.0 is missing. The attached patch
does that.

------- Comment #2 From Marcelo Goes 2006-03-12 09:24:27 0000 -------
In cvs, thanks!