Drumfix / avb4linux

58 stars 15 forks source link

Makefile error definetly my mistake #24

Open ricky-bolanhos opened 7 months ago

ricky-bolanhos commented 7 months ago

Hi, I'm new at this and actually I don't really know what am I doing, even if it is right or wrong... It's a little embarrassing, so sorry for the inconvenience and thanks in advance (:

It is a fresh install and I tried to check all the requirements to get it to work. The terminal gave me this:

$ sudo make install cd pwd/kernel-module/igb make -C /lib/modules/uname -r/build M=pwd/kernel-module/igb make[1]: Entering directory '/usr/src/linux-headers-6.5.0-18-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 CC [M] /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.o /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_alloc_q_vector’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:1220:9: error: too many arguments to function ‘netif_napi_add’ 1220 | netif_napi_add(adapter->netdev, &q_vector->napi, | ^~~~~~ In file included from /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:48: ./include/linux/netdevice.h:2639:1: note: declared here 2639 | netif_napi_add(struct net_device dev, struct napi_struct napi, | ^~~~~~ In file included from ./include/linux/string.h:254, from ./include/linux/bitmap.h:11, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/paravirt.h:17, from ./arch/x86/include/asm/cpuid.h:62, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/timex.h:5, from ./include/linux/timex.h:67, from ./include/linux/time32.h:13, from ./include/linux/time.h:60, from ./include/linux/stat.h:19, from ./include/linux/module.h:13, from /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:43: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_probe’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:2927:22: warning: passing argument 1 of ‘builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 2927 | memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); | ~~^~~~~~ ./include/linux/fortify-string.h:648:27: note: in definition of macro ‘fortify_memcpy_chk’ 648 | underlying_##op(p, q, fortify_size); \ | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:2927:9: note: in expansion of macro ‘memcpy’ 2927 | memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); | ^~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:2927:22: note: expected ‘void ’ but argument is of type ‘const unsigned char ’ 2927 | memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); | ~~^~~~~~ ./include/linux/fortify-string.h:648:27: note: in definition of macro ‘fortify_memcpy_chk’ 648 | underlying_##op(p, q, fortify_size); \ | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:2927:9: note: in expansion of macro ‘memcpy’ 2927 | memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len); | ^~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_set_mac’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:4430:22: warning: passing argument 1 of ‘builtin_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 4430 | memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); | ~~^~~~~~ ./include/linux/fortify-string.h:648:27: note: in definition of macro ‘fortify_memcpy_chk’ 648 | underlying_##op(p, q, fortify_size); \ | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:4430:9: note: in expansion of macro ‘memcpy’ 4430 | memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); | ^~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:4430:22: note: expected ‘void ’ but argument is of type ‘const unsigned char ’ 4430 | memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); | ~~^~~~~~ ./include/linux/fortify-string.h:648:27: note: in definition of macro ‘fortify_memcpy_chk’ 648 | underlying_##op(p, q, fortify_size); \ | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:4430:9: note: in expansion of macro ‘memcpy’ 4430 | memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); | ^~ In file included from /home/paulorodriguesnvme/avb4linux/kernel-module/igb/e1000_hw.h:28, from /home/paulorodriguesnvme/avb4linux/kernel-module/igb/e1000_api.h:28, from /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb.h:69, from /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:69: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_vmm_control’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/e1000_osdep.h:92:4: warning: this statement may fall through [-Wimplicit-fallthrough=] 92 | do { \ | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:10020:17: note: in expansion of macro ‘E1000_WRITE_REG’ 10020 | E1000_WRITE_REG(hw, E1000_DTXCTL, reg); | ^~~~~~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:10022:9: note: here 10022 | case e1000_82580: | ^~~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_set_interrupt_capability’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:1147:17: warning: this statement may fall through [-Wimplicit-fallthrough=] 1147 | igb_reset_interrupt_capability(adapter); | ^~~~~~~~~~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:1148:9: note: here 1148 | case IGB_INT_MODE_MSI: | ^~~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:1149:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 1149 | if (!pci_enable_msi(pdev)) | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:1155:9: note: here 1155 | case IGB_INT_MODE_LEGACY: | ^~~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_set_fw_version’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:2562:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 2562 | if (!(e1000_get_flash_presence_i210(hw))) { | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:2570:9: note: here 2570 | default: | ^~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_read’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:10381:9: warning: ignoring return value of ‘copy_to_user’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10381 | copy_to_user(buf, &adapter->last_event, sizeof(adapter->last_event)); | ^~~~~~~~~~~~~~~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘__igb_notify_dca’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:6475:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 6475 | if (dca_add_requester(dev) == E1000_SUCCESS) { | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:6482:9: note: here 6482 | case DCA_PROVIDER_REMOVE: | ^~~~ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c: In function ‘igb_has_link’: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:4800:20: warning: this statement may fall through [-Wimplicit-fallthrough=] 4800 | if (!hw->mac.get_link_status) | ^ /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.c:4802:9: note: here 4802 | case e1000_media_type_internal_serdes: | ^~~~ make[3]: [scripts/Makefile.build:251: /home/paulorodriguesnvme/avb4linux/kernel-module/igb/igb_main.o] Error 1 make[2]: [/usr/src/linux-headers-6.5.0-18-generic/Makefile:2039: /home/paulorodriguesnvme/avb4linux/kernel-module/igb] Error 2 make[1]: [Makefile:234: __sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-18-generic' make: [Makefile:35: igb] Error 2

xor-musix commented 7 months ago

Moin @ricky-bolanhos ,

have you tried compiling against a different kernel version, as yours is not LTS and I heard somewhere about some changes regarding netif_napi_add.

I'd love to try avb4linux, but unfortunately don't have time to spare at the moment!

Please let us know when you have solved it.

Cheers!

ricky-bolanhos commented 7 months ago

I've searched this gcc compiler, but I read somewhere that they are the same version, but with different names, so the OS doesn't recognize it. I read about the ptp and the algobit and installed them. I don't know if there's some custom kernel with these features. So after that I did a fresh install of Ubuntu Studio and let's see how it goes. I'll post when I install it.

Thank you for the information, best regards!

xor-musix commented 7 months ago

I'm by no means an expert, but I don't think you need to reinstall your entire distro. Just install an LTS kernel with its headers, e.g. 5.15 or try 6.1 as your kernel is 6.5 which is no longer supported and might have compatibility issues.

ricky-bolanhos commented 7 months ago

I understand. I wanted to install Ubuntu studio since the beginning, but I already have the desktop version.

Thanks again, I will do that