patjak / facetimehd

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

Gentoo failed bcwc_pcie compile of fthd_drv.o using layman toaster config #197

Open T1mK opened 4 years ago

T1mK commented 4 years ago

In Gentoo amd64 MacBook Pro, bcwc_pcie will no longer complete its build. Any idea what it could be or how to solve it? Thanks a lot for your efforts and providing this for the community!

$ lspci ... 04:00.0 Multimedia controller: Broadcom Inc. and subsidiaries 720p FaceTime HD Camera ...

 * Package:    media-video/bcwc_pcie-9999
 * Repository: toaster
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     4.19.86-gentoo
 * Checking for suitable kernel configuration options...
 [ ok ]
>>> Unpacking source...
 * Repository id: patjak_bcwc_pcie.git
 * Fetching https://github.com/patjak/bcwc_pcie ...
git fetch https://github.com/patjak/bcwc_pcie +refs/heads/mainline:refs/heads/mainline
git symbolic-ref refs/git-r3/media-video/bcwc_pcie/0/__main__ refs/heads/mainline
 * Checking out https://github.com/patjak/bcwc_pcie to /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999 ...
git checkout --quiet mainline
GIT update -->
   repository:               https://github.com/patjak/bcwc_pcie
   at the commit:            816e81526b0e6d87d6a2c33a8254633c4ef773a7
>>> Source unpacked in /var/tmp/portage/media-video/bcwc_pcie-9999/work
>>> Preparing source in /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999 ...
ln: failed to create symbolic link 'Module.symvers': File exists
 * Preparing facetimehd module
make -j9 -l8 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' all
make -C /usr/src/linux M=/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999 modules
make[1]: Entering directory '/usr/src/linux-4.19.86-gentoo'
  CC [M]  /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_debugfs.o
  CC [M]  /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_buffer.o
  CC [M]  /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_v4l2.o
  CC [M]  /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_isp.o
  CC [M]  /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_ringbuf.o
  CC [M]  /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.o
/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.c: In function ‘fthd_pci_init’:
/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.c:379:2: error: implicit declaration of function ‘pci_disable_link_state’; did you mean ‘pci_disable_ats’? [-Werror=implicit-function-declaration]
  379 |  pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
      |  ^~~~~~~~~~~~~~~~~~~~~~
      |  pci_disable_ats
/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.c:379:31: error: ‘PCIE_LINK_STATE_L0S’ undeclared (first use in this function)
  379 |  pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
      |                               ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.c:379:31: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.c:379:53: error: ‘PCIE_LINK_STATE_L1’ undeclared (first use in this function)
  379 |  pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1 |
      |                                                     ^~~~~~~~~~~~~~~~~~
/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.c:380:11: error: ‘PCIE_LINK_STATE_CLKPM’ undeclared (first use in this function)
  380 |           PCIE_LINK_STATE_CLKPM);
      |           ^~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:304: /var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999/fthd_drv.o] Error 1
make[1]: *** [Makefile:1525: _module_/var/tmp/portage/media-video/bcwc_pcie-9999/work/bcwc_pcie-9999] Error 2
make[1]: Leaving directory '/usr/src/linux-4.19.86-gentoo'
make: *** [Makefile:9: all] Error 2
 * ERROR: media-video/bcwc_pcie-9999::toaster failed (compile phase):
 *   emake failed
patjak commented 4 years ago

Hi, looks like gento is fetching from the mainline branch. It should fetch from the master branch. I should probably rename mainline to development to make it's use more clear.