Wireshark-dev: Re: [Wireshark-dev] code coverage measurement for a dissector?
From: Németh Márton <[email protected]>
Date: Thu, 03 Jan 2008 08:54:50 +0100
Stig Bjørlykke wrote:
> On 3. jan.. 2008, at 00.19, Németh Márton wrote:
> 
>> I started with "make distclean". What is your gcc version?
> 
> 
> gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
> 
> It compiles ok, but I don't get any gcov output for the dissectors  
> (which is in a lib).  Maybe I'm doing it wrong...
> 
> 

I also tried to complie with
gcc-4.1 (GCC) 4.1.3 20071019 (prerelease) (Debian 4.1.2-17)
but still fails. I tried to compile Wireshark revision 23978 from SVN.

What is your Wireshark version?

Here is the error message for gcc 4.1.3:

mkdir .libs
rm -f .libs/wireshark.nm .libs/wireshark.nmS .libs/wireshark.nmT
creating .libs/wiresharkS.c
(cd .libs && gcc-4.1  --coverage -c -fno-builtin "wiresharkS.c")
rm -f .libs/wiresharkS.c .libs/wireshark.nm .libs/wireshark.nmS .libs/wireshark.nmT
gcc-4.1 -DINET6 "-D_U_=__attribute__((unused))" --coverage -Wall -W -Wdeclaration-after-statement -Wendif-labels -Wp
ointer-arith -Wno-pointer-sign -I/usr/local/include -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/us
r/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/home/nmarci/usr/local/libpcap/include -o .libs/wireshark capture
-pcap-util-unix.o capture_errs.o capture-pcap-util.o capture_ui_utils.o cfile.o clopts_common.o disabled_protos.o pa
cket-range.o print.o ps.o sync_pipe_write.o timestats.o util.o version_info.o airpcap_loader.o alert_box.o capture.o
 capture_info.o capture_opts.o capture_sync.o color_filters.o file.o fileset.o filters.o g711.o merge.o proto_hier_s
tats.o summary.o tempfile.o .libs/wiresharkS.o -pthread -DINET6 "-D_U_=__attribute__((unused))" --coverage -Wall -W
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-pointer-sign -I/usr/local/include -pthread -I/usr/
include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/u
sr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/home/nmarci/usr/
local/libpcap/include -Wl,--export-dynamic  -L/usr/local/lib -L/home/nmarci/usr/local/libpcap/lib gtk/libui.a codecs
/libcodec.a wiretap/.libs/libwiretap.so epan/.libs/libwireshark.so -lpcap /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk
-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so -lm /usr/lib/libpangocairo-1.0.so -lfontconfig -lXe
xt -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage /usr/lib/libpango-1.0.so /usr/lib/libcairo.so
 -lX11 -lXfixes /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libgthread-2.0.so -lrt /usr/lib/
libglib-2.0.so -L/usr/lib -lkrb5 -lk5crypto -lcom_err /usr/lib/libgcrypt.so /usr/lib/libgnutls.so -lz -Wl,--rpath -W
l,/home/nmarci/usr/local/wireshark/lib
/usr/bin/ld: .libs/wireshark: hidden symbol `__gcov_init' in /usr/lib/gcc/i486-linux-gnu/4.1.3/libgcov.a(_gcov.o) is
 referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: *** [wireshark] Error 1
make[2]: Leaving directory `/home/nmarci/src/wireshark/wireshark'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nmarci/src/wireshark/wireshark'
make: *** [all] Error 2


	Márton Németh