当前位置: 技术问答>linux和unix
看个错误
来源: 互联网 发布时间:2016-12-04
本文导语: $./configure ...................................... ....................................... $ make VER=`cat ./VERSION`; MAJOR_VER=`sed 's/([0-9][0-9]*)..*/1/' ./VERSION`; gcc -shared -Wl,-soname,libpcap.so.$MAJOR_VER -o libpcap.so.$VER pcap-linux.o pcap-us...
$./configure
......................................
.......................................
$ make
VER=`cat ./VERSION`;
MAJOR_VER=`sed 's/([0-9][0-9]*)..*/1/' ./VERSION`;
gcc -shared -Wl,-soname,libpcap.so.$MAJOR_VER
-o libpcap.so.$VER pcap-linux.o pcap-usb-linux.o pcap-can-linux.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-linux.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-usb-linux.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `fad-getad.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `inet.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `gencode.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `optimize.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `nametoaddr.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `etherent.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `savefile.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `sf-pcap.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `sf-pcap-ng.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-common.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_image.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_dump.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `scanner.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `grammar.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_filter.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `version.o' is incompatible with i386 output
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [libpcap.so] 错误 1
......................................
.......................................
$ make
VER=`cat ./VERSION`;
MAJOR_VER=`sed 's/([0-9][0-9]*)..*/1/' ./VERSION`;
gcc -shared -Wl,-soname,libpcap.so.$MAJOR_VER
-o libpcap.so.$VER pcap-linux.o pcap-usb-linux.o pcap-can-linux.o fad-getad.o pcap.o inet.o gencode.o optimize.o nametoaddr.o etherent.o savefile.o sf-pcap.o sf-pcap-ng.o pcap-common.o bpf_image.o bpf_dump.o scanner.o grammar.o bpf_filter.o version.o
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-linux.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-usb-linux.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `fad-getad.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `inet.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `gencode.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `optimize.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `nametoaddr.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `etherent.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `savefile.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `sf-pcap.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `sf-pcap-ng.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `pcap-common.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_image.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_dump.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `scanner.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `grammar.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `bpf_filter.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `version.o' is incompatible with i386 output
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make: *** [libpcap.so] 错误 1
|
你的是32位机器编译的64位源码吧
|
貌似你那些.o文件是64位的
修改一下makefile中的gcc选项,添加-m64 试试看
修改一下makefile中的gcc选项,添加-m64 试试看
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。