Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 796509 - games-strategy/widelands-1.0: build error (‘depth’ may be used uninitialized in this function)
Summary: games-strategy/widelands-1.0: build error (‘depth’ may be used uninitialized ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-17 20:33 UTC by matthias.grobarek
Modified: 2021-06-17 21:38 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge-info.txt,18.50 KB, text/plain)
2021-06-17 20:33 UTC, matthias.grobarek
Details
build log (build.log.gz,83.16 KB, application/gzip)
2021-06-17 20:34 UTC, matthias.grobarek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matthias.grobarek 2021-06-17 20:33:18 UTC
Created attachment 716643 [details]
emerge --info

Building Widelands 1.0 fails on my system with the following error:

FAILED: src/ui_basic/CMakeFiles/ui_basic.dir/box.cc.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ALL_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_UNIT_TEST_FRAMEWORK_DYN_LINK -DUSE_XDG -DWL_USE_GLVND -I/var/tmp/portage/games-strategy/widelands-1.0/work/widelands-1.0/src -Isrc -isystem /usr/include/SDL2  -march=znver1 -O3 -mfpmath=sse -pipe  -fext-numeric-literals -std=c++11  -DNDEBUG -DNOPARACHUTE -Wredundant-decls -Wall -Wpedantic -Wdeprecated-declarations -Wextra -Wformat -Wformat-nonliteral -Wformat-security -Wformat-y2k -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-include-dirs -Wno-undef -Wold-style-cast -Woverlength-strings -Wpacked -Wpointer-arith -Wsign-promo -Wsync-nand -Wtrampolines -Wundef -Wunused -Wunused-macros -Werror=format-security -Werror=return-type -Werror=shadow -Werror=uninitialized -MD -MT src/ui_basic/CMakeFiles/ui_basic.dir/box.cc.o -MF src/ui_basic/CMakeFiles/ui_basic.dir/box.cc.o.d -o src/ui_basic/CMakeFiles/ui_basic.dir/box.cc.o -c /var/tmp/portage/games-strategy/widelands-1.0/work/widelands-1.0/src/ui_basic/box.cc
/var/tmp/portage/games-strategy/widelands-1.0/work/widelands-1.0/src/ui_basic/box.cc: In member function ‘virtual void UI::Box::layout()’:
/var/tmp/portage/games-strategy/widelands-1.0/work/widelands-1.0/src/ui_basic/box.cc:182:14: error: ‘depth’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  182 |   totaldepth += depth;
      |   ~~~~~~~~~~~^~~~~~~~
Comment 1 matthias.grobarek 2021-06-17 20:34:16 UTC
Created attachment 716646 [details]
build log
Comment 2 Ionen Wolkens gentoo-dev 2021-06-17 20:57:32 UTC
Seems caused by -O3, try -O2 for now.
Comment 3 Larry the Git Cow gentoo-dev 2021-06-17 21:38:56 UTC
The bug has been closed via the following commit(s):

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

commit 06eb3d0bbfc3c4ea5a2c0235e1e3e36b1eb9872e
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2021-06-17 21:27:29 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2021-06-17 21:36:01 +0000

    games-strategy/widelands: drop use of cxxflags patch
    
    -Werror=uninitialized cause issues with -O3. Upstream is currently
    explicitly requesting -O2 but an old patch in Gentoo prevents that.
    
    While not ideal, rather than further patch to remove the warning check,
    simply follow upstream and go with what is being tested more.
    
    Closes: https://bugs.gentoo.org/796509
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 games-strategy/widelands/widelands-1.0.ebuild  | 4 ----
 games-strategy/widelands/widelands-9999.ebuild | 4 ----
 2 files changed, 8 deletions(-)