Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 6012] New: Inclusion of config.h is too late in lex-files

Date: Thu, 9 Jun 2011 06:22:00 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6012

           Summary: Inclusion of config.h is too late in lex-files
                    resulting in wrong definition of _FILE_OFFSET_BITS
           Product: Wireshark
           Version: 1.6.0
          Platform: SPARC
        OS/Version: Solaris
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: dam@xxxxxxxxxxx


Build Information:
This problem prohibits a build. Build environment is Solaris 9 Sparc with Sun
Studio 12.
--
The build error manifests as

source='ascend_scanner.c' object='ascend_scanner.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
/bin/bash ../libtool --tag=CC --mode=compile /opt/SUNWspro/bin/cc
-DHAVE_CONFIG_H -I. -I. -I.. -I./..  -I/opt/csw/include -I/opt/csw/include
-I/opt/csw/include -I/opt/csw/include
'-DPLUGIN_DIR="/opt/csw/lib/wireshark/plugins/1.6.0"'  -D_U_="" -xO3 -m32
-xarch=v8 -I/opt/csw/include -D_REENTRANT -D_PTHREADS
-D_POSIX_PTHREAD_SEMANTICS -DXTHREADS -DXUSE_MTSAFE_API
-I/opt/csw/include/gtk-2.0 -I/opt/csw/lib/gtk-2.0/include
-I/opt/csw/include/atk-1.0 -I/opt/csw/include/cairo
-I/opt/csw/include/pango-1.0 -I/opt/csw/include/glib-2.0
-I/opt/csw/lib/glib-2.0/include -I/opt/csw/include/pixman-1 -I/opt/csw/include
-I/opt/csw/include/freetype2 -I/opt/csw/include/libpng12   -I/opt/csw/include
-I/opt/csw/include -c -o ascend_scanner.lo ascend_scanner.c
libtool: compile:  /opt/SUNWspro/bin/cc -DHAVE_CONFIG_H -I. -I. -I.. -I./..
-I/opt/csw/include -I/opt/csw/include -I/opt/csw/include -I/opt/csw/include
-DPLUGIN_DIR=\"/opt/csw/lib/wireshark/plugins/1.6.0\" -D_U_= -xO3 -m32
-xarch=v8 -I/opt/csw/include -D_REENTRANT -D_PTHREADS
-D_POSIX_PTHREAD_SEMANTICS -DXTHREADS -DXUSE_MTSAFE_API
-I/opt/csw/include/gtk-2.0 -I/opt/csw/lib/gtk-2.0/include
-I/opt/csw/include/atk-1.0 -I/opt/csw/include/cairo
-I/opt/csw/include/pango-1.0 -I/opt/csw/include/glib-2.0
-I/opt/csw/lib/glib-2.0/include -I/opt/csw/include/pixman-1 -I/opt/csw/include
-I/opt/csw/include/freetype2 -I/opt/csw/include/libpng12 -I/opt/csw/include
-I/opt/csw/include -c ascend_scanner.c  -KPIC -DPIC -o .libs/ascend_scanner.o
"../config.h", line 397: warning: macro redefined: _FILE_OFFSET_BITS
"/opt/csw/include/zlib.h", line 1583: identifier redeclared: gzseek64
        current : function(pointer to void, long, int) returning long
        previous: function(pointer to void, long long, int) returning long long
: "/opt/csw/include/zlib.h", line 1567
"/opt/csw/include/zlib.h", line 1584: identifier redeclared: gztell64
        current : function(pointer to void) returning long
        previous: function(pointer to void) returning long long :
"/opt/csw/include/zlib.h", line 1568
"/opt/csw/include/zlib.h", line 1585: identifier redeclared: gzoffset64
        current : function(pointer to void) returning long
        previous: function(pointer to void) returning long long :
"/opt/csw/include/zlib.h", line 1569
"/opt/csw/include/zlib.h", line 1586: identifier redeclared: adler32_combine64
        current : function(unsigned long, unsigned long, long) returning
unsigned long
        previous: function(unsigned long, unsigned long, long long) returning
unsigned long : "/opt/csw/include/zlib.h", line 1570
"/opt/csw/include/zlib.h", line 1587: identifier redeclared: crc32_combine64
        current : function(unsigned long, unsigned long, long) returning
unsigned long
        previous: function(unsigned long, unsigned long, long long) returning
unsigned long : "/opt/csw/include/zlib.h", line 1571
cc: acomp failed for ascend_scanner.c
gmake: *** [ascend_scanner.lo] Error 1

The problem is that in ascend_scanner.c the inclusion of config.h is too late
resulting in earlier includes be non-largefile aware.

A workaround is to add -D_FILE_OFFSET_BITS=64 to the CPPFLAGS.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.