Folks,
I'm an interested fink user who would like to see tcptraceroute compile successfully.
I also
happen to be a software developer professionally. I've taken a look at the archived
thread on
this subject to date and have a suggestion to fix the PRu16 error. Add the #define
PRu16 and
PRU32 lines below after the other two suggested #defines:
#define LIBNET_IP_H LIBNET_IPV4_H
#define LIBNET_ICMP_H LIBNET_ICMPV4_H
#define PRu16 LIBNET_PRu16
#define PRu32 LIBNET_PRu32
I also added this line after the #include for libnet.h:
#include <libnet/libnet-headers.h>
The following are the errors I'm seeing:
[src/tcptraceroute-1.2-3/tcptraceroute-1.2] # make
gcc -O2 -Wall `libnet-config --defines` \
-o tcptraceroute tcptraceroute.c \
-I /sw/include \
`libnet-config --libs` -lpcap
tcptraceroute.c:226: warning: ANSI C forbids newline in string constant
tcptraceroute.c:768: warning: ANSI C forbids newline in string constant
tcptraceroute.c:229:1: warning: multi-line string literals are deprecated
tcptraceroute.c: In function `iptohost':
tcptraceroute.c:386: warning: implicit declaration of function `libnet_host_lookup'
tcptraceroute.c:386: warning: return makes pointer from integer without a cast
tcptraceroute.c: In function `defaults':
tcptraceroute.c:657: warning: implicit declaration of function `libnet_name_resolve'
tcptraceroute.c:739: too few arguments to function `libnet_seed_prand'
tcptraceroute.c:741: warning: implicit declaration of function
`libnet_open_raw_sock'
tcptraceroute.c:772:1: warning: multi-line string literals are deprecated
tcptraceroute.c: In function `probe':
tcptraceroute.c:821: warning: implicit declaration of function `libnet_build_ip'
tcptraceroute.c:844: warning: passing arg 8 of `libnet_build_tcp' makes integer
from pointer without a cast
tcptraceroute.c:844: too few arguments to function `libnet_build_tcp'
tcptraceroute.c:846: warning: passing arg 1 of `libnet_do_checksum' from
incompatible pointer type
tcptraceroute.c:846: warning: passing arg 2 of `libnet_do_checksum' makes pointer
from integer without a cast
tcptraceroute.c:846: too few arguments to function `libnet_do_checksum'
tcptraceroute.c:851: warning: implicit declaration of function `libnet_write_ip'
tcptraceroute.c: In function `capture':
tcptraceroute.c:962: dereferencing pointer to incomplete type
tcptraceroute.c:973: dereferencing pointer to incomplete type
tcptraceroute.c:974: dereferencing pointer to incomplete type
tcptraceroute.c:976: dereferencing pointer to incomplete type
tcptraceroute.c:999: dereferencing pointer to incomplete type
tcptraceroute.c:1006: dereferencing pointer to incomplete type
tcptraceroute.c:1019: dereferencing pointer to incomplete type
tcptraceroute.c:1023: dereferencing pointer to incomplete type
tcptraceroute.c:1065: dereferencing pointer to incomplete type
tcptraceroute.c:1070: dereferencing pointer to incomplete type
tcptraceroute.c:1072: dereferencing pointer to incomplete type
tcptraceroute.c:1080: dereferencing pointer to incomplete type
tcptraceroute.c:1100: dereferencing pointer to incomplete type
make: *** [tcptraceroute] Error 1
[src/tcptraceroute-1.2-3/tcptraceroute-1.2] #
My largest concern at this point are the "too few arguments" errors. I'll look into
them and see what I
can suggest.
--Joel
On Tuesday, January 28, 2003, at 04:36 PM, Jeremy Higgs wrote:
> Hmmm... OK. Now I've added the include line for libnet/libnet-headers.h and the
> defines lines you
> mentioned, but I get this (notice the define errors have gone):
>
> patch -p1 </sw/fink/dists/local/main/finkinfo/tcptraceroute-1.4-1.patch
> patching file tcptraceroute.c
> echo "No configure script."
> No configure script.
> # (cc -Wall -I/sw/include `libnet-config --defines` -o tcptraceroute
> tcptraceroute.c `libnet-config
> --libs` -L/sw/lib -lpcap)
> make tcptraceroute CFLAGS=-I/sw/include
> gcc -I/sw/include `libnet-config --defines` \
> -o tcptraceroute tcptraceroute.c \
> `libnet-config --libs` -lpcap
> tcptraceroute.c:397: warning: ANSI C forbids newline in string constant
> tcptraceroute.c:1188: warning: ANSI C forbids newline in string constant
> tcptraceroute.c:400:1: warning: multi-line string literals are deprecated
> tcptraceroute.c: In function `iptohost':
> tcptraceroute.c:602: warning: return makes pointer from integer without a cast
> tcptraceroute.c: In function `allocateid':
> tcptraceroute.c:891: `PRu16' undeclared (first use in this function)
> tcptraceroute.c:891: (Each undeclared identifier is reported only once
> tcptraceroute.c:891: for each function it appears in.)
> tcptraceroute.c: In function `defaults':
> tcptraceroute.c:1151: too few arguments to function `libnet_seed_prand'
> tcptraceroute.c:1193:1: warning: multi-line string literals are deprecated
> tcptraceroute.c: In function `probe':
> tcptraceroute.c:1306: warning: passing arg 8 of `libnet_build_tcp' makes integer
> from pointer without a
> cast
> tcptraceroute.c:1306: too few arguments to function `libnet_build_tcp'
> tcptraceroute.c:1308: warning: passing arg 1 of `libnet_do_checksum' from
> incompatible pointer type
> tcptraceroute.c:1308: warning: passing arg 2 of `libnet_do_checksum' makes pointer
> from integer without
> a cast
> tcptraceroute.c:1308: too few arguments to function `libnet_do_checksum'
> tcptraceroute.c: In function `capture':
> tcptraceroute.c:1429: dereferencing pointer to incomplete type
> tcptraceroute.c:1435: dereferencing pointer to incomplete type
> tcptraceroute.c:1441: dereferencing pointer to incomplete type
> tcptraceroute.c:1444: dereferencing pointer to incomplete type
> tcptraceroute.c:1454: dereferencing pointer to incomplete type
> tcptraceroute.c:1492: dereferencing pointer to incomplete type
> tcptraceroute.c:1498: dereferencing pointer to incomplete type
> tcptraceroute.c:1504: dereferencing pointer to incomplete type
> tcptraceroute.c:1507: dereferencing pointer to incomplete type
> tcptraceroute.c:1511: dereferencing pointer to incomplete type
> tcptraceroute.c:1514: dereferencing pointer to incomplete type
> tcptraceroute.c:1519: dereferencing pointer to incomplete type
> tcptraceroute.c:1526: dereferencing pointer to incomplete type
> tcptraceroute.c:1540: dereferencing pointer to incomplete type
> tcptraceroute.c:1544: dereferencing pointer to incomplete type
> tcptraceroute.c:1585: dereferencing pointer to incomplete type
> tcptraceroute.c:1589: dereferencing pointer to incomplete type
> tcptraceroute.c:1594: dereferencing pointer to incomplete type
> tcptraceroute.c:1597: dereferencing pointer to incomplete type
> tcptraceroute.c:1602: dereferencing pointer to incomplete type
> tcptraceroute.c:1603: dereferencing pointer to incomplete type
> tcptraceroute.c:1606: dereferencing pointer to incomplete type
> tcptraceroute.c:1614: dereferencing pointer to incomplete type
> tcptraceroute.c:1618: dereferencing pointer to incomplete type
> tcptraceroute.c:1621: dereferencing pointer to incomplete type
> tcptraceroute.c:1634: dereferencing pointer to incomplete type
> tcptraceroute.c:1635: dereferencing pointer to incomplete type
> tcptraceroute.c:1678: dereferencing pointer to incomplete type
> make: *** [tcptraceroute] Error 1
> ### execution of failed, exit code 2
> Failed: compiling tcptraceroute-1.4-1 failed
>
> But it's still essentially the same error.
>
> Any ideas?
>
> Thanks a lot!
>
> On Tuesday, January 28, 2003, at 05:51 PM, Carsten Klapp wrote:
> >
> >
> >Hi Jeremy,
> > Nevermind my previous answer... I just noticed
> > /sw/include/libnet/libnet-headers.h declares specifically
> >LIBNET_IPV4_H and LIBNET_ICMPV4_H instead of LIBNET_IP_H and LIBNET_ICMP_H.
> >
> > Try patching in this at some point in the code after the "#include
> > <libnet/libnet-headers.h>" line:
> > #define LIBNET_IP_H LIBNET_IPV4_H
> > #define LIBNET_ICMP_H LIBNET_ICMPV4_H
> >
> > The other errors should probably go away then too. As for the "PRu16" error I
> > have no clue, sorry.
> > Carsten
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel