Wireshark mailing list archives

Re: [Wireshark-commits] rev 34860: /trunk/gtk/ /trunk/gtk/: text_import.c


From: Gerhard Gappmeier <gerhard.gappmeier () ascolab com>
Date: Tue, 16 Nov 2010 09:56:32 +0100

Hi,

I've the same problem here on Gentoo Linux.
gcc version 4.4.4 (Gentoo 4.4.4-r2 p1.2, pie-0.4.5)
flex 2.5.35

Fresh chckout:
./autogen.sh
./configure
make

...
cc1: warnings being treated as errors
text_import_scanner.c: In function ‘text_importlex’:
text_import_scanner.l:97: error: ignoring return value of ‘fwrite’, declared 
with attribute warn_unused_result
text_import_scanner.c: In function ‘yy_get_next_buffer’:
text_import_scanner.c:1121: error: comparison between signed and unsigned 
integer expressions
make[2]: *** [text_import_scanner.o] Error 1
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/wsp_stat.Tpo .deps/wsp_stat.Po
make[2]: Leaving directory `/home/gergap/work/wireshark/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gergap/work/wireshark'
make: *** [all] Error 2

Then I copied the configure line from buildbot where it works.
./configure --prefix=/home/<user>/tmp/wireshark --enable-extra-gcc-checks
make

and it works.

I also think it's this "treat warning as errors" setting.
The option --enable-extra-gcc-checks seems to set it correct.

Maybe this info helps you.

On Monday 15 November 2010 15:25:23 Jaap Keuter wrote:
Hi,

Thanks for looking that up. The same problem hinders the MAC
compilers to run to completion.
I'll have to work the Makefiles some
more.

Thanks,
Jaap

On Mon, 15 Nov 2010 15:11:12 +0100, Anders Broman
wrote:
Hi,
I think the answer to the problem is that the flex
generated files needs to be compiled without the -Werror flag.


Compare with Makefile.am in epan

if HAVE_WARNINGS_AS_ERRORS


AM_NON_GENERATED_CFLAGS = -Werror

endif




libwireshark_la_SOURCES =

$(LIBWIRESHARK_SRC)


$(LIBWIRESHARK_INCLUDES)

libwireshark_la_CFLAGS =
$(AM_NON_GENERATED_CFLAGS) $(py_dissectors_dir)


libwireshark_generated_la_SOURCES =

$(LIBWIRESHARK_GENERATED_SRC)


$(LIBWIRESHARK_GENERATED_INCLUDES)
 Best regards
  Anders


-------------------------
 FROM: Anders Broman
SENT: den 15 november
2010 14:45
TO: 'Developer support list for Wireshark'
SUBJECT: RE:
[Wireshark-dev] [Wireshark-commits] rev 34860: /trunk/gtk/ /trunk/gtk/:
text_import.c

Hi,
Weird, it works on an old etch here with flex
2.5.33...gcc 4.1.2 20061115(prerelease)
/Anders


-------------------------
 FROM: wireshark-dev-bounces () wireshark org
[mailto:wireshark-dev-bounces () wireshark org] ON BEHALF OF Pascal
Quantin
SENT: den 15 november 2010 14:18
TO: Developer support list for
Wireshark
SUBJECT: Re: [Wireshark-dev] [Wireshark-commits] rev 34860:
/trunk/gtk/ /trunk/gtk/: text_import.c
 Hi

2010/11/15 Jaap Keuter

Hi,


I hear you. I'm already taking that step back, first of all splitting
text_import.h and working without this access function so gracefully
provided by newer flex versions.

On that matter, AFAIK your version
should provide this function. Can you have a look at text2pcap.c for
instance? That should have the function yyset_in().
It looks like I
forgot to clean my objects after upgrading flex... Sorry for the false
alarm.Now I have the following error when compiling svn revision
34872:

gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../wiretap
-I/usr/local/include -I /home/pascal/soft/include
'-DPLUGIN_DIR="/usr/local/lib/wireshark/plugins/1.5.0"' -Werror -DINET6
-D_U_="__attribute__((unused))" -g -O2 -Wall -W -Wextra
-Wdeclaration-after-statement -Wendif-labels -Wpointer-arith
-Wno-pointer-sign -Warray-bounds -Wcast-align -Wformat-security
-I/usr/local/include -D_REENTRANT -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/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/freetype2
-I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/pixman-1
-I /home/pascal/soft/include -MT text_import_scanner.o -MD -MP -MF
.deps/text_import_scanner.Tpo -c -o text_import_scanner.o
text_import_scanner.c
cc1: warnings being treated as
errors
text_import_scanner.c: In function
'yy_get_next_buffer':
text_import_scanner.c:1121: error: comparison
between signed and unsigned
make[2]: *** [text_import_scanner.o] Error
1

My test2pcap.c file does not contain any yyset_in() function.

BTW, I
have no issue when using a Unbuntu 10.10 or Windows. Only with my
Debian...  Regards,
Pascal.



Links:
------
[1]
mailto:jaap.keuter () xs4all nl

-- 
Gerhard Gappmeier
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax: +49 9131 691 128
Web: http://www.ascolab.com
GPG Key Id: 5AAC50C4
GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4

--
ascolab GmbH
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: