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

build failure on armhf and ppc64el #213

Open
arighi opened this issue Nov 19, 2021 · 1 comment · Fixed by #216
Open

build failure on armhf and ppc64el #213

arighi opened this issue Nov 19, 2021 · 1 comment · Fixed by #216

Comments

@arighi
Copy link

arighi commented Nov 19, 2021

I'm getting the following build error on armhf and ppc64 with linux 5.15:

 CC [M]  /var/lib/dkms/bbswitch/0.8/build/bbswitch.o
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c: In function ‘bbswitch_off’:
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:271:13: error: implicit declaration of function ‘acpi_bus_get_device’; did you mean ‘acpi_get_gpe_device’? [-Werror=implicit-function-declaration]
  271 |         r = acpi_bus_get_device(dis_handle, &ad);
      |             ^~~~~~~~~~~~~~~~~~~
      |             acpi_get_gpe_device
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:276:15: error: invalid use of undefined type ‘struct acpi_device’
  276 |         if (ad->power.state == ACPI_STATE_UNKNOWN) {
      |               ^~
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:278:15: error: invalid use of undefined type ‘struct acpi_device’
  278 |             ad->power.state = ACPI_STATE_D0;
      |               ^~

This is because in bbswitch_off() we use acpi_bus_get_device() to determine the power state, but this feature is only available on x86 and arm64. We should probably ifdef that chunk of code and use it only on x86 and arm64.

@arighi
Copy link
Author

arighi commented Nov 19, 2021

Created PR #214

@bluca bluca linked a pull request Nov 29, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant