patjak / facetimehd

Reverse engineered Linux driver for the FacetimeHD (Broadcom 1570) PCIe webcam
GNU General Public License v2.0
1.35k stars 160 forks source link

Macbook air installation (LinuxMint) -Werror=implicit-function-declaration #282

Closed pswindells77 closed 1 year ago

pswindells77 commented 1 year ago

Hi, I have been using this perfectly for a while, re-installing after kernel updates. After the latest I am now getting the following error: bcwc_pcie/fthd_drv.c:399:9: error: implicit declaration of function ‘pci_set_consistent_dma_mask’ [-Werror=implicit-function-declaration] 399 | pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(dev_priv->dma_mask)); | ^~~~~~~ cc1: some warnings being treated as errors

Linux Mint 21.1 Vera: 5.19.0-35-generic Any help would be much appreciated. Thanks Paul

viksok commented 1 year ago

I had similar errors on Ubuntu 22.10 and 23.04. In my case the issue was in gcc versions. The one that is installed should met one a kernel was built. For example if your current kernel was build with gcc 12.2.x then you should install exactly same version 12.2.x. 12.1.x may still fail.

P.S.

Use cat /proc/version to check which version was used to build a kernel.

pswindells77 commented 1 year ago

Thanks for responding. I appreciate it. I think I am running the correct version though.
gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04),

Linux version 5.19.0-35-generic (buildd@lcy02-amd64-020) (x86_64-linux-gnu-gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2

Paul

viksok commented 1 year ago

Kernel headers installed?

pswindells77 commented 1 year ago

'uname -r' returns: i A linux-headers-5.19.0-35-generic - Linux kernel headers for version 5.19.0 on

Paul

pswindells77 commented 1 year ago

Resolved. See https://github.com/patjak/facetimehd/issues/283