luigirizzo / netmap

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

make install gives depmod: Warning: ... needs unknown symbol #903

Open AlexTUM opened 1 year ago

AlexTUM commented 1 year ago

I am trying to install netmap on my debian 11 system with kernel 5.10.0-20-amd64. Configuring using the method "patching NIC-vendors out-of-tree drivers" seemed to go fine. Thus, I did not install the full kernel sources (issuing a warning but it seems to be optional if I don't want to patch the kernel drivers there). Calling make install however, yields thousands of lines like this:

depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol dcb_ieee_setapp
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol get_zeroed_page
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol msleep
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol ktime_get_with_offset
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol ethtool_op_get_ts_info
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol xsk_tx_release
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol tty_driver_kref_put
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol __kmalloc
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol kmalloc_caches
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol netdev_info
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol device_remove_file
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol xdp_do_flush
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol kobject_put
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol pci_get_dsn
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol synchronize_net
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol devlink_port_register
depmod: WARNING: /lib/modules/5.10.0-20-amd64/updates/drivers/net/ethernet/intel/ice-netmap/ice-netmap.ko needs unknown symbol module_layout

At the end it yields an error:

Updating initramfs...
update-initramfs: Generating /boot/initrd.img-5.10.0-20-amd64
make[1]: Leaving directory '/home/alex/OSVirt/netmap/igb-5.10.2/src'
make -C e1000e install INSTALL_MOD_PATH= CFLAGS_EXTRA="-fno-pie -I/home/alex/OSVirt/netmap -I/home/alex/OSVirt/netmap/LINUX -I/home/alex/OSVirt/netmap/LINUX/../sys -I/home/alex/OSVirt/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 -DNETMAP_DRIVER_SUFFIX=-netmap" NETMAP_DRIVER_SUFFIX=-netmap KSRC=/lib/modules/5.10.0-20-amd64/build KBUILD_EXTRA_SYMBOLS=/home/alex/OSVirt/netmap/Module.symvers
make[1]: Entering directory '/home/alex/OSVirt/netmap/e1000e-3.8.7/src'
make[2]: Entering directory '/usr/src/linux-headers-5.10.0-20-amd64'
make[2]: Leaving directory '/usr/src/linux-headers-5.10.0-20-amd64'
gzip: ../e1000e-netmap.7: No such file or directory
make[1]: *** [Makefile:97: manfile] Error 1
make[1]: Leaving directory '/home/alex/OSVirt/netmap/e1000e-3.8.7/src'
make: *** [netmap.mak:88: install-e1000e] Error 2

Any ideas where these symbols should be coming from and why depmod cannot find them?

AlexTUM commented 1 year ago

I've made a little progress but still can't solve the problem:

For the first few steps I get output like

make[1]: Entering directory '/usr/src/linux-headers-5.10.0-20-amd64'
  INSTALL /home/alex/OSVirt/netmap/netmap.ko
  DEPMOD  5.10.0-20-amd64
Warning: modules_install: missing 'System.map' file. Skipping depmod.

indicating that there is no System.map file. As far as I understand the depmod(8) manpage, this is normal when using the active kernel (and map files are only created for other kernels). The script then calls /sbin/depmod -e -F /boot/System.map-5.10.0-20-amd64 -a 5.10.0-20-amd64 with the map file under /boot with the dummy contents:

ffffffffffffffff B The real System.map is in the linux-image-<version>-dbg package

However, as stated above, I did not install the full kernel sources, hence linux-image-xx does not exist. This explains the warnings, as it cannot find any symbols in the map file, -eF will report every symbol as missing. I do not do what exactly to do about it and why it ultimately fails though.

giuseppelettieri commented 1 year ago

Hi @AlexTUM, the latest master should fix the installation error. You can ignore the warnings.