Bug 149178 - tests fails with -Wl,--as-needed in LDFLAGS
Summary: tests fails with -Wl,--as-needed in LDFLAGS
Status: RESOLVED FIXED
Alias: None
Product: kmines
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Suzdalev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-24 20:24 UTC by Rickard Närström
Modified: 2008-05-12 13:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rickard Närström 2007-08-24 20:24:45 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Gentoo Packages
Compiler:          gcc (GCC) 4.2.0 (Gentoo 4.2.0 p1.4) 
OS:                Linux

If I have -Wl,--as-needed in LDFLAGS 'make check' fails with undefined references

----
/bin/sh ../../libtool --silent --tag=CXX --mode=link x86_64-pc-linux-gnu-g++ 
-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align
-Wchar-subscripts -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -Os
-fomit-frame-pointer -march=native -pipe -Wformat-security
-Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new
-fno-common -fvisibility=hidden -fvisibility-inlines-hidden
-DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
-DQT_NO_TRANSLATION   -Wl,-O1 -Wl,--as-needed -o testSolve  testSolve.o
../../libkdegames/libkdegames.la ./libsolver.la
./.libs/libsolver.a(solver.o): In function `SolvingRateDialog::slotOk()':
solver.cpp:(.text+0x1b9): undefined reference to
`KDialogBase::enableButtonOK(bool)'
solver.cpp:(.text+0x1db): undefined reference to `KProgress::setValue(int)'
./.libs/libsolver.a(solver.o): In function `SolvingRateDialog::qt_property(int,
int, QVariant*)':
solver.cpp:(.text+0x30f): undefined reference to `KDialogBase::qt_property(int,
int, QVariant*)'
./.libs/libsolver.a(solver.o): In function `SolvingRateDialog::qt_emit(int,
QUObject*)':
solver.cpp:(.text+0x31f): undefined reference to `KDialogBase::qt_emit(int,
QUObject*)'
[ ... A lot more undefined references ... ]
./.libs/libsolver.a(solver.o):(.data.rel.ro._ZTI17SolvingRateDialog[typeinfo
for SolvingRateDialog]+0x10): undefined reference to `typeinfo for KDialogBase'
collect2: ld returned 1 exit status
make[3]: *** [testSolve] Error 1
make[3]: Leaving directory
`/var/tmp/paludis/kde-base/kmines-3.5.7/work/kmines-3.5.7/kmines/solver'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory
`/var/tmp/paludis/kde-base/kmines-3.5.7/work/kmines-3.5.7/kmines/solver'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/paludis/kde-base/kmines-3.5.7/work/kmines-3.5.7/kmines'
make: *** [check-recursive] Error 1
----

This bug was originally posted at https://bugs.gentoo.org/show_bug.cgi?id=190053
Comment 1 Albert Astals Cid 2008-05-12 13:13:04 UTC
SVN commit 806767 by aacid:

Make having -Wl,--as-needed in LDFLAGS not make fail in 'make check'

BUGS: 149178


 M  +5 -1      Makefile.am  


WebSVN link: http://websvn.kde.org/?view=rev&revision=806767