Summary: | xfce-extra/xfce4-sensors-plugin-1.3.92-r1 with x11-drivers/nvidia-drivers-? - /usr/include/NVCtrl/NVCtrlLib.h:42:1: error: unknown type name ‘Bool’; did you mean ‘bool’? | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Miroslav Šulc <fordfrog> |
Component: | Current packages | Assignee: | XFCE Team <xfce> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | boerns, ionen, jer, mgorny, sam, soap |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/e8e0c5969a1dbd16fad6b9a86ceb461403a242eb | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
nvctrl xlib fix compile without patch compile with patch |
Description
Miroslav Šulc
2020-10-02 08:11:14 UTC
I don't use this but think I can point in the right direction My own code (a fan control daemon I wrote that use libXNVCtrl.a) still compiles fine, but includes X11/Xlib.h before NVCtrl*.h. If I remove Xlib.h then I get the same errors, I assume it's (now) missing here too. 1.3.92-r1 emerges fine against stable xfce4 dependencies, but on ~amd64 I guess some headers in dependencies changed and was able to reproduce. I tried both with nvidia-drivers-450.66 and 455.23.04 with same results. Created attachment 663577 [details, diff]
nvctrl xlib fix
Might as well provide a patch, it's really trivial (and should get upstreamed).
I dare say whatever nvidia headers need it should #include it. thank you for pointing out the correct include. i put it in /usr/include/NVCtrl/NVCtrlLib.h instead as that is imo the correct file where it belongs (as Michal wrote) and xfce4-sensors-plugin compiles fine. so changing this bug to nvidia-drivers issue. I'm personally against patching the headers in gentoo, if upstream nvidia does it it's fine. I'd rather not end up writing software that I think works fine only to be told it fail to build on another distribution that didn't patch the headers. Comment on attachment 663577 [details, diff]
nvctrl xlib fix
I think this was rejected.
Comment on attachment 663577 [details, diff]
nvctrl xlib fix
Actually I think that looks pretty good.
"Resorted include files in nvidia implementation". Because alphabetical sorting. https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/e8e0c5969a1dbd16fad6b9a86ceb461403a242eb Comment on attachment 663577 [details, diff]
nvctrl xlib fix
This patch partially reverts the commit in [URL] and fixes the problem.
Convince upstream to accept it. I can confirm building xfce4-sensors-plugin (stable 1.3.0-r1 or testing 1.3.92-r1) compiles fine with stable (non ~amd64) xfce dependencies. With ~amd64 xfce*, neither version compiles, even with the patch. *NOTE: In particular, I have the following packages with ~amd64 (dependency graph for xfce4-sensors-plugin): ****************************************************************************** equery depgraph xfce4-sensors-plugin * Searching for xfce4-sensors-plugin ... * dependency graph for xfce-extra/xfce4-sensors-plugin-1.3.0-r1 `-- xfce-extra/xfce4-sensors-plugin-1.3.0-r1 amd64 `-- x11-libs/gtk+-3.24.22 (>=x11-libs/gtk+-3.20) amd64 `-- xfce-base/libxfce4ui-4.15.8 (>=xfce-base/libxfce4ui-4.12) ~amd64 [gtk3(+)] `-- xfce-base/xfce4-panel-4.15.6 (>=xfce-base/xfce4-panel-4.12) ~amd64 `-- app-admin/hddtemp-0.3_beta15-r29 (app-admin/hddtemp) amd64 `-- net-analyzer/openbsd-netcat-1.195 (net-analyzer/openbsd-netcat) amd64 `-- net-analyzer/netcat-110-r9 (net-analyzer/netcat) amd64 `-- x11-libs/libnotify-0.7.9 (>=x11-libs/libnotify-0.7) amd64 `-- sys-apps/lm-sensors-3.6.0 (>=sys-apps/lm-sensors-3.1.0) amd64 `-- x11-drivers/nvidia-drivers-455.28-r1 (x11-drivers/nvidia-drivers) amd64 [tools static-libs] `-- dev-util/intltool-0.51.0-r2 (dev-util/intltool) amd64 `-- virtual/pkgconfig-2 (virtual/pkgconfig) amd64 [ xfce-extra/xfce4-sensors-plugin-1.3.0-r1 stats: packages (12), max depth (1) ] ******************************************************************************* (In reply to jorge from comment #11) > With ~amd64 xfce*, neither version compiles, even with the patch. Even with the patch? I just tried both versions again and still builds fine with ~amd64 deps if I use the patch. Is it really the same error? logs? Was the patch really applied? Created attachment 679257 [details]
compile without patch
Created attachment 679260 [details]
compile with patch
(In reply to Ionen Wolkens from comment #12) > (In reply to jorge from comment #11) > > With ~amd64 xfce*, neither version compiles, even with the patch. > Even with the patch? I just tried both versions again and still builds fine > with ~amd64 deps if I use the patch. > > Is it really the same error? logs? Was the patch really applied? The patch was copied to: /etc/portage/xfce-extra/xfce4-sensors-plugin/sensors.patch other than that I'm not sure if it was really applied =S I attached two logs, with and without patch. They are the same, except for two lines (273 and 275). If it was applied you'd see: * Applying sensors.patch ... [ ok ] * User patches applied. /etc/portage/xfce-extra/xfce4-sensors-plugin/sensors.patch should be /etc/portage/patches/xfce-extra/xfce4-sensors-plugin/sensors.patch ^^^^^^^ (In reply to Ionen Wolkens from comment #16) > If it was applied you'd see: > * Applying sensors.patch ... [ ok ] > * User patches applied. > > /etc/portage/xfce-extra/xfce4-sensors-plugin/sensors.patch > should be > /etc/portage/patches/xfce-extra/xfce4-sensors-plugin/sensors.patch > ^^^^^^^ Yes, that was the problem... my bad. The package now compiles fine. (In reply to Michał Górny from comment #10) > Convince upstream to accept it. https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/fa63a854bf2f4a651260e635e8fdc34e423b6018 *** Bug 790110 has been marked as a duplicate of this bug. *** Moin, I opened this here https://bugs.gentoo.org/790110 and it seems to be doublicate of this bug. Why is there a patch but not included in the recent version? I tried to compile emerge -a =xfce-extra/xfce4-sensors-plugin-1.3.95 It seems there is a patch, but how Do I include that into the compule action. And why is this, which is available sind 5 Months not in the recent ebuild-file used? Alexander (In reply to Alexander Bruns from comment #20) > Moin, > > I opened this here > > https://bugs.gentoo.org/790110 > > and it seems to be doublicate of this bug. > > Why is there a patch but not included in the recent version? > > I tried to compile > > emerge -a =xfce-extra/xfce4-sensors-plugin-1.3.95 > > It seems there is a patch, but how Do I include that into the compule > action. Hello, take the file "nvctrl xlib fix" and save it in /etc/portage/patches/xfce-extra/xfce4-sensors-plugin/ as something.patch. Then compile as usual. > And why is this, which is available sind 5 Months not in the recent > ebuild-file used? > > Alexander I am also affected by this bug. Any reason why the patch has not been included yet? Ok downloaded this file as diff: https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/e8e0c5969a1dbd16fad6b9a86ceb461403a242eb And put to: /etc/portage/patches/xfce-extra/xfce4-sensors-plugin/somthing.patch now I get this: holodeck ~ # emerge -a =xfce-extra/xfce4-sensors-plugin-1.3.95 \ ... Would you like to merge these packages? [Yes/No] y >>> Verifying ebuild manifests >>> Emerging (1 of 1) xfce-extra/xfce4-sensors-plugin-1.3.95::gentoo * xfce4-sensors-plugin-1.3.95.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking xfce4-sensors-plugin-1.3.95.tar.bz2 to /var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/work >>> Source unpacked in /var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/work >>> Preparing source in /var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/work/xfce4-sensors-plugin-1.3.95 ... * Applying something.patch ... patching file lib/nvidia.c Hunk #1 FAILED at 23. Hunk #2 succeeded at 40 with fuzz 2 (offset 1 line). 1 out of 2 hunks FAILED -- saving rejects to file lib/nvidia.c.rej [ !! ] * ERROR: xfce-extra/xfce4-sensors-plugin-1.3.95::gentoo failed (prepare phase): * patch -p1 failed with /etc/portage/patches/xfce-extra/xfce4-sensors-plugin/something.patch * * Call stack: * ebuild.sh, line 125: Called src_prepare * environment, line 1574: Called default * phase-functions.sh, line 855: Called default_src_prepare * phase-functions.sh, line 920: Called __eapi6_src_prepare * environment, line 254: Called eapply_user * environment, line 538: Called eapply '/etc/portage/patches/xfce-extra/xfce4-sensors-plugin/something.patch' * environment, line 508: Called _eapply_patch '/etc/portage/patches/xfce-extra/xfce4-sensors-plugin/something.patch' * environment, line 446: Called __helpers_die 'patch -p1 failed with /etc/portage/patches/xfce-extra/xfce4-sensors-plugin/something.patch' * isolated-functions.sh, line 112: Called die * The specific snippet of code: * die "$@" * * If you need support, post the output of `emerge --info '=xfce-extra/xfce4-sensors-plugin-1.3.95::gentoo'`, * the complete build log and the output of `emerge -pqv '=xfce-extra/xfce4-sensors-plugin-1.3.95::gentoo'`. * The complete build log is located at '/var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/temp/environment'. * Working directory: '/var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/work/xfce4-sensors-plugin-1.3.95' * S: '/var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/work/xfce4-sensors-plugin-1.3.95' >>> Failed to emerge xfce-extra/xfce4-sensors-plugin-1.3.95, Log file: >>> '/var/tmp/portage/xfce-extra/xfce4-sensors-plugin-1.3.95/temp/build.log' Sure the patch is still valid for the recent versions? Alex (In reply to Alexander Bruns from comment #23) > Ok downloaded this file as diff: > > https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/ > e8e0c5969a1dbd16fad6b9a86ceb461403a242eb > ;...] > Sure the patch is still valid for the recent versions? That's not the fix, it's the commit that introduced the issue. The fix is either the upstreamed: https://gitlab.xfce.org/panel-plugins/xfce4-sensors-plugin/-/commit/fa63a854bf2f4a651260e635e8fdc34e423b6018 Or my old patch from comment #2 that's the same minus the comment. Ok now it worked. Why is the ebuild not simply updated and the patch included like in other ebuilds? That would ease it for many users. Everybody has to do this manual step? Anyway thx for providong this patch. Alex (In reply to Alexander Bruns from comment #25) > Ok now it worked. Why is the ebuild not simply updated and the patch > included like in other ebuilds? There was some disagreement on how this should be fixed because nvidia's headers are silly. Albeit now that it's upstreamed I'd say backporting it would be fair rather than wait for next release. xfce-extra/xfce4-sensors-plugin-1.3.95 compiles fine with above mentioned patch(nvctrl xlib fix), when put in /etc/portage/patches/xfce-extra/xfce4-sensors-plugin. thank you For me, the patch is no longer needed as of xfce-extra/xfce4-sensors-plugin-1.4.1 (using x11-drivers/nvidia-drivers-460.91.03) (In reply to jorge from comment #28) > For me, the patch is no longer needed (NOT TRUE) as of > xfce-extra/xfce4-sensors-plugin-1.4.1 (using > x11-drivers/nvidia-drivers-460.91.03) I don't know why the package compiled when I removed the patch from the directory. But after a system reinstall, I did have to make the patch available. * Applying sensors.patch ... patching file lib/nvidia.c patch unexpectedly ends in middle of line Hunk #1 FAILED at 35. 1 out of 1 hunk FAILED -- saving rejects to file lib/nvidia.c.rej [ !! ] * ERROR: xfce-extra/xfce4-sensors-plugin-1.4.1::gentoo failed (prepare phase): * patch -p1 failed with /etc/portage/patches/xfce-extra/xfce4-sensors-plugin/sensors.patch same error here with 1.4.1 and 1.3.95 patch applied at : /etc/portage/patches/xfce-extra/xfce4-sensors-plugin suggestions ? sorry, 1.3.95 not available anylonger Just remove the patch from /etc/portage, it's fixed in the new version and so it's trying to fix what's already fixed and failing. Given 1.4.1 is the only version the tree now, guess I'll close this on behalf of xfce's team. Fixed by: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edeb548edafa9dd92ba8bdd88845712ca376bbb9 |