Bumblebee-Project / bbswitch

Disable discrete graphics (currently nvidia only)
GNU General Public License v2.0
487 stars 78 forks source link

bbswitch wont compile vs 5.6.3 #198

Closed rubiksdot closed 4 years ago

rubiksdot commented 4 years ago

A little bleeding edge but it would appear that bbswitch no longer compiles vs kernel 5.6.3. This is the end of the make log that I have:

  CC [M]  /var/lib/dkms/bbswitch/0.8/build/bbswitch.o
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c: In function ‘bbswitch_init’:
/var/lib/dkms/bbswitch/0.8/build/bbswitch.c:460:63: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops);
                                                               ^~~~~~~~~~~~~~
In file included from ./include/acpi/acpi_bus.h:83,
                 from ./include/linux/acpi.h:32,
                 from /var/lib/dkms/bbswitch/0.8/build/bbswitch.c:32:
./include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’
 struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
                        ^~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:268: /var/lib/dkms/bbswitch/0.8/build/bbswitch.o] Error 1

I'm guessing that changes made to use file descriptors for processes are causing the issue.

ArchangeGabriel commented 4 years ago

196

ghost commented 4 years ago

just a test but for me works: bbswitch-v0.8-proc_ops-struct.patch

now it compiles good

Lekensteyn commented 4 years ago

Fix merged with #196

rien333 commented 4 years ago

I'm testing out 5.7 (to be released next week, I think?) because I have a different problem. Now, I found out that bbswitch doesn't compile, again related to stuff with proc_ops. See the included file for a build log.

make.log

Lekensteyn commented 4 years ago

@rien333 Please try the latest develop branch, an implicit header was removed by upstream so we have to explicitly include it.

rien333 commented 4 years ago

Works again, thank you very much!