Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715500 - sys-power/bbswitch-0.8-r2 fails to build with gentoo-sources 5.6.0
Summary: sys-power/bbswitch-0.8-r2 fails to build with gentoo-sources 5.6.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Piotr Karbowski (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-03-30 19:41 UTC by Mateusz Mandera
Modified: 2020-04-06 18:43 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,4.24 KB, text/x-log)
2020-03-30 19:41 UTC, Mateusz Mandera
Details
bbswitch-0.8-r2-kernel-5.6.patch (patch560.patch,1.38 KB, patch)
2020-03-30 21:39 UTC, Mateusz Mandera
Details | Diff
bbswitch-0.8-r2-kernel-5.6.patch (0001-Use-proc_ops-structure-for-kernel-version-5.6.0.patch,1.40 KB, patch)
2020-03-31 13:34 UTC, Mateusz Mandera
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mateusz Mandera 2020-03-30 19:41:30 UTC
Created attachment 627520 [details]
build.log

Rebuilding bbswitch after upgrading to gentoo-sources 5.6.0 fails with

  CC [M]  /var/tmp/portage/sys-power/bbswitch-0.8-r2/work/bbswitch-0.8/bbswitch.o
/var/tmp/portage/sys-power/bbswitch-0.8-r2/work/bbswitch-0.8/bbswitch.c: In function ‘bbswitch_init’:
/var/tmp/portage/sys-power/bbswitch-0.8-r2/work/bbswitch-0.8/bbswitch.c:467:63: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  467 |     acpi_entry = proc_create("bbswitch", 0664, acpi_root_dir, &bbswitch_fops);
      |                                                               ^~~~~~~~~~~~~~
      |                                                               |
      |                                                               struct file_operations *
In file included from ./include/acpi/acpi_bus.h:83,
                 from ./include/linux/acpi.h:32,
                 from /var/tmp/portage/sys-power/bbswitch-0.8-r2/work/bbswitch-0.8/bbswitch.c:32:
./include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’
   64 | 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
Comment 1 Mateusz Mandera 2020-03-30 21:39:52 UTC
Created attachment 627662 [details, diff]
bbswitch-0.8-r2-kernel-5.6.patch

This patch seems to have fixed it for me
Comment 2 Piotr Karbowski (RETIRED) gentoo-dev 2020-03-31 09:56:36 UTC
Hello there,

Is this patch your of have you fetched it from somewhere? It has no patch-format notes at the top.

In any case, would you kindly submit it upstream and link the pull request / issue for reference?
Comment 3 Mateusz Mandera 2020-03-31 13:34:00 UTC
Created attachment 627942 [details, diff]
bbswitch-0.8-r2-kernel-5.6.patch

The patch is mine, here's a better one, made with git format-patch. It's applied on top of a commit with the patch we already use https://github.com/gentoo/gentoo/blob/master/sys-power/bbswitch/files/bbswitch-0.8-kernel-4.12.patch
I don't know if that's the correct way to submit, but that's how I had to do it in my /etc/portage/patches for it to work without merge conflicts.

Here's a PR with a version of the patch for upstream, but they haven't done a release since 2013, so we'll probably need to include a patch on our own.
https://github.com/Bumblebee-Project/bbswitch/pull/196
Comment 4 Larry the Git Cow gentoo-dev 2020-04-06 18:42:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8a4109655d335052fff129b206061ecb5ad845a

commit b8a4109655d335052fff129b206061ecb5ad845a
Author:     Piotr Karbowski <slashbeast@gentoo.org>
AuthorDate: 2020-04-06 18:40:41 +0000
Commit:     Piotr Karbowski <slashbeast@gentoo.org>
CommitDate: 2020-04-06 18:42:10 +0000

    sys-power/bbswitch-0.8-r3: kernel 5.6 support; $CC fixes.
    
    Closes: https://bugs.gentoo.org/715500
    Closes: https://bugs.gentoo.org/702730
    Signed-off-by: Piotr Karbowski <slashbeast@gentoo.org>

 sys-power/bbswitch/bbswitch-0.8-r3.ebuild          | 57 ++++++++++++++++++++++
 sys-power/bbswitch/bbswitch-9999.ebuild            | 11 +++--
 .../bbswitch/files/bbswitch-0.8-kernel-5.6.patch   | 52 ++++++++++++++++++++
 3 files changed, 116 insertions(+), 4 deletions(-)
Comment 5 Piotr Karbowski (RETIRED) gentoo-dev 2020-04-06 18:43:59 UTC
Seems like upstream is MIA. Commited your patch, thanks.