roadrunner2 / macbook12-spi-driver

Input driver for the SPI touchpad / keyboard found in the 12" MacBook (MacBook8,1 + MacBook9,1) and 2016 through 2018 Macbook Pro's (MacBookPro13,* and 14,*); a Touch Bar driver is also available.
GNU General Public License v2.0
251 stars 49 forks source link

Can't build mpb15 branch on 5.4.8 #34

Closed TRPB closed 4 years ago

TRPB commented 4 years ago

The main branch works fine but if I try to compile the mbp15 branch I get the following error:

==> dkms install macbook12-spi-driver/0+git.303 -k 5.4.8-1-mbp
Error!  Build of applespi.ko failed for: 5.4.8-1-mbp (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/macbook12-spi-driver/0+git.303/build/ for more information.

The log file it mentions doesn't show anything obviously wrong:

DKMS make.log for macbook12-spi-driver-0+git.303 for kernel 5.4.8-1-mbp (x86_64)
Wed  8 Jan 11:04:34 GMT 2020
make -C /usr/lib/modules/5.4.8-1-mbp/build M=/var/lib/dkms/macbook12-spi-driver/0+git.303/build modules
make[1]: Entering directory '/usr/lib/modules/5.4.8-1-mbp/build'
  CC [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ibridge.o
  CC [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ib-tb.o
  CC [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ib-als.o
  Building modules, stage 2.
  MODPOST 3 modules
  CC [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ib-als.mod.o
  CC [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ib-tb.mod.o
  CC [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ibridge.mod.o
  LD [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ib-als.ko
  LD [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ib-tb.ko
  LD [M]  /var/lib/dkms/macbook12-spi-driver/0+git.303/build/apple-ibridge.ko
make[1]: Leaving directory '/usr/lib/modules/5.4.8-1-mbp/build'
roadrunner2 commented 4 years ago

The main branch works fine but if I try to compile the mbp15 branch I get the following error:


==> dkms install macbook12-spi-driver/0+git.303 -k 5.4.8-1-mbp
Error!  Build of applespi.ko failed for: 5.4.8-1-mbp (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/macbook12-spi-driver/0+git.303/build/ for more information.

Something's odd on your system: it appears to want to build applespi.ko, which doesn't exist in this branch. I don't know where that is coming from, but since you seem to have previously built the main branch I'm wondering if there are some leftovers from that build?

mikeeq commented 4 years ago

It's building fine for me on 5.4.8 but switching from media keys to F-unction keys (F1..F12) stopped working when pressing FN.

but I will create a separate issue for that probably:

[    3.089656] apple-ib-touchbar 0003:05AC:8302.0009: input: USB HID v1.01 Keyboard [Apple Inc. Touch Bar Display] on usb-bce-vhci-6/input0
[    3.353496] apple-ib-touchbar 0003:05AC:8102.000A: : USB HID v1.01 Device [Apple Inc. Touch Bar Backlight] on usb-bce-vhci-7/input0
[    5.413569] apple-ib-touchbar 0003:05AC:8302.0009: tb: Failed to set touch bar mode to 2 (-110)
[  207.180114] apple-ib-touchbar 0003:05AC:8102.000A: hid_field_extract() called with n (64) > 32! (irq/33-bce_dma)
[  302.063320] apple-ib-touchbar 0003:05AC:8302.0009: tb: Failed to set touch bar mode to 2 (-110)

https://travis-ci.com/mikeeq/mbp-fedora/jobs/273480312#L6965

make: Entering directory '/usr/src/kernels/5.4.8-200.mbp.fc31.x86_64'
  CC [M]  /opt/drivers/touchbar/apple-ibridge.o
  CC [M]  /opt/drivers/touchbar/apple-ib-tb.o
  CC [M]  /opt/drivers/touchbar/apple-ib-als.o
  Building modules, stage 2.
  MODPOST 3 modules
  CC [M]  /opt/drivers/touchbar/apple-ib-als.mod.o
Wed Jan  8 12:24:27 UTC 2020
  LD [M]  /opt/drivers/touchbar/apple-ib-als.ko
  CC [M]  /opt/drivers/touchbar/apple-ib-tb.mod.o
  LD [M]  /opt/drivers/touchbar/apple-ib-tb.ko
  CC [M]  /opt/drivers/touchbar/apple-ibridge.mod.o
  LD [M]  /opt/drivers/touchbar/apple-ibridge.ko
make: Leaving directory '/usr/src/kernels/5.4.8-200.mbp.fc31.x86_64'
TRPB commented 4 years ago

Something's odd on your system: it appears to want to build applespi.ko, which doesn't exist in this branch. I don't know where that is coming from, but since you seem to have previously built the main branch I'm wondering if there are some leftovers from that build?

Strange. I just tried trizen instead of yay (which presumably uses a different cache directory) and it gives the same issue. As does removing the package and reinstalling it.

Edit: something very strange is going on as my dmks.conf looks like this:

ACKAGE_NAME="@_PKGBASE@"
PACKAGE_VERSION="@PKGVER@"
AUTOINSTALL="yes"
CLEAN="make clean"

BUILT_MODULE_NAME[0]="applespi"
BUILT_MODULE_NAME[1]="apple-ibridge"
BUILT_MODULE_NAME[2]="apple-ib-tb"
BUILT_MODULE_NAME[3]="apple-ib-als"
MAKE[0]="make KDIR=/usr/lib/modules/$kernelver/build"
MAKE[1]="make KDIR=/usr/lib/modules/$kernelver/build"
MAKE[2]="make KDIR=/usr/lib/modules/$kernelver/build"
MAKE[3]="make KDIR=/usr/lib/modules/$kernelver/build"
DEST_MODULE_LOCATION[0]="/kernel/drivers/spi"
DEST_MODULE_LOCATION[1]="/kernel/drivers/misc"
DEST_MODULE_LOCATION[2]="/kernel/drivers/misc"
DEST_MODULE_LOCATION[3]="/kernel/drivers/misc"

I'm not sure how it's getting that.

Previously I've just set #branch=mbp15 in PKGBUILD. Is there something else I need to do?

TRPB commented 4 years ago

Ah, I've found the issue. dkms.conf from the main branch is packaged in AUR along with the PKGBUILD.

roadrunner2 commented 4 years ago

Glad to hear you got it sorted out.