From owner-freebsd-questions@FreeBSD.ORG Wed Jan 26 04:22:41 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6834C1065674 for ; Wed, 26 Jan 2011 04:22:41 +0000 (UTC) (envelope-from freebsd-questions@herveybayaustralia.com.au) Received: from mail.unitedinsong.com.au (mail.unitedinsong.com.au [150.101.178.33]) by mx1.freebsd.org (Postfix) with ESMTP id D2ADD8FC13 for ; Wed, 26 Jan 2011 04:22:40 +0000 (UTC) Received: from laptop1.herveybayaustralia.com.au (laptop1.herveybayaustralia.com.au [192.168.0.186]) by mail.unitedinsong.com.au (Postfix) with ESMTP id BFDE35C44 for ; Wed, 26 Jan 2011 14:29:44 +1000 (EST) Message-ID: <4D3FA0DF.5080108@herveybayaustralia.com.au> Date: Wed, 26 Jan 2011 14:19:43 +1000 From: Da Rock User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.16) Gecko/20101227 Thunderbird/3.0.11 ThunderBrowse/3.3.4 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4D3F9F6F.9020603@herveybayaustralia.com.au> In-Reply-To: <4D3F9F6F.9020603@herveybayaustralia.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: include file not found X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jan 2011 04:22:41 -0000 On 01/26/11 14:13, Da Rock wrote: > Ok, I'm here again... next question (same quest). > > FWIW this is about getting a l2tp vpn working for android connections. > I have come across a carrier grade system called l2tpns which I'm > trying to build to see if it will work. > > I've built libcli (but without clitest) and it has installed the > header files under /usr/local/include. When I build l2tpns I get: > > gcc -Wall -Wformat-security -Wno-format-zero-length -g -O3 -I. > -DLIBDIR='"/lib/l2tpns"' -DETCDIR='"/etc/l2tpns"' -DSTATISTICS > -DSTAT_CALLS -DRINGBUFFER -DHAVE_EPOLL -DBGP -c -o arp.o arp.c > In file included from arp.c:8: > /usr/include/net/if_arp.h:88: error: field 'arp_pa' has incomplete type > /usr/include/net/if_arp.h:89: error: field 'arp_ha' has incomplete type > In file included from arp.c:9: > /usr/include/netinet/if_ether.h:96: error: field 'sin_addr' has > incomplete type > /usr/include/netinet/if_ether.h:97: error: field 'sin_srcaddr' has > incomplete type > In file included from arp.c:11: > l2tpns.h:15:20: error: libcli.h: No such file or directory > In file included from arp.c:11: > l2tpns.h:772: warning: 'struct cli_def' declared inside parameter list > l2tpns.h:772: warning: its scope is only this definition or > declaration, which is probably not what you want > l2tpns.h:773: warning: 'struct cli_def' declared inside parameter list > l2tpns.h:774: warning: 'struct cli_def' declared inside parameter list > l2tpns.h:797: warning: 'struct cli_def' declared inside parameter list > arp.c:20: error: 'ETH_ALEN' undeclared here (not in a function) > arp.c: In function 'sendarp': > arp.c:29: error: storage size of 'sll' isn't known > arp.c:54: error: 'PF_PACKET' undeclared (first use in this function) > arp.c:54: error: (Each undeclared identifier is reported only once > arp.c:54: error: for each function it appears in.) > arp.c:54: error: 'ETH_P_RARP' undeclared (first use in this function) > arp.c:57: error: 'AF_PACKET' undeclared (first use in this function) > arp.c:29: warning: unused variable 'sll' > gmake: *** [arp.o] Error 1 > > Incidentally I changed the include in arp.c from linux/if_packet.h to > netinet/if_ether.h. My problem lies in the file not found error for > libcli.h, though. ls /usr/local/include shows libcli.h there as > expected with the same permissions as the other header files there. > > Any ideas? Sorry- scratch that. My output now looks like: gcc -Wall -Wformat-security -Wno-format-zero-length -g -O3 -I. -I/usr/include -I/usr/local/include -DLIBDIR='"/lib/l2tpns"' -DETCDIR='"/etc/l2tpns"' -DSTATISTICS -DSTAT_CALLS -DRINGBUFFER -DHAVE_EPOLL -DBGP -c -o arp.o arp.c In file included from arp.c:8: /usr/include/net/if_arp.h:88: error: field 'arp_pa' has incomplete type /usr/include/net/if_arp.h:89: error: field 'arp_ha' has incomplete type In file included from arp.c:9: /usr/include/netinet/if_ether.h:96: error: field 'sin_addr' has incomplete type /usr/include/netinet/if_ether.h:97: error: field 'sin_srcaddr' has incomplete type arp.c:20: error: 'ETH_ALEN' undeclared here (not in a function) arp.c: In function 'sendarp': arp.c:29: error: storage size of 'sll' isn't known arp.c:54: error: 'PF_PACKET' undeclared (first use in this function) arp.c:54: error: (Each undeclared identifier is reported only once arp.c:54: error: for each function it appears in.) arp.c:54: error: 'ETH_P_RARP' undeclared (first use in this function) arp.c:57: error: 'AF_PACKET' undeclared (first use in this function) arp.c:29: warning: unused variable 'sll' gmake: *** [arp.o] Error 1 I'll try and work it out on my own, but if anyone wants to chip it'd be very welcome. Sorry for the cruft :)