Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make会报错 #2

Open
dove2040418 opened this issue Dec 11, 2017 · 9 comments
Open

make会报错 #2

dove2040418 opened this issue Dec 11, 2017 · 9 comments

Comments

@dove2040418
Copy link

make过程会报错,第一次报makefile:1: *** 遗漏分隔符 。 停止。,将第一行注释掉之后,又报其他错误,见附件
test.txt

@felixen
Copy link

felixen commented Dec 12, 2017

@dove2040418 yum install numactl-devel numactl-libs numactl 这三个numa库,基本上先保证dpdk 在本地环境中编译ok,然后再make jupiter。

@ArthurChiao
Copy link

On CentOS, 如下编译通过:

# build dpdk
$ yum install numactl-devel numactl-libs numactl
$ cd jupiter/dpdk-17.11/
$ make config T=x86_64-native-linuxapp-gcc
$ make -j8

# build jupiter
$ cd .. # jupiter source dir
$ find ./Makefile cmd core lib -name Makefile | xargs sed -i 's/\/\*/# \/*/g'
$ make -j8 rpm-pkg

$ find . -name "*.rpm"
./rpmbuild/RPMS/x86_64/jupiter-0.1-1.x86_64.rpm
./rpmbuild/RPMS/x86_64/jupiter-debuginfo-0.1-1.x86_64.rpm

@dove2040418
Copy link
Author

按照您那边给的方法,编译还是会报错,用的rhel7.4:
CC [M] /tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.o
/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: In function 'igb_ndo_bridge_getlink':
/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2295:2: error: too few arguments to function 'ndo_dflt_bridge_getlink'
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags);
^
In file included from /usr/src/kernels/3.10.0-693.5.2.el7.x86_64/include/net/dst.h:13:0,
from /usr/src/kernels/3.10.0-693.5.2.el7.x86_64/include/net/sock.h:72,
from /usr/src/kernels/3.10.0-693.5.2.el7.x86_64/include/linux/tcp.h:23,
from /tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:34:
/usr/src/kernels/3.10.0-693.5.2.el7.x86_64/include/linux/rtnetlink.h:115:12: note: declared here
extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
^
/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: At top level:
/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2324:2: error: unknown field 'ndo_set_vf_vlan' specified in initializer
.ndo_set_vf_vlan = igb_ndo_set_vf_vlan,
^
/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c: In function 'igb_ndo_bridge_getlink':
/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.c:2303:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
make[10]: *** [/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni/igb_main.o] Error 1
make[9]: *** [module/tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11/x86_64-native-linuxapp-gcc/build/lib/librte_eal/linuxapp/kni] Error 2
make[8]: *** [sub-make] Error 2
make[7]: *** [rte_kni.ko] Error 2
make[6]: *** [kni] Error 2
make[5]: *** [linuxapp] Error 2
make[4]: *** [librte_eal] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory /tmp/jupiter/rpmbuild/BUILD/jupiter-0.1/dpdk-17.11' make[1]: *** [dpdk] Error 2 make[1]: Leaving directory /tmp/jupiter/rpmbuild/BUILD/jupiter-0.1'
错误:/var/tmp/rpm-tmp.VziLRx (%build) 退出状态不好

RPM 构建错误:
/var/tmp/rpm-tmp.VziLRx (%build) 退出状态不好
make: *** [rpm-pkg] 错误 1

@felixen
Copy link

felixen commented Dec 12, 2017

@dove2040418 这个应该是igb的内核ko 编译出错了,从错误上看应该是dpdk-17.11 与内核相关的接口不匹配。我们手头暂时没有redhat版本,需要安装一个测试下。

@felixen
Copy link

felixen commented Dec 12, 2017

@dove2040418 请先安装一下kernel-devel,kernel-header,pciutils,gcc,numactl,pcituils,net-tools等相关dpdk 运行需要安装的库,然后再试一下。

@muziding
Copy link
Contributor

@dove2040418 我们验证后发现,Jupiter编译前需要设置RTE_KNI_KMOD_ETHTOOL为y,但是这会造成DPDK-17.11在linux3.10.0-693.el7.x86_64内核上编译失败,如果设置成n,则编译成功。我们现在在想办法解决掉Jupiter对DPDK编译选项RTE_KNI_KMOD_ETHTOOL的依赖。
如果现在想尝试jupiter,可以先在linux3.10.0-327.28.3.el7.x86_64内核上编译。

@dove2040418
Copy link
Author

测试还是不行,各种报错,能否说一下你们的环境怎么搭的?我这边用的centos7.2 1511,minimal安装的,然后装之前你们说的那几个包,但是还是会编译出错。

@muziding
Copy link
Contributor

muziding commented Dec 12, 2017

@dove2040418 minimal安装会缺少很多库,帮你列出了一些需要安装的库
yum install kernel-devel,kernel-header, gcc, glibc, numactl-devel, libpcap-devel, rpmbuild, python-devel
可能还会缺少某些库,具体要看错误信息

@dove2040418
Copy link
Author

刚刚装了7.2.1511 DVD,安装时候显示2410个包,按照后来的那个方法,编译成功(readme还是会报错),实际测试minimal装如下库,还是不行:yum install numactl-devel numactl-libs numactl kernel-devel kernel-headers pciutils gcc* numactl net-tools libpcap-devel

jsonkey added a commit that referenced this issue Dec 13, 2017
Fixed issue #2 that cannot be compiled on kernel version 3.10.0-693.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants