Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90819 - emerge system fails on ncurses-5.4-r6 when CXXFLAGS contains -fno-implicit-templates
Summary: emerge system fails on ncurses-5.4-r6 when CXXFLAGS contains -fno-implicit-te...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 90827 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-28 21:54 UTC by Martin 'The Bishop' Scheffler
Modified: 2005-05-03 20:04 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 'The Bishop' Scheffler 2005-04-28 21:54:09 UTC
The link process of the "demo" program seems to rely on symbol definitions which are left out when -fno-implicit-templates is set in CXXFLAGS.


Reproducible: Always
Steps to Reproduce:
1. put "-fno-implicit-templates" into CXXFLAGS at /etc/make.conf
2. USE="-nocxx" emerge ncurses

Actual Results:  
...

i686-pc-linux-gnu-g++  -o demo ../obj_s/demo.o -L../lib -lncurses++ -L../lib -
lform -lmenu -lpanel -lncurses -ldl  -Wl,-rpath,/var/tmp/portage/ncurses-5.4.
20050319/work/narrowc/lib  -I../c++ -I../include -I/var/tmp/portage/ncurses-5.4.
20050319/work/ncurses-5.4/c++ -DHAVE_CONFIG_H -I/var/tmp/portage/ncurses-5.4.
20050319/work/ncurses-5.4/c++/../include -I. -I../include  -D_GNU_SOURCE -
DNDEBUG -march=pentium3 -mtune=pentium3 -mmmx -msse -mfpmath=sse,387 -g0 -O2 -
pipe -fomit-frame-pointer -fno-stack-protector -fprefetch-loop-arrays -ffast-
math -fno-rtti -fno-implicit-templates -fPIC
../obj_s/demo.o(.gnu.linkonce.t._ZN6MyMenuC1Ev+0x427): In function `MyMenu::
MyMenu()':
: undefined reference to `vtable for NCursesUserItem<UserData>'
../obj_s/demo.o(.gnu.linkonce.t._ZN6MyMenuC1Ev+0x451): In function `MyMenu::
MyMenu()':
: undefined reference to `vtable for MyAction<UserData>'
collect2: ld returned 1 exit status
make[1]: *** [demo] Error 1
make[1]: Leaving directory `/var/tmp/portage/ncurses-5.4.20050319/work/narrowc/
c++'
make: *** [all] Error 2


Expected Results:  
compile without error


it seems the implicit templates carry some information, which is needed to 
succeed.
Comment 1 Martin 'The Bishop' Scheffler 2005-04-29 00:52:21 UTC
*** Bug 90827 has been marked as a duplicate of this bug. ***
Comment 2 Martin 'The Bishop' Scheffler 2005-04-29 01:22:32 UTC
argh! early morning...
to reproduce:
1. put "-fno-implicit-templates" into CXXFLAGS at /etc/make.conf
2. emerge ncurses

to avoid:
1. remove "-fno-implicit-templates" into CXXFLAGS at /etc/make.conf
2. emerge ncurses

to solve:
(bad) filter the compiler flag out
(better) add arguments to the linker
Comment 3 SpanKY gentoo-dev 2005-05-02 21:48:53 UTC
fixed in portage but you really should just drop the flag from your CXXFLAGS since there's no real point to it
Comment 4 Martin 'The Bishop' Scheffler 2005-05-03 20:04:25 UTC
thanks for the fix!

btw, this flag is beneficial when /var/tmp/portage is short on space and you want to compile _big_ packages like xorg-x11, openoffice, firefox etc.