On Thu, Nov 1, 2012 at 4:50 AM, mahesh <[email protected]> wrote:
> This is not on an embedded system.
>
> Kernel details :-
>
> Linux 2.6.18-194.26.1.el5PAE #1 SMP Fri Oct 29 14:28:58 EDT 2010 i686 i686
> i386 GNU/Linux
> Red Hat Enterprise Linux Server release 5.3 (Tikanga)

I'm sorry to inform you, but on a 2.6.18 kernel, netsniff-ng won't
run. To use the TX_RING functionality, you need at least >= 2.6.31,
which is also stated in the INSTALL file.

If you can, please upgrade this machine.

> Kernel RPM :-
> kernel-2.6.18-53.el5
> kernel-2.6.18-92.1.6.el5
> kernel-2.6.18-128.el5
>
> I dont quiet "own" this Linux box (although, I have 'root' permissions on it
> !). So, I cannot upgrade this box. I have a couple of questions :-
>
> 1) In which file should I add the entry - "typedef uint32_t __u32;" ?
>
> 2) What is the minimal gcc version recommended for a successful installation
> ?
>
> Thanx !
> - mahesh.
>
>
>
> On Wednesday, October 31, 2012 7:19:12 PM UTC+5:30, Daniel Borkmann wrote:
>>
>> On Wed, Oct 31, 2012 at 6:35 AM, mahesh <[email protected]> wrote:
>>
>> > Thanx ! for the response.
>> >
>> > The gcc that I have is :-
>> >
>> > libgcc-4.1.2-44.el5
>> > gcc-4.1.2-44.el5
>> > gcc-c++-4.1.2-44.el5
>>
>> Ok, pretty much outdated.
>>
>> I have the gcc from Debian stable: gcc (Debian 4.4.5-8) 4.4.5
>>
>> > I deleted all command line options for which I get an error and also put
>> > in
>> > "-O2 -Wall" in place of "-O3 -Wall". But, this is what I see on running
>> > "make" :-
>> >
>> > ----------------------------------------------
>> >
>> > -- System has SO_ATTACH_FILTER/SO_DETACH_FILTER support
>> > -- System has PF_PACKET sockets
>> > -- System architecture is NOT strictly aligned
>> > -- System does not have TX_RING support
>> > -- Configuring done
>> > -- Generating done
>> > -- Build files have been written to:
>> > /opt/DOWNLOADS/netsniff-ng-0.5.7/src/build
>> > [  1%] Building C object
>> > netsniff-ng/CMakeFiles/netsniff-ng.dir/__/hash.c.o
>> > [  2%] Building C object
>> > netsniff-ng/CMakeFiles/netsniff-ng.dir/__/dissector.c.o
>> > [  3%] Building C object
>> > netsniff-ng/CMakeFiles/netsniff-ng.dir/__/dissector_eth.c.o
>> > [  4%] Building C object
>> > netsniff-ng/CMakeFiles/netsniff-ng.dir/__/dissector_80211.c.o
>> > [  5%] Building C object
>> > netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_arp.c.o
>> > In file included from /opt/DOWNLOADS/netsniff-ng-0.5.7/src/xutils.h:17,
>> >                  from
>> > /opt/DOWNLOADS/netsniff-ng-0.5.7/src/dissector_eth.h:15,
>> >                  from
>> > /opt/DOWNLOADS/netsniff-ng-0.5.7/src/proto_arp.c:14:
>> > /usr/include/linux/ethtool.h:18: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:35: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:52: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:60: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:66: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:74: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:83: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:179: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:201: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:226: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:239: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:248: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > /usr/include/linux/ethtool.h:254: error: expected
>> > specifier-qualifier-list
>> > before â__u32â
>> > make[2]: *** [netsniff-ng/CMakeFiles/netsniff-ng.dir/__/proto_arp.c.o]
>> > Error
>> > 1
>>
>> What kernel do you run? Is it on an embedded system? The problem here
>> is that (I assume) GCC doesn't understand the data types in the Linux
>> kernel headers .. if you don't have a chance upgrading your system,
>> you could do a dirty hack and add "typedef uint32_t __u32;" see if
>> that helps, otherwise I suggest upgrading.
>>
>> > make[1]: *** [netsniff-ng/CMakeFiles/netsniff-ng.dir/all] Error 2
>> > make: *** [all] Error 2
>> >
>> > ----------------------------------------------
>> >
>> > - mahesh.
>> >
>> > On Tuesday, October 30, 2012 4:49:21 PM UTC+5:30, Daniel Borkmann wrote:
>> >>
>> >> On Tue, Oct 30, 2012 at 11:56 AM, mahesh <[email protected]> wrote:
>> >>
>> >> > I have run into some issues while doing "make" during the
>> >> > installation
>> >> > process. The "cmake .." results look like :-
>> >> >
>> >> > -------------------------
>> >> >
>> >> > -- The C compiler identification is GNU
>> >> > -- Check for working C compiler: /usr/bin/gcc
>> >> > -- Check for working C compiler: /usr/bin/gcc -- works
>> >> > -- Detecting C compiler ABI info
>> >> > -- Detecting C compiler ABI info - done
>> >> > -- Performing Test BPFATTACH_RUN_RESULT
>> >> > -- Performing Test BPFATTACH_RUN_RESULT - Success
>> >> > -- System has SO_ATTACH_FILTER/SO_DETACH_FILTER support
>> >> > -- Performing Test PFPACKET_RUN_RESULT
>> >> > -- Performing Test PFPACKET_RUN_RESULT - Success
>> >> > -- System has PF_PACKET sockets
>> >> > -- Performing Test STRICT_ALIGN_RUN_RESULT
>> >> > -- Performing Test STRICT_ALIGN_RUN_RESULT - Success
>> >> > -- System architecture is NOT strictly aligned
>> >> > -- Performing Test TX_RING_RUN_RESULT
>> >> > -- Performing Test TX_RING_RUN_RESULT - Failed
>> >> > -- System does not have TX_RING support
>> >> > -- Looking for include files CMAKE_HAVE_PTHREAD_H
>> >> > -- Looking for include files CMAKE_HAVE_PTHREAD_H - found
>> >> > -- Looking for pthread_create in pthreads
>> >> > -- Looking for pthread_create in pthreads - not found
>> >> > -- Looking for pthread_create in pthread
>> >> > -- Looking for pthread_create in pthread - found
>> >> > -- Found Threads: TRUE
>> >> > -- Found Libnl: /usr/lib/libnl.so
>> >> > -- Found Curses: /usr/lib/libcurses.so
>> >> > -- Found FLEX: /usr/bin/flex
>> >> > -- Found BISON: /usr/bin/bison
>> >> > -- Found libcli: /usr/lib/libcli.so
>> >> > -- Found LibGeoIP: /usr/lib/libGeoIP.so
>> >> > -- Found NaCl:
>> >> > /opt/nacl-20110221/nacl-20110221/build/iadchacm03/lib/x86/libnacl.a
>> >> > -- Found libnetfilter_conntrack: /usr/lib/libnetfilter_conntrack.so
>> >> > -- Found liburcu: /usr/lib/liburcu.so
>> >> > -- Configuring done
>> >> > -- Generating done
>> >> > -- Build files have been written to:
>> >> > /opt/DOWNLOADS/netsniff-ng-0.5.7/src/build
>> >> >
>> >> > ---------------------------
>> >> >
>> >> > It seems all the pre-requisites have been met. However, when I do
>> >> > "make"
>> >> > I
>> >> > see the errors :-
>> >> >
>> >> > --------------------------------
>> >> >
>> >> > [  1%] Building C object
>> >> > netsniff-ng/CMakeFiles/netsniff-ng.dir/__/hash.c.o
>> >> > cc1: error: unrecognized command line option "-Wstrict-overflow=1"
>> >> > cc1: error: unrecognized command line option "-Wtype-limits"
>> >> > cc1: error: unrecognized command line option
>> >> > "-Wmissing-parameter-type"
>> >> > cc1: error: unrecognized command line option "-Wclobbered"
>> >> > cc1: error: unrecognized command line option "-Wempty-body"
>> >> > cc1: error: unrecognized command line option "-Wignored-qualifiers"
>> >> > cc1: error: unrecognized command line option "-Woverlength-strings"
>> >> > cc1: error: unrecognized command line option "-Wlogical-op"
>> >> > cc1: error: unrecognized command line option "-Woverride-init"
>> >> > /opt/DOWNLOADS/netsniff-ng-0.5.7/src/hash.c:1: error: bad value
>> >> > (native)
>> >> > for
>> >> > -march= switch
>> >> > /opt/DOWNLOADS/netsniff-ng-0.5.7/src/hash.c:1: error: bad value
>> >> > (native)
>> >> > for
>> >> > -mtune= switch
>> >> > make[2]: *** [netsniff-ng/CMakeFiles/netsniff-ng.dir/__/hash.c.o]
>> >> > Error
>> >> > 1
>> >> > make[1]: *** [netsniff-ng/CMakeFiles/netsniff-ng.dir/all] Error 2
>> >> > make: *** [all] Error 2
>> >> >
>> >> > --------------------------------
>> >> >
>> >> > Any ideas on what I am doing wrong ?
>> >>
>> >> Hmm .. maybe your GCC is too old? Try editing compile flags in
>> >> src/CMakeLists.txt, e.g. remove some tuning. The most simple case
>> >> could be that you put "-O2 -Wall" there - might be worth a try.
>> >
>> > --
>> >
>> >
>
> --
>
>

-- 


Reply via email to