Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 247420 - games-puzzle/braincurses: fails with forced --as-needed
Summary: games-puzzle/braincurses: fails with forced --as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2008-11-18 16:17 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-02-09 15:27 UTC (History)
0 users

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

Build log (games-puzzle:braincurses-0.5b:20081118-160529.log,10.03 KB, text/plain)
2008-11-18 16:17 UTC, Diego Elio Pettenò (RETIRED)
Patch to correct several issues in the upstream Makefile (braincurses-makefile.patch,686 bytes, patch)
2009-01-22 04:00 UTC, Kevin Pyle
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-18 16:17:31 UTC
I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out for details).

Check the attached build log.

Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-11-18 16:17:52 UTC
Created attachment 172242 [details]
Build log
Comment 2 Kevin Pyle 2009-01-22 04:00:51 UTC
Created attachment 179284 [details, diff]
Patch to correct several issues in the upstream Makefile

The upstream Makefile exhibits several QA violations:

- CC is forced to g++, which inhibits cross-compiling and violates convention that CC is a C compiler and CXX is a C++ compiler.
- CFLAGS are forced to -Wall, which overrides user CFLAGS.
- LDFLAGS are ignored, which is why --as-needed in make.conf does not work here.
- Libraries are linked in the wrong place on the make rule, which is what caused the failure Diego observed.
- The name of the final target is wrong: ncurses, instead of braincurses.

This patch fixes all of these issues, by removing the initialization of CC and CFLAGS, fixing the name in the target rule, using almost the default C++ link line from GNU make's built-in rules, and removing the rules for the component object files, since they would end up compiled as C files with the override of CC removed.
Comment 3 Tupone Alfredo gentoo-dev 2009-02-09 15:27:10 UTC
Fixed in portage. Thanks for report and patch