Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 553850 - app-benchmarks/i7z with ncurses[tinfo]: Single_Socket.o: undefined reference to symbol 'stdscr'
Summary: app-benchmarks/i7z with ncurses[tinfo]: Single_Socket.o: undefined reference ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Justin Lecher
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tinfo
  Show dependency tree
 
Reported: 2015-07-03 12:31 UTC by Jeremi Piotrowski
Modified: 2015-07-28 07:54 UTC (History)
2 users (show)

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


Attachments
Patch the makefile to use pkg-config for ncurses discovery (i7z-ebuild.patch,335 bytes, patch)
2015-07-03 12:34 UTC, Jeremi Piotrowski
Details | Diff
Fixed patch without expanded tabs (i7z-ebuild.patch,321 bytes, patch)
2015-07-03 13:59 UTC, Jeremi Piotrowski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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
3.
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/libtinfo.so.5: 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

    -lncurses

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 <jlec@gentoo.org> +files/i7z-0.27.2-ncurses.patch,
+  i7z-0.27.2.ebuild:
+  Fix for ncurses[tinfo], bug #553850
+