luigirizzo / netmap

Automatically exported from code.google.com/p/netmap
BSD 2-Clause "Simplified" License
1.84k stars 534 forks source link

build netmap on centos 7(3.10.0-957.el7.x86_64) for e1000e driver failed, #740

Open zengxianglu opened 3 years ago

zengxianglu commented 3 years ago

HI, Everyone: I want to builk netmap on centos 7, but always failed, What is the problem? thanks。 [root@bogon LINUX]# ./configure --kernel-sources=/root/rpmbuild/BUILD/kernel-3.10.0-957.el7/linux-3.10.0-957.el7.x86_64/ --kernel-sources=/root/rpmbuild/BUILD/kernel-3.10.0-957.el7/linux-3.10.0-957.el7.x86_64 --drivers=e1000e ** NOTE ** We are trying to download the original sources for driver e1000e using the following command:


*** test -e /root/netmap-master/LINUX/ext-drivers/e1000e-3.4.0.2.tar.gz || wget https://sourceforge.net/projects/e1000/files/e1000e%20stable/3.4.0.2/e1000e-3.4.0.2.tar.gz -P /root/netmap-master/LINUX/ext-drivers/


If this fails, please download the above file and put it in /root/netmap-master/LINUX/ext-drivers/, then run configure again.


** NOTE ** *** Running some preliminary tests to customize the build enviroment.


** NOTE ** Now running compile tests to adapt the code to your kernel version. Please wait.


** WARNING ** ***** There were problems building the external driver e1000e.


Please note that this is not related to the netmap patches, that were not applied.


* Disabling e1000e.


kernel directory /lib/modules/3.10.0-957.el7.x86_64/build [/usr/src/kernels/3.10.0-957.el7.x86_64] kernel sources /root/rpmbuild/BUILD/kernel-3.10.0-957.el7/linux-3.10.0-957.el7.x86_64 linux version 30a00 [3.10] module file netmap.ko

subsystems null ptnetmap generic monitor pipe vale apps dedup vale-ctl nmreplay tlem lb bridge pkt-gen native drivers

NAYANSEN90 commented 3 years ago

Use --select-version parameter in the configure command line to provide a different driver version. This version of the driver is probably not compiling on this OS. Check the "config.log". That should help. Try the latest patch available for e1000e. Use the driver version from that.

sergio-gimenez commented 2 years ago

Answering this here in order to not open a new issue because is strongly related.

I tried to solve the *** Please note that this is not related to the netmap patches issue by using @NAYANSEN90 sugestion. Now it seems that by using the latest available patched version (by looking at ls LINUX/final-patches/ | grep intel--e1000e, that is intel--e1000e--3.8.7) the configure command does not complain and everything seems fine. The machine is running an Ubuntu 20.04.3 LTS (5.11.0-38-generic):

./configure --drivers=e1000e --select-version=e1000e:3.8.7

Output:

**********************************  NOTE   **********************************
*** We are trying to download the original sources for driver
*** e1000e using the following command:
*** 
***   test -e /home/aucoop/netmap/LINUX/ext-drivers/e1000e-3.8.7.tar.gz || wget https://sourceforge.net/projects/e1000/files/e1000e%20stable/3.8.7/e1000e-3.8.7.tar.gz -P /home/aucoop/netmap/LINUX/ext-drivers/
*** 
*** If this fails, please download the above file and put it
*** in /home/aucoop/netmap/LINUX/ext-drivers/, then run configure again.
*****************************************************************************
**********************************  NOTE   **********************************
*** Running some preliminary tests to customize the build environment.
*****************************************************************************
**********************************  NOTE   **********************************
*** Now running compile tests to adapt the code to your
*** kernel version. Please wait.
*****************************************************************************
kernel directory            /lib/modules/5.11.0-38-generic/build
                            [/usr/src/linux-headers-5.11.0-38-generic]
kernel sources              /lib/modules/5.11.0-38-generic/build
                            [/usr/src/linux-headers-5.11.0-38-generic]
linux version               50b16  [5.11.22]
module file                 netmap.ko

subsystems                  null ptnetmap generic monitor pipe vale
apps                        dedup vale-ctl nmreplay tlem lb bridge pkt-gen
native drivers              e1000e

Contents of the drivers.mak file:
e1000e@conf := CONFIG_E1000E
e1000e@src := tar xf /home/aucoop/netmap/LINUX/ext-drivers/e1000e-3.8.7.tar.gz && ln -s e1000e-3.8.7/src e1000e
e1000e@patch := patches/intel--e1000e--3.8.7

However, when I run the make command, I get the following error:

make
make -C /lib/modules/5.11.0-38-generic/build M=/home/aucoop/netmap EXTRA_CFLAGS='-I/home/aucoop/netmap -I/home/aucoop/netmap/LINUX -I/home/aucoop/netmap/LINUX/../sys -I/home/aucoop/netmap/LINUX/../sys/dev -DCONFIG_NETMAP -Wno-unused-but-set-variable -g -DCONFIG_NETMAP_NULL -DCONFIG_NETMAP_PTNETMAP -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE'  modules CONFIG_NETMAP=m  O_DRIVERS="" NETMAP_DRIVER_SUFFIX=
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-38-generic'
  CC [M]  /home/aucoop/netmap/netmap_mem2.o
  CC [M]  /home/aucoop/netmap/netmap_mbq.o
  CC [M]  /home/aucoop/netmap/netmap_legacy.o
  CC [M]  /home/aucoop/netmap/netmap_bdg.o
  CC [M]  /home/aucoop/netmap/netmap_kloop.o
  CC [M]  /home/aucoop/netmap/netmap_vale.o
  CC [M]  /home/aucoop/netmap/netmap_offloadings.o
  CC [M]  /home/aucoop/netmap/netmap_pipe.o
  CC [M]  /home/aucoop/netmap/netmap_monitor.o
  CC [M]  /home/aucoop/netmap/netmap_generic.o
  CC [M]  /home/aucoop/netmap/netmap_null.o
  CC [M]  /home/aucoop/netmap/netmap_common.o
  CC [M]  /home/aucoop/netmap/netmap_linux.o
  CC [M]  /home/aucoop/netmap/netmap_ptnet.o
  LD [M]  /home/aucoop/netmap/netmap.o
  MODPOST /home/aucoop/netmap/Module.symvers
  LD [M]  /home/aucoop/netmap/netmap.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-38-generic'
if [ -d e1000e ] && [ -e Module.symvers ]; then cp Module.symvers e1000e; fi
make -C e1000e CFLAGS_EXTRA="-fno-pie -I/home/aucoop/netmap -I/home/aucoop/netmap/LINUX -I/home/aucoop/netmap/LINUX/../sys -I/home/aucoop/netmap/LINUX/../sys/dev -DCONFIG_NETMAP -Wno-unused-but-set-variable -g -DCONFIG_NETMAP_NULL -DCONFIG_NETMAP_PTNETMAP -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE"  NETMAP_DRIVER_SUFFIX= KSRC=/lib/modules/5.11.0-38-generic/build
make[1]: Entering directory '/home/aucoop/netmap/e1000e-3.8.7/src'
*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but
*** the signing key cannot be found. Module signing has been
*** disabled for this build.
make[2]: Entering directory '/usr/src/linux-headers-5.11.0-38-generic'
  CC [M]  /home/aucoop/netmap/e1000e-3.8.7/src/netdev.o
  LD [M]  /home/aucoop/netmap/e1000e-3.8.7/src/e1000e.o
  MODPOST /home/aucoop/netmap/e1000e-3.8.7/src/Module.symvers
ERROR: modpost: "netmap_attach" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "netmap_rx_irq" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "netmap_rings_config_get" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "netmap_no_pendintr" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "netmap_ring_reinit" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "nm_clear_native_flags" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "netmap_detach" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "nm_set_native_flags" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
ERROR: modpost: "netmap_reset" [/home/aucoop/netmap/e1000e-3.8.7/src/e1000e.ko] undefined!
make[3]: *** [scripts/Makefile.modpost:124: /home/aucoop/netmap/e1000e-3.8.7/src/Module.symvers] Error 1
make[3]: *** Deleting file '/home/aucoop/netmap/e1000e-3.8.7/src/Module.symvers'
make[2]: *** [Makefile:1753: modules] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.11.0-38-generic'
make[1]: *** [Makefile:73: default] Error 2
make[1]: Leaving directory '/home/aucoop/netmap/e1000e-3.8.7/src'
make: *** [netmap.mak:90: build-e1000e] Error 2

Here the config.log file in case might be useful.

Don't really know how to proceed from here on. Any clues?