kmyunittest.shell doesn't use local libs
David Faure
faure at kde.org
Tue Dec 4 23:59:37 CET 2007
On Tuesday 04 December 2007, Thiago Macieira wrote:
> David Faure wrote:
> >objdump -p kdirmodeltest | grep PATH
> > RPATH
> > /d/kde/inst/kde4/lib:/d/kde/src/4/qt-copy/lib:/d/kde/inst/kde4/lib
> >
> >And now I can't remember: since RPATH has more priority over
> > LD_LIBRARY_PATH, how could those .shell wrapper scripts ever work at
> > all?
>
> RPATH does *not* have priority over LD_LIBRARY_PATH. RPATH overrides it.
Well that's what I meant :)
> You need RUNPATH for that to work. And your grep shows you don't have it.
> Blame your distribution for not enabling a 9-year-old flag in your linker.
You mean inside ld itself?
> I've been complaining to mine for almost a year now and appears
> they've finally decided to turn it on.
> See: http://qa.mandriva.com/show_bug.cgi?id=28465
Interesting. Doesn't say that they turned it on though, does it?
> We should turn the new dtags on by default. Just add the linker flag (to
> gcc) -Wl,--enable-new-dtags and be done with it.
OK, now I tried (patch below).
It works!
objdump -p kurltest | grep PATH
RPATH /d/kde/inst/kde4/lib:/d/kde/src/4/qt-copy/lib
RUNPATH /d/kde/inst/kde4/lib:/d/kde/src/4/qt-copy/lib
(and I see in your mandriva report that when RUNPATH is set, RPATH is ignored).
But make test runs kurltest, not kurltest.shell, so this only solves half the problem it turns out...
Are you saying I should commit this (after RC2)?
It's inside a "if linux and gcc" block already. I guess the only question is if anyone could have an
old system where this wouldn't be supported, but if "9 years" is correct then I guess such linux
systems would have other trouble with compiling kde4 anyway, right? (like gcc itself too old).
--- FindKDE4Internal.cmake (revision 744754)
+++ FindKDE4Internal.cmake (working copy)
@@ -785,6 +785,11 @@ if (CMAKE_SYSTEM_NAME MATCHES Linux)
set ( _KDE4_PLATFORM_DEFINITIONS -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_GNU_SOURCE)
set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_SHARED_LINKER_FLAGS}")
set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_MODULE_LINKER_FLAGS}")
+
+ set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_SHARED_LINKER_FLAGS}")
+ set ( CMAKE_MODULE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_MODULE_LINKER_FLAGS}")
+ set ( CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-new-dtags ${CMAKE_EXE_LINKER_FLAGS}")
+
# we profile...
if(CMAKE_BUILD_TYPE_TOLOWER MATCHES profile)
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the Kde-buildsystem
mailing list