[Kde-bindings] kdeutils PyKDE dep [No module named dl]

Sebastian Sauer mail at dipe.org
Sun Jul 20 03:41:16 UTC 2008


Percy Camilo Triveño Aucahuasi wrote:

> Hello there ; )

hi too :)

>>if ARCH64:
>>    import DLFCN as dl
>>else:
>>   import dl

kdebindings/python/krosspython/CMakeLists.txt contains for that reason since a 
while the;

# -ldl seems to be needed (on Linux at least).
# see http://lists.kde.org/?l=koffice-devel&m=116333261328694&w=2
# and 
http://websvn.kde.org/branches/work/kwin_composite/CMakeLists.txt?rev=603677&r1=603384&r2=603677
target_link_libraries(krosspython ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} 
${KDE4_KPTY_LIBS} ${KDE4_KROSSCORE_LIBS} ${PYTHON_LIBRARIES} 
${CMAKE_DL_LIBS})

so, to link against ${CMAKE_DL_LIBS} solved it for us. probably PyQt/PyKDE 
should do too to let cmake handle this?!

> # This is needed to ensure that dynamic_cast and RTTI works inside kdelibs.
> sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL)

ah, that reminds me on a prob during KDE3 times I had. With python it was and 
still is needed to always dynload using RTLD_GLOBAL / DL_GLOBAL 
(KLibLoader::globalLibrary / QLibrary::ExportExternalSymbolsHint - see also 
http://markmail.org/message/5ob6lzjbohjfxjru).
But I was believing the python-binary (or python.exe, heh) does already so and 
only those apps who embed the link and do additional libloading need to take 
care of it.



More information about the Kde-bindings mailing list