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

PCIe drivers fail to compile on Ubuntu 16.04 #184

Open
CyanoKobalamyne opened this issue Jul 15, 2021 · 3 comments
Open

PCIe drivers fail to compile on Ubuntu 16.04 #184

CyanoKobalamyne opened this issue Jul 15, 2021 · 3 comments

Comments

@CyanoKobalamyne
Copy link
Contributor

When trying to compile pcieportal, I get the following error:

/home/ubuntu/src/connectal/drivers/pcieportal/portal.c: In function ‘pcieportal_ioctl’:
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c:204:119: error: missing binary operator before token "("
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)) && !(defined(RHEL_MAJOR) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0))
                                                                                                                       ^
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c:207:69: error: macro "access_ok" requires 3 arguments, but only 2 given
                 err = !access_ok((void __user *) arg, _IOC_SIZE(cmd));
                                                                     ^
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c:207:24: error: ‘access_ok’ undeclared (first use in this function)
                 err = !access_ok((void __user *) arg, _IOC_SIZE(cmd));
                        ^
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c:207:24: note: each undeclared identifier is reported only once for each function it appears in
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c:210:119: error: missing binary operator before token "("
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)) && !(defined(RHEL_MAJOR) && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,0))
                                                                                                                       ^
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c:213:69: error: macro "access_ok" requires 3 arguments, but only 2 given
                 err = !access_ok((void __user *) arg, _IOC_SIZE(cmd));
                                                                     ^
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c: In function ‘pcieportal_board_activate’:
/home/ubuntu/src/connectal/drivers/pcieportal/portal.c:548:39: error: implicit declaration of function ‘pci_irq_vector’ [-Werror=implicit-function-declaration]
                 this_board->irq_num = pci_irq_vector(this_board->pci_dev, 8);
                                       ^

Kernel version is the default 4.4.0. I also tried on 18.04, with a newer kernel (the default, I think 4.15), and that gave me the same error.

@CyanoKobalamyne
Copy link
Contributor Author

The version from the repo seems to work on 18.04, but on 16.04 that also fails to install, although with a different error:

/var/lib/dkms/connectal/20.06.4/build/portal.c: In function ‘pcieportal_board_activate’:
/var/lib/dkms/connectal/20.06.4/build/portal.c:548:39: error: implicit declaration of function ‘pci_irq_vector’ [-Werror=implicit-function-declaration]
                 this_board->irq_num = pci_irq_vector(this_board->pci_dev, 8);
                                       ^

@manish-pp
Copy link

Do you have any idea how to resolve this error in ubuntu 16.04?

The version from the repo seems to work on 18.04, but on 16.04 that also fails to install, although with a different error:

/var/lib/dkms/connectal/20.06.4/build/portal.c: In function ‘pcieportal_board_activate’:
/var/lib/dkms/connectal/20.06.4/build/portal.c:548:39: error: implicit declaration of function ‘pci_irq_vector’ [-Werror=implicit-function-declaration]
                 this_board->irq_num = pci_irq_vector(this_board->pci_dev, 8);
                                       ^

@jameyhicks
Copy link
Member

Hi Manish,

Ubuntu 16.04 is no longer getting security updates, so I recommend upgrading to the newest LTS that you can use.

Otherwise, the thing to do is look up pci_irq_vector in Linux cross reference and look at its history between 16.04 and 18.04.

Jamey

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

3 participants