Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 744634 - sys-apps/opal-utils-6.6.2: opal-prd.c:2715:32: error: ‘rc’ may be used uninitialized in this function
Summary: sys-apps/opal-utils-6.6.2: opal-prd.c:2715:32: error: ‘rc’ may be used uninit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: werror
  Show dependency tree
 
Reported: 2020-09-25 13:23 UTC by Luke-Jr
Modified: 2020-09-28 09:57 UTC (History)
4 users (show)

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


Attachments
build log (build.log,4.94 KB, text/x-log)
2020-09-25 13:24 UTC, Luke-Jr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke-Jr 2020-09-25 13:23:08 UTC
For some reason this is trying to build with -Werror which is generally a bad idea for non-developers... and failing probably due to GCC getting smarter.
Comment 1 Luke-Jr 2020-09-25 13:24:08 UTC
Created attachment 662368 [details]
build log
Comment 2 Jonas Stein gentoo-dev 2020-09-27 19:41:51 UTC
No, compiler warnings should be always on. This should also be the default for users. A warning of the compiler means that the binary can be broken.

Please paste the emerge info.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-09-27 19:49:13 UTC
(In reply to Jonas Stein from comment #2)
> No, compiler warnings should be always on. This should also be the default
> for users. A warning of the compiler means that the binary can be broken.
> 
> Please paste the emerge info.

-Werror is an issue: https://devmanual.gentoo.org/ebuild-writing/common-mistakes/#-werror-compiler-flag-not-removed.

Having warnings is good, but not having them error out.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-09-27 21:42:52 UTC
prob hardcoded somewhere in the makefiles.
I think I sed a couple out, I'll look again.
Comment 5 Luke-Jr 2020-09-27 23:44:52 UTC
This works:

diff -ur skiboot-6.6.2.orig/external/opal-prd/Makefile skiboot-6.6.2/external/opal-prd/Makefile
--- skiboot-6.6.2.orig/external/opal-prd/Makefile       2020-09-25 18:45:47.192087467 -0400
+++ skiboot-6.6.2/external/opal-prd/Makefile    2020-09-26 15:16:17.721698069 -0400
@@ -1,5 +1,5 @@
 # SPDX-License-Identifier: Apache-2.0
-CFLAGS += -m64 -Werror -Wall -g2 -ggdb
+CFLAGS += -m64 -Wall -g2 -ggdb
 LDFLAGS += -m64
 ASFLAGS = -m64
 CPPFLAGS += -I. -I../../include -I../../

Note the ebuild patches this line already.
Comment 6 Larry the Git Cow gentoo-dev 2020-09-28 01:54:34 UTC
The bug has been closed via the following commit(s):

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

commit 4b97045030783a1d91f050b2f4df2f66cdbdccf4
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2020-09-28 01:44:15 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-09-28 01:54:09 +0000

    sys-apps/opal-utils: replace sed with patch
    
    Also filter out -Werror in opal-prd Makefile
    
    Closes: https://bugs.gentoo.org/744634
    Package-Manager: Portage-3.0.8, Repoman-3.0.1
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-apps/opal-utils/files/flags.patch       | 35 +++++++++++++++++++++++++++++
 sys-apps/opal-utils/opal-utils-6.5.2.ebuild |  7 ++----
 sys-apps/opal-utils/opal-utils-6.6.2.ebuild |  8 ++-----
 sys-apps/opal-utils/opal-utils-6.6.3.ebuild |  8 ++-----
 4 files changed, 41 insertions(+), 17 deletions(-)