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

Build problem: Debian , Kernel 6.1 #961

Open
SysMan-One opened this issue Jun 27, 2024 · 3 comments
Open

Build problem: Debian , Kernel 6.1 #961

SysMan-One opened this issue Jun 27, 2024 · 3 comments

Comments

@SysMan-One
Copy link

Hello!

I have tried too build latest netmap from the repo under 6.1.0-21-amd64 :

/root/Works/netmap/virtio_net.c/virtio_net_src.c:1403:26: error: initialization of ‘void (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)’ from incompatible pointer type ‘void (*)(struct net_device *, struct ethtool_ringparam *)’ [-Werror=incompatible-pointer-types]
 1403 |         .get_ringparam = virtnet_get_ringparam,
      |                          ^~~~~~~~~~~~~~~~~~~~~
/root/Works/netmap/virtio_net.c/virtio_net_src.c:1403:26: note: (near initialization for ‘virtnet_ethtool_ops.get_ringparam’)
/root/Works/netmap/virtio_net.c/virtio_net_src.c: In function ‘virtnet_alloc_queues’:
/root/Works/netmap/virtio_net.c/virtio_net_src.c:1652:17: error: too many arguments to function ‘netif_napi_add’
 1652 |                 netif_napi_add(vi->dev, &vi->rq[i].napi, virtnet_poll,
      |                 ^~~~~~~~~~~~~~
In file included from /root/Works/netmap/virtio_net.c/virtio_net_src.c:19:
/usr/src/linux-headers-6.1.0-21-common/include/linux/netdevice.h:2575:1: note: declared here
 2575 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
/root/Works/netmap/virtio_net.c/virtio_net_src.c: In function ‘virtnet_probe’:
/root/Works/netmap/virtio_net.c/virtio_net_src.c:1803:39: warning: passing argument 3 of ‘virtio_cread_bytes’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1803 |                                    dev->dev_addr, dev->addr_len);
      |                                    ~~~^~~~~~~~~~
In file included from /usr/src/linux-headers-6.1.0-21-common/include/uapi/linux/virtio_net.h:30,
                 from /usr/src/linux-headers-6.1.0-21-common/include/linux/virtio_net.h:8,
                 from /root/Works/netmap/virtio_net.c/virtio_net_src.c:24:
/usr/src/linux-headers-6.1.0-21-common/include/linux/virtio_config.h:521:45: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  521 |                                       void *buf, size_t len)
      |                                       ~~~~~~^~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.1.0-21-common/scripts/Makefile.build:255: /root/Works/netmap/virtio_net.c/virtio_net_src.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.1.0-21-common/Makefile:2035: /root/Works/netmap/virtio_net.c] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.1.0-21-amd64'
make[1]: *** [Makefile:17: all] Error 2
make[1]: Leaving directory '/root/Works/netmap/virtio_net.c'
make: *** [netmap.mak:88: build-virtio_net.c] Error 2


Is there what I'm need to check ?

@baksosapi
Copy link

I have same problem

danz@192:~/Simulator/ns-3-dev/netmap/LINUX$ make
make -C /lib/modules/6.1.0-23-amd64/build M=/home/danz/Simulator/ns-3-dev/netmap/LINUX EXTRA_CFLAGS='-I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys/dev -DCONFIG_NETMAP -Wno-unused-but-set-variable -Wno-attributes -Wno-packed-not-aligned -Wno-stringop-truncation -Wno-missing-attributes -Wno-format-truncation -Wno-maybe-uninitialized -Wno-unused-variable -Wno-unused-label -Wno-implicit-fallthrough -Wno-missing-prototypes -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-6.1.0-23-amd64'
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_mem2.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_mbq.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_legacy.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_bdg.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_kloop.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_vale.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_offloadings.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_pipe.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_monitor.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_generic.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_null.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_common.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_linux.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap_ptnet.o
  LD [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap.o
  MODPOST /home/danz/Simulator/ns-3-dev/netmap/LINUX/Module.symvers
  LD [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap.ko
  BTF [M] /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap.ko
Skipping BTF generation for /home/danz/Simulator/ns-3-dev/netmap/LINUX/netmap.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-23-amd64'
KBUILD_EXTRA_SYMBOLS=/home/danz/Simulator/ns-3-dev/netmap/LINUX/Module.symvers; export KBUILD_EXTRA_SYMBOLS; make -C mlx5 NETMAP_DRIVER_SUFFIX= EXTRA_CFLAGS="-Wframe-larger-than=2000 -I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys/dev -DCONFIG_NETMAP -Wno-unused-but-set-variable -Wno-attributes -Wno-packed-not-aligned -Wno-stringop-truncation -Wno-missing-attributes -Wno-format-truncation -Wno-maybe-uninitialized -Wno-unused-variable -Wno-unused-label -Wno-implicit-fallthrough -Wno-missing-prototypes -g -DCONFIG_NETMAP_NULL -DCONFIG_NETMAP_PTNETMAP -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE"
make[1]: Entering directory '/home/danz/Simulator/ns-3-dev/netmap/LINUX/mlnx-en-5.8'
Building kernel modules
Kernel version: 6.1.0-23-amd64
Modules directory: /lib/modules/6.1.0-23-amd64/extra/mellanox-mlnx-en
Kernel build: /lib/modules/6.1.0-23-amd64/build
Kernel sources: /lib/modules/6.1.0-23-amd64/source
env CWD=/home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5 BACKPORT_INCLUDES= \
	make -C /lib/modules/6.1.0-23-amd64/build M="/home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5" \
	V=0 KBUILD_NOCMDDEP=1  \
	CONFIG_COMPAT_VERSION= \
	CONFIG_COMPAT_KOBJECT_BACKPORT= \
	CONFIG_MEMTRACK= \
	CONFIG_AUXILIARY_BUS= \
	CONFIG_MLX5_CORE=m \
	CONFIG_MLX5_CORE_EN=y \
	CONFIG_MLX5_CORE_EN_DCB=y \
	CONFIG_MLX5_EN_ARFS=y \
	CONFIG_MLX5_EN_RXNFC=y \
	CONFIG_MLX5_ACCEL=y \
	CONFIG_MLX5_EN_ACCEL_FS=y \
	CONFIG_MLX5_SF=y \
	CONFIG_MLX5_SF_MANAGER=y \
	CONFIG_MLXDEVM=m \
	CONFIG_MLX5_SF_CFG=y \
	CONFIG_MLX5_EN_TLS=y \
	CONFIG_MLX5_TLS=y \
	CONFIG_MLX5_SW_STEERING=y \
	CONFIG_MLX5_ESWITCH=y \
	CONFIG_MLX5_BRIDGE=y \
	CONFIG_MLX5_CLS_ACT=y \
	CONFIG_MLX5_TC_CT=y \
	CONFIG_MLX5_TC_SAMPLE=y \
	CONFIG_MLX5_MPFS=y \
	CONFIG_MLXFW=m \
	CONFIG_MLX5_FPGA_TLS= \
	CONFIG_MLX5_FPGA_IPSEC= \
	CONFIG_MLX5_IPSEC= \
	CONFIG_MLX5_EN_MACSEC= \
	CONFIG_MLX5_FPGA= \
	CONFIG_DTRACE= \
	CONFIG_CTF= \
	LINUXINCLUDE='-DCOMPAT_BASE="\"mlnx-en-compat-20230707-1949-65e3aec\"" -DCOMPAT_BASE_TREE="\"mlnx_ofed/mlnx-ofa_kernel-4.0.git\"" -DCOMPAT_BASE_TREE_VERSION="\"65e3aec\"" -DCOMPAT_PROJECT="\"Compat-mlnx-ofed\"" -DCOMPAT_VERSION="\"65e3aec\""  -DMLX_DISABLE_TRACEPOINTS -include /lib/modules/6.1.0-23-amd64/build/include/generated/autoconf.h  -include /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/include/linux/compat-2.6.h     -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/include -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/include/uapi $(if $(CONFIG_XEN),-D__XEN_INTERFACE_VERSION__=$(CONFIG_XEN_INTERFACE_VERSION)) $(if $(CONFIG_XEN),-I$(srctree)/arch/x86/include/mach-xen) -I$(srctree)/arch/$(SRCARCH)/include -Iarch/$(SRCARCH)/include/generated -Iinclude -I$(srctree)/arch/$(SRCARCH)/include/uapi -Iarch/$(SRCARCH)/include/generated/uapi -I$(srctree)/include -I$(srctree)/include/uapi -Iinclude/generated/uapi $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) -I$(srctree)/arch/$(SRCARCH)/include -Iarch/$(SRCARCH)/include/generated ' \
	modules
make[2]: Entering directory '/usr/src/linux-headers-6.1.0-23-amd64'
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/drivers/net/ethernet/mellanox/mlx5/core/en_main.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/drivers/net/ethernet/mellanox/mlx5/core/en_tx.o
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/drivers/net/ethernet/mellanox/mlx5/core/en_rx.o
  LD [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.o
  MODPOST /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/Module.symvers
  LD [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
  BTF [M] /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
Skipping BTF generation for /home/danz/Simulator/ns-3-dev/netmap/LINUX/mlx5/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko due to unavailability of vmlinux
make[2]: Leaving directory '/usr/src/linux-headers-6.1.0-23-amd64'
make[1]: Leaving directory '/home/danz/Simulator/ns-3-dev/netmap/LINUX/mlnx-en-5.8'
KBUILD_EXTRA_SYMBOLS=/home/danz/Simulator/ns-3-dev/netmap/LINUX/Module.symvers; export KBUILD_EXTRA_SYMBOLS; [ -z "-I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys/dev -DCONFIG_NETMAP -Wno-unused-but-set-variable -Wno-attributes -Wno-packed-not-aligned -Wno-stringop-truncation -Wno-missing-attributes -Wno-format-truncation -Wno-maybe-uninitialized -Wno-unused-variable -Wno-unused-label -Wno-implicit-fallthrough -Wno-missing-prototypes -g -DCONFIG_NETMAP_NULL -DCONFIG_NETMAP_PTNETMAP -DCONFIG_NETMAP_GENERIC -DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE" ] || make -C virtio_net.c EXTRA_CFLAGS="-I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys -I/home/danz/Simulator/ns-3-dev/netmap/LINUX/../sys/dev -DCONFIG_NETMAP -Wno-unused-but-set-variable -Wno-attributes -Wno-packed-not-aligned -Wno-stringop-truncation -Wno-missing-attributes -Wno-format-truncation -Wno-maybe-uninitialized -Wno-unused-variable -Wno-unused-label -Wno-implicit-fallthrough -Wno-missing-prototypes -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/6.1.0-23-amd64/build
make[1]: Entering directory '/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c'
make -C "/lib/modules/6.1.0-23-amd64/build" M=/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c modules
make[2]: Entering directory '/usr/src/linux-headers-6.1.0-23-amd64'
  CC [M]  /home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.o
/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c:1403:26: error: initialization of ‘void (*)(struct net_device *, struct ethtool_ringparam *, struct kernel_ethtool_ringparam *, struct netlink_ext_ack *)’ from incompatible pointer type ‘void (*)(struct net_device *, struct ethtool_ringparam *)’ [-Werror=incompatible-pointer-types]
 1403 |         .get_ringparam = virtnet_get_ringparam,
      |                          ^~~~~~~~~~~~~~~~~~~~~
/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c:1403:26: note: (near initialization for ‘virtnet_ethtool_ops.get_ringparam’)
/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c: In function ‘virtnet_alloc_queues’:
/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c:1652:17: error: too many arguments to function ‘netif_napi_add’
 1652 |                 netif_napi_add(vi->dev, &vi->rq[i].napi, virtnet_poll,
      |                 ^~~~~~~~~~~~~~
In file included from /home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c:19:
/usr/src/linux-headers-6.1.0-23-common/include/linux/netdevice.h:2575:1: note: declared here
 2575 | netif_napi_add(struct net_device *dev, struct napi_struct *napi,
      | ^~~~~~~~~~~~~~
/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c: In function ‘virtnet_probe’:
/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c:1803:39: warning: passing argument 3 of ‘virtio_cread_bytes’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1803 |                                    dev->dev_addr, dev->addr_len);
      |                                    ~~~^~~~~~~~~~
In file included from /usr/src/linux-headers-6.1.0-23-common/include/uapi/linux/virtio_net.h:30,
                 from /usr/src/linux-headers-6.1.0-23-common/include/linux/virtio_net.h:8,
                 from /home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.c:24:
/usr/src/linux-headers-6.1.0-23-common/include/linux/virtio_config.h:521:45: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
  521 |                                       void *buf, size_t len)
      |                                       ~~~~~~^~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.1.0-23-common/scripts/Makefile.build:255: /home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c/virtio_net_src.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.1.0-23-common/Makefile:2034: /home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-6.1.0-23-amd64'
make[1]: *** [Makefile:17: all] Error 2
make[1]: Leaving directory '/home/danz/Simulator/ns-3-dev/netmap/LINUX/virtio_net.c'
make: *** [netmap.mak:88: build-virtio_net.c] Error 2

danz@192:~/Simulator/ns-3-dev/netmap/LINUX$ uname -r
6.1.0-23-amd64

@jkasten2
Copy link

This looks like the same as issue #922, most likely due a change in the virtio_net driver.

A new netmap patch is probably needed to fix this. However there is a work around, per giuseppelettieri's comment you can disable netmap for the specific driver if you don't need it:

./configure --no-drivers=virtio_net.c

I ran into this error as well, and this got me past the make step.

@mortezamirkar
Copy link

mortezamirkar commented Oct 21, 2024

This looks like the same as issue #922, most likely due a change in the virtio_net driver.

A new netmap patch is probably needed to fix this. However there is a work around, per giuseppelettieri's comment you can disable netmap for the specific driver if you don't need it:

./configure --no-drivers=virtio_net.c

I ran into this error as well, and this got me past the make step.

it fixes my problem
thank you

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