Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 553850

Summary: app-benchmarks/i7z with ncurses[tinfo]: Single_Socket.o: undefined reference to symbol 'stdscr'
Product: Gentoo Linux Reporter: Jeremi Piotrowski <jeremi.piotrowski>
Component: Current packagesAssignee: Justin Lecher <jlec>
Severity: normal CC: jeremi.piotrowski, jlec
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 457530    
Attachments: Patch the makefile to use pkg-config for ncurses discovery
Fixed patch without expanded tabs

Description Jeremi Piotrowski 2015-07-03 12:31:42 UTC
i7z fails to link when ncurses is compiled with tinfo because it only links against `libtinfo`.

Reproducible: Always

Steps to Reproduce:
1. USE=tinfo emerge ncurses
2. emerge i7z
Actual Results:  
i7z fails to link

Expected Results:  
i7z links correctly

Link command and error message:

x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -fno-schedule-insns2  -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -Wl,-O1 -Wl,--as-needed -o i7z i7z.o helper_functions.o i7z_Single_Socket.o i7z_Dual_Socket.o -lncurses -lpthread -lrt -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/../../../../x86_64-pc-linux-gnu/bin/ld: i7z_Single_Socket.o: undefined reference to symbol 'stdscr'
/lib64/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:41: recipe for target 'bin' failed
make: *** [bin] Error 1
Comment 1 Jeremi Piotrowski 2015-07-03 12:34:43 UTC
Created attachment 406130 [details, diff]
Patch the makefile to use pkg-config for ncurses discovery

This patch changes the the Makefile to not use


but instead

    $(shell pkg-config ncurses --libs)

Fixes the bug.
Comment 2 Jeremi Piotrowski 2015-07-03 12:36:16 UTC
In comment 1 what I meant was: this patch changes the ebuild to patch the Makefile.
Comment 3 Jeremi Piotrowski 2015-07-03 13:59:09 UTC
Created attachment 406132 [details, diff]
Fixed patch without expanded tabs

Previous patch had expanded tabs and didn't apply, this one is fixed.
Comment 4 Justin Lecher gentoo-dev 2015-07-28 07:54:19 UTC
+  28 Jul 2015; Justin Lecher <> +files/i7z-0.27.2-ncurses.patch,
+  i7z-0.27.2.ebuild:
+  Fix for ncurses[tinfo], bug #553850