关于交叉编译的问题

pengpeng2018 2009-12-02 06:49:42


Quagga 0.99.14开源路由软件在centos本机编译通过,但在针对microblaze芯片petalinux系统编译中出现如下错误.交叉编译前已经成功生成makefile文件(如下),但编译过程中报错,不知道为什么.请赐教.

[centos@localhost quagga-0.99.14]$ ./configure --host=microblaze-uclinux --prefix=/tmp/huzhipeng
....

Quagga configuration
--------------------
quagga version : 0.99.14
host operationg system : uclinux
source code location : .
compiler : microblaze-uclinux-gcc
compiler flags : -Os -fno-omit-frame-pointer -g -std=gnu99 -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual
make : make
includes :
linker flags : -lcrypt -lm
state file directory : /var/run
config file directory : /tmp/huzhipeng/etc
example directory : /tmp/huzhipeng/etc
user to run as : quagga
group to run as : quagga
group for vty sockets :
config file mask : 0600
log file mask : 0600

The above user and group must have read/write access to the state file
directory and to the config files in the config file directory.

[centos@localhost quagga-0.99.14]$ make
....
DMULTIPATH_NUM=1 -I. -I.. -I.. -I.. -I../lib -fPIE -Os -fno-omit-frame-pointer -g -std=gnu99 -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wchar-subscripts -Wcast-qual -MT if_ioctl.o -MD -MP -MF .deps/if_ioctl.Tpo -c -o if_ioctl.o if_ioctl.c
///////////下面是出错信息
if_ioctl.c:338: warning: no previous prototype for 'if_get_addr'
if_ioctl.c: In function `if_get_addr':
if_ioctl.c:392: error: structure has no member named `sin_addr'
if_ioctl.c:406: error: structure has no member named `sin_addr'
make[2]: *** [if_ioctl.o] Error 1
make[2]: Leaving directory `/home/centos/quagga-0.99.14/zebra'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/centos/quagga-0.99.14'
make: *** [all] Error 2


...全文
183 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
pengpeng2018 2009-12-03
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 beyondma 的回复:]
头文件的事情吧。
[/Quote]
那个sin_addr的结构体在<netinet/in.h>中都有呀,而且petalinux内也有那个头文件呀(如下).
[centos@localhost quagga-0.99.14]$ find /home/centos/ -name in.h
/home/centos/.Trash/in.h
/home/centos/petalinux/tools/linux-i386/microblaze-glibc-root/microblaze-linux-elf/usr/include/linux/in.h
/home/centos/petalinux/tools/linux-i386/microblaze-glibc-root/microblaze-linux-elf/usr/include/bits/in.h
/home/centos/petalinux/tools/linux-i386/microblaze-glibc-root/microblaze-linux-elf/usr/include/netinet/in.h
/home/centos/petalinux/tools/linux-i386/microblaze-uclinux-tools/microblaze-uclinux/include/bits/in.h
/home/centos/petalinux/tools/linux-i386/microblaze-uclinux-tools/microblaze-uclinux/include/netinet/in.h
/home/centos/petalinux/software/petalinux-dist/user/iproute2/include-glibc/netinet/in.h
/home/centos/petalinux/software/petalinux-dist/user/iputils/include-glibc/netinet/in.h
/home/centos/petalinux/software/petalinux-dist/user/ntp/ports/winnt/include/netinet/in.h
/home/centos/petalinux/software/linux-2.6.x-petalogix/include/linux/in.h
/home/centos/Desktop/in.h


附故障代码if_ioctl.c文件头文件声明:
#include <zebra.h>

#include "if.h"
#include "sockunion.h"
#include "prefix.h"
#include "ioctl.h"
#include "connected.h"
#include "memory.h"
#include "log.h"

#include "zebra/interface.h"
beyondma 2009-12-02
  • 打赏
  • 举报
回复
头文件的事情吧。

21,597

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧