sdnfv / openNetVM

A high performance container-based NFV platform from GW and UCR.
http://sdnfv.github.io/onvm/
Other
263 stars 135 forks source link

install error #208

Closed GeekerFeng closed 4 years ago

GeekerFeng commented 4 years ago

Bug Report

when I follow the installation documentation, run the install script to compile DPDK.

cd scripts
./install.sh

reported an error

== Build drivers/mempool/ring
  Building modules, stage 2.
/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c: In function ‘igbuio_pci_enable_interrupts’:
/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:230:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX) == 1) {
      ^
/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:240:2: note: here
  case RTE_INTR_MODE_MSI:
  ^~~~
/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:250:6: error: this statement may fall through [-Werror=implicit-fallthrough=]
   if (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSI) == 1) {
      ^
/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:259:2: note: here
  case RTE_INTR_MODE_LEGACY:
  ^~~~
In file included from /home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:8:0:
./include/linux/device.h:1561:2: error: this statement may fall through [-Werror=implicit-fallthrough=]
  _dev_notice(dev, dev_fmt(fmt), ##__VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:267:3: note: in expansion of macro ‘dev_notice’
   dev_notice(&udev->pdev->dev, "PCI INTX mask not supported\n");
   ^~~~~~~~~~
/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.c:269:2: note: here
  case RTE_INTR_MODE_NONE:
  ^~~~
cc1: all warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.o' failed
make[6]: *** [/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio/igb_uio.o] Error 1
Makefile:1655: recipe for target '_module_/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio' failed
make[5]: *** [_module_/home/pynix/NFV/openNetVM/dpdk/build/build/kernel/linux/igb_uio] Error 2
/home/pynix/NFV/openNetVM/dpdk/mk/rte.module.mk:50: recipe for target 'igb_uio.ko' failed
make[4]: *** [igb_uio.ko] Error 2
/home/pynix/NFV/openNetVM/dpdk/mk/rte.subdir.mk:35: recipe for target 'igb_uio' failed
make[3]: *** [igb_uio] Error 2
make[3]: *** Waiting for unfinished jobs....
dennisafa commented 4 years ago

Anyway you could tell us: version of GCC, OS, and NIC setup? Thanks!

GeekerFeng commented 4 years ago

thanks! gcc version : 7.5.0 system : ubuntu 18.04.4 I am not very clear about the specific nic setup. When I run lspci I see

lspci | awk '/net/ {print $1}' | xargs -i% lspci -ks %

00:03.0 Ethernet controller: Red Hat, Inc. Virtio network device
    Subsystem: Red Hat, Inc. Virtio network device
    Kernel driver in use: virtio-pci
GeekerFeng commented 4 years ago

I think this problem may be the configuration of the compiler

dennisafa commented 4 years ago

It looks like this may be an outdated version of DPDK, since fallthrough statement error catching is related to a GCC update. Could you please verify that you have the latest version of DPDK in the repo?

GeekerFeng commented 4 years ago

Thank you for your answer, I will verify this question

dennisafa commented 4 years ago

Thank you for your answer, I will verify this question

Following up with you on this - did you resolve the issue?

GeekerFeng commented 4 years ago

Thank you. I forgot to answer. I can compile successfully by reducing the GCC version to 5.5

dennisafa commented 4 years ago

Thank you. I forgot to answer. I can compile successfully by reducing the GCC version to 5.5

You may have an outdated version of DPDK in that case - it should compile with version 7.5 and above.

GeekerFeng commented 4 years ago

I download DPDK source code according to your installation tutorial

Initialize DPDK submodule

git submodule sync
git submodule update --init
GeekerFeng commented 4 years ago

In addition, I also downloaded the latest source code from the DPDK official website, but there is no ko file compiled with gcc7.4

kevindweb commented 4 years ago

My best suggestion would be to start over. If you think that all the other requirements are installed, ONVM version 19.07, gcc 7.5.0, Ubuntu 18.04, all apt packages, etc, then it might have been a problem with the order of installation of things. Since onvm compiles fine without any NICs I would say try not to bind them on the install.sh (for testing). Doing the bare minimum installation will help to find the exact problem because I have never seen this issue. If you get the same again after a clean install, I will try with the master branch of ONVM to confirm for you.

GeekerFeng commented 4 years ago

Thanks , i try again

GeekerFeng commented 4 years ago

environment

image

image

error

image

I have always had problems here, could you please try it?

kevindweb commented 4 years ago

Are you running this in a VM? I got this from the nfv1-vm name. I have never run onvm in a VM. It very well could be the issue. Someone can correct me but we've run on bare metal for a long time. Keep in mind I may be totally offbase but this is the first thing I'd try

GeekerFeng commented 4 years ago

Yes, I run in vm, but I don't think it will cause compilation problems.

twood02 commented 4 years ago

This seems to be a problem with compiling DPDK - we suggest you contact the DPDK users mailing list if you still have this issue.