[問題] libpcap cross-compiler
我的系統是Fedora4
現在的工作必需將libpcap做交叉編譯的動作~
操作如下~
[root@localhost libpcap-0.9.4]# ./configure --host=arm-linux
.
.
.
.
.
.
checking for arm-linux-ranlib... arm-linux-ranlib
checking if sockaddr struct has sa_len member... no
checking if sockaddr_storage struct exists... yes
checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... no
checking if unaligned accesses fail... yes
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
接著 make~ (出現以下錯誤訊息)
[root@localhost libpcap-0.9.4]# make
arm-linux-gcc -O2 -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -c
./pcap-linux.c
pcap-linux.c:99:20: net/if.h: No such file or directory
pcap-linux.c:102:24: net/if_arp.h: No such file or directory
pcap-linux.c: In function `map_arphrd_to_dlt':
pcap-linux.c:1056: error: `ARPHRD_ETHER' undeclared (first use in this
function)
pcap-linux.c:1056: error: (Each undeclared identifier is reported only once
pcap-linux.c:1056: error: for each function it appears in.)
pcap-linux.c:1085: error: `ARPHRD_METRICOM' undeclared (first use in this
function)
pcap-linux.c:1086: error: `ARPHRD_LOOPBACK' undeclared (first use in this
function)
pcap-linux.c:1091: error: `ARPHRD_EETHER' undeclared (first use in this
function)
pcap-linux.c:1095: error: `ARPHRD_AX25' undeclared (first use in this
function)
pcap-linux.c:1099: error: `ARPHRD_PRONET' undeclared (first use in this
function)
pcap-linux.c:1103: error: `ARPHRD_CHAOS' undeclared (first use in this
function)
pcap-linux.c:1111: error: `ARPHRD_IEEE802' undeclared (first use in this
function)
pcap-linux.c:1116: error: `ARPHRD_ARCNET' undeclared (first use in this
function)
pcap-linux.c:1195: error: `ARPHRD_PPP' undeclared (first use in this function)
pcap-linux.c:1247: error: `ARPHRD_TUNNEL' undeclared (first use in this
function)
pcap-linux.c:1252: error: `ARPHRD_CSLIP' undeclared (first use in this
function)
pcap-linux.c:1253: error: `ARPHRD_SLIP6' undeclared (first use in this
function)
pcap-linux.c:1254: error: `ARPHRD_CSLIP6' undeclared (first use in this
function)
pcap-linux.c:1255: error: `ARPHRD_ADAPT' undeclared (first use in this
function)
pcap-linux.c:1256: error: `ARPHRD_SLIP' undeclared (first use in this
function)
pcap-linux.c:1279: error: `ARPHRD_LOCALTLK' undeclared (first use in this
function)
pcap-linux.c: In function `iface_get_id':
pcap-linux.c:1553: error: storage size of `ifr' isn't known
pcap-linux.c: In function `pcap_close_linux':
pcap-linux.c:1645: error: storage size of `ifr' isn't known
pcap-linux.c:1666: error: `IFF_PROMISC' undeclared (first use in this
function)
pcap-linux.c: In function `live_open_old':
pcap-linux.c:1724: error: storage size of `ifr' isn't known
pcap-linux.c:1780: error: `IFF_PROMISC' undeclared (first use in this
function)
pcap-linux.c: In function `iface_get_mtu':
pcap-linux.c:1885: error: storage size of `ifr' isn't known
pcap-linux.c: In function `iface_get_arptype':
pcap-linux.c:1908: error: storage size of `ifr' isn't known
make: *** [pcap-linux.o] Error 1
不知該如何解決~ 如果是直接 ./configure -> make 就成功
不會出現上面那些錯誤訊息 下一步的 make install 也可以安裝成功
因為我要做交叉編譯 所以我的 ./configure 後面還要加上 --host=arm-linux
請教各位高手解答囉~
※ 編輯: nbalife2003 來自: 203.68.164.34 (02/27 14:42)
討論串 (同標題文章)