The warnings at lines 231 affected the line numbers listed for the errors.
I also came up with #defines to resolve the rest.  I'm down to this:

   # make       
   gcc -O2 -Wall `libnet-config --defines` \
           -o tcptraceroute tcptraceroute.c \
           -I/sw/include -L/sw/lib \
           `libnet-config --libs` -lpcap -w
   ld: Undefined symbols:
   _libnet_host_lookup
   _libnet_name_resolve
   _libnet_open_raw_sock
   make: *** [tcptraceroute] Error 1
   # 

It's time to quit for the evening.  If anyone would like details on what
I did I'll send out diff -e output (or whatever folks suggest) against the
original source.

--Joel


> Here's a followup on my earlier message...
> 
> I have gotten rid of the compilation errors and now turn to what remains.
> [I must stress I made some guesses and it isn't clear that even if I can
> get past the remaining issues that the result will be working code.] 
> 
> Here's what I'm seeing in terms of errors (at least this is what gcc is
> saying after suppressing warnings):
> 
>    # make
>    gcc -O2 -Wall `libnet-config --defines` \
>            -o tcptraceroute tcptraceroute.c \
>            -I /sw/include -L /sw/lib \
>            `libnet-config --libs` -lpcap -w
>    tcptraceroute.c:231: warning: ANSI C forbids newline in string constant
>    tcptraceroute.c:773: warning: ANSI C forbids newline in string constant
>    tcptraceroute.c: In function `capture':
>    tcptraceroute.c:972: dereferencing pointer to incomplete type
>    tcptraceroute.c:983: dereferencing pointer to incomplete type
>    tcptraceroute.c:984: dereferencing pointer to incomplete type
>    tcptraceroute.c:986: dereferencing pointer to incomplete type
>    tcptraceroute.c:1009: dereferencing pointer to incomplete type
>    tcptraceroute.c:1016: dereferencing pointer to incomplete type
>    tcptraceroute.c:1029: dereferencing pointer to incomplete type
>    tcptraceroute.c:1033: dereferencing pointer to incomplete type
>    tcptraceroute.c:1075: dereferencing pointer to incomplete type
>    tcptraceroute.c:1080: dereferencing pointer to incomplete type
>    tcptraceroute.c:1082: dereferencing pointer to incomplete type
>    tcptraceroute.c:1090: dereferencing pointer to incomplete type
>    tcptraceroute.c:1110: dereferencing pointer to incomplete type
>    make: *** [tcptraceroute] Error 1
>    # 
> 
> I've hit a roadblock with the "dereferencing pointer to incomplete type" errors above
> The rub is if I look at line 972 I don't see anything clearly applicable to the 
> error.
> For example, the error at line 1082 is a blank line.  The warnings for line 231 and 
> 773
> are contextually correct -- see what the warning is citing.
> 
> I'm using the December 2002 Developer Tools should anyone wish to know.  The gcc 
> version
> is "gcc (GCC) 3.1 20020420 (prerelease)".
> 
> Anyone able to help me either make the error line number be correct for the errors or
> able to give me a workaround to determine the line number?
> 
> --Joel
> 
> 
> > 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
> > 
> 
> 
> 
> -------------------------------------------------------
> 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
> 



-------------------------------------------------------
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

Reply via email to