交叉编译时出错,急等!

dq043   2008-3-5 12:00 楼主
求教:

      我预将 应用程序(ntop)烧入开发板, 它需要 libpcap的支持,在libpcap 的makefile文件中 gcc 改为 arm-linux-gcc(交叉编译gcc) 后, 正常安装了。
      但 安装应用程序时  执行    .configure  提示 :

              ERROR: pcap header, bpf or library routines are missing
*           (yes means it was found, no means it was not found)
*
*              pcap.h...yes
*              net/bpf.h...no
*              pcap-bpf.h...yes
*              pcap_open_live() in -lpcap...no
*              pcap_findalldevs() in -lpcap...no
*
*  (One of the bpf files is required, but either will do)
*
*>>> No way to proceed.
*
*???     1. Install libpcap (http://www.tcpdump.org/)
*???    and Rerun ./configure
*???  or 2. Use the --with-pcap-root= option



       急等解决办法!!

回复评论 (6)

麻烦会的给讲讲阿 !!!
点赞  2008-3-6 09:01
libpcap装到哪了,有装到交叉编译器的路径那吗
点赞  2008-3-6 14:37


  libpcap 解压后直接安装的    交叉编译的路径是那个那

      在 arm-linux-gcc,g++ 那个目录下解压吗?

                               我是新手 麻烦了!!
点赞  2008-3-6 14:53
出错如下:

checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/opt/host/armv4l/armv4l-unknown-linux/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking for armv4l-unknown-linux-libtool... $(SHELL) $(top_builddir)/libtool
  Checking libtool version...1.5.22
checking for armv4l-unknown-linux-autoheader... no
checking for autoheader... autoheader
checking for armv4l-unknown-linux-aclocal... no
checking for aclocal... aclocal
checking for armv4l-unknown-linux-automake... no
checking for automake... automake
checking for armv4l-unknown-linux-autoconf... no
checking for autoconf... autoconf
./configure: line 21630: ac_enable_jumbo-frames=no: command not found
checking for aclocal.m4... configure: error: cannot check for file existence when cross compiling

运行命令:

[root@localhost ntop-3.2]# ./configure --host=armv4l-unknown-linux



点赞  2008-3-6 17:36
比如交叉工具链在/usr/local/arm-linux/下
那么./configure --host=arm-linux --prefix=/usr/local/arm-linux/arm-linux/lib
我这的目录是这样
点赞  2008-3-7 09:14
checking for typedef int8_t... yes
checking trivial compile... configure: WARNING: error

*******************************************************************
*
* ERROR: A trivial c compile has failed.  Something is seriously wrong.
*
*        Check your --with-xxxxx-xxxxx parameters - if a library (-l)
*        is not found in the locations given (-L) it causes these global
*        compile problems. The library list, includes and flags used are:
*
*        LIBS=-lpng -lgd -lgdbm -lpcap  -lpcap -lgdbm -lgd -lpng -lz
*        INCS= -I/usr/include
*        CPPFLAGS= -DLINUX -I/usr/local/include -I/usr/include
*        LDFLAGS= -L/usr/local/lib -L/usr/include/gdbm
*
*        The compile error message is:
*
/opt/host/armv4l/armv4l-unknown-linux/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
*
*>>> No way to proceed.
*
*???     1. Correct the --with-xxxxx-xxxxx parameters
*???    and Rerun ./configure
*
*******************************************************************

configure: error: Unable to continue... aborting ./configure


   又出现了这个错误 !!  咳!!
点赞  2008-3-9 11:27
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复