Closed thomasp85 closed 9 years ago
If you run R CMD ldd path/to/your/qtbase/src-build/qtbase.so, does the QtBluetooth library show up? Perhaps the linker strips this, since only libsmokeqt.a uses QtBluetooth symbols.
It is not present, no...
Den 04/02/2014 kl. 15.54 skrev lawremi notifications@github.com:
If you run R CMD ldd path/to/your/qtbase/src-build/qtbase.so, does the QtBluetooth library show up? Perhaps the linker strips this, since only libsmokeqt.a uses QtBluetooth symbols.
— Reply to this email directly or view it on GitHub.
I'm facing the very same issue (undefined symbol _ZTI23QBluetoothTransferReply
referenced from qtbase.so) on Ubuntu 14.04 LTS, 64-bit, R version 3.1.0 (2014-04-10), Platform: x86_64-pc-linux-gnu (64-bit), with Qt 5.2.1.
R CMD ldd qtbase.so
does not show QtBluetooth library, even though I supplied LD_LIBRARY_PATH to a directory containing the library when building qtbase.
qtbase.so linking command was:
Linking CXX shared library qtbase.so
-fPIC -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -shared
-Wl,-soname,qtbase.so -o qtbase.so CMakeFiles/qtbase.dir/init.cpp.o
CMakeFiles/qtbase.dir/EventLoop.cpp.o
CMakeFiles/qtbase.dir/convert.cpp.o CMakeFiles/qtbase.dir/wrap.cpp.o
CMakeFiles/qtbase.dir/metaobject.cpp.o
CMakeFiles/qtbase.dir/connect.cpp.o CMakeFiles/qtbase.dir/invoke.cpp.o
CMakeFiles/qtbase.dir/dynamicqobject.cpp.o
CMakeFiles/qtbase.dir/RDynamicQObject.cpp.o
CMakeFiles/qtbase.dir/ClassFactory.cpp.o
CMakeFiles/qtbase.dir/Class.cpp.o
CMakeFiles/qtbase.dir/SmokeClass.cpp.o
CMakeFiles/qtbase.dir/MocClass.cpp.o CMakeFiles/qtbase.dir/RClass.cpp.o
CMakeFiles/qtbase.dir/classes.cpp.o
CMakeFiles/qtbase.dir/ForeignMethod.cpp.o
CMakeFiles/qtbase.dir/SmokeMethod.cpp.o
CMakeFiles/qtbase.dir/RMethod.cpp.o
CMakeFiles/qtbase.dir/MocMethod.cpp.o
CMakeFiles/qtbase.dir/DynamicBinding.cpp.o
CMakeFiles/qtbase.dir/MocDynamicBinding.cpp.o
CMakeFiles/qtbase.dir/MethodCall.cpp.o
CMakeFiles/qtbase.dir/type-handlers.cpp.o
CMakeFiles/qtbase.dir/MocStack.cpp.o
CMakeFiles/qtbase.dir/MocProperty.cpp.o
CMakeFiles/qtbase.dir/RProperty.cpp.o
CMakeFiles/qtbase.dir/SmokeModule.cpp.o
CMakeFiles/qtbase.dir/module.cpp.o
CMakeFiles/qtbase.dir/RSmokeBinding.cpp.o
CMakeFiles/qtbase.dir/SmokeList.cpp.o
CMakeFiles/qtbase.dir/SmokeObject.cpp.o
CMakeFiles/qtbase.dir/ObjectTable.cpp.o
CMakeFiles/qtbase.dir/InstanceObjectTable.cpp.o
CMakeFiles/qtbase.dir/smoke.cpp.o
CMakeFiles/qtbase.dir/DataFrameModel.cpp.o
CMakeFiles/qtbase.dir/RTextFormattingDelegate.cpp.o
CMakeFiles/qtbase.dir/qtbase_automoc.cpp.o
-L/home/sieger/src/qtbase-qt5/qtbase/src/../kdebindings-build/smoke/qt
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5MultimediaWidgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sql.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Test.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKitWidgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5DBus.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Svg.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5XmlPatterns.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5PrintSupport.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Help.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sensors.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Bluetooth.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Positioning.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Nfc.so.5.2.1
-lsmokeqt
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5OpenGL.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKit.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Gui.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Core.so.5.2.1
-Wl,-rpath,/home/sieger/src/qtbase-qt5/qtbase/src/../kdebindings-build/smoke/qt:/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib:
Note that the _ZTI23QBluetoothTransferReply
symbol appears in libQt5Bluetooth.so, and that libQt5Bluetooth.so comes before -lsmokeqt.
This issue is similar to the one we'd been discussing with Michael some time ago on the cranvas google group (see https://groups.google.com/forum/?hl=en#!topic/cranvas/qX2rkNMlKXk).
If I try to (iteratively) tweak src/CMakeLists.txt
in a way similar to your last solution:
set(LIB_LOC "")
if(Qt5Multimedia_FOUND)
get_target_property(QtMultimedia_location Qt5::Multimedia LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtMultimedia_location})
endif(Qt5Multimedia_FOUND)
if(Qt5MultimediaWidgets_FOUND)
get_target_property(QtMultimediaWidgets_location Qt5::MultimediaWidgets LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtMultimediaWidgets_location})
endif(Qt5MultimediaWidgets_FOUND)
if(Qt5Network_FOUND)
get_target_property(QtNetwork_location Qt5::Network LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtNetwork_location})
endif(Qt5Network_FOUND)
if(Qt5Qml_FOUND)
get_target_property(QtQml_location Qt5::Qml LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtQml_location})
endif(Qt5Qml_FOUND)
if(Qt5Quick_FOUND)
get_target_property(QtQuick_location Qt5::Quick LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtQuick_location})
endif(Qt5Quick_FOUND)
if(Qt5Sql_FOUND)
get_target_property(QtSql_location Qt5::Sql LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtSql_location})
endif(Qt5Sql_FOUND)
if(Qt5Test_FOUND)
get_target_property(QtTest_location Qt5::Test LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtTest_location})
endif(Qt5Test_FOUND)
if(Qt5Webkit_FOUND)
get_target_property(QtWebkit_location Qt5::Webkit LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtWebkit_location})
endif(Qt5Webkit_FOUND)
if(Qt5WebKitWidgets_FOUND)
get_target_property(QtWebKitWidgets_location Qt5::WebKitWidgets LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtWebKitWidgets_location})
endif(Qt5WebKitWidgets_FOUND)
if(Qt5DBus_FOUND)
get_target_property(QtDBus_location Qt5::DBus LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtDBus_location})
endif(Qt5DBus_FOUND)
if(Qt5Svg_FOUND)
get_target_property(QtSvg_location Qt5::Svg LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtSvg_location})
endif(Qt5Svg_FOUND)
if(Qt5XmlPatterns_FOUND)
get_target_property(QtXmlPatterns_location Qt5::XmlPatterns LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtXmlPatterns_location})
endif(Qt5XmlPatterns_FOUND)
if(Qt5PrintSupport_FOUND)
get_target_property(QtPrintSupport_location Qt5::PrintSupport LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtPrintSupport_location})
endif(Qt5PrintSupport_FOUND)
if(Qt5Help_FOUND)
get_target_property(QtHelp_location Qt5::Help LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtHelp_location})
endif(Qt5Help_FOUND)
if(Qt5UiTools_FOUND)
get_target_property(QtUiTools_location Qt5::UiTools LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtUiTools_location})
endif(Qt5UiTools_FOUND)
if(Qt5SerialPort_FOUND)
get_target_property(QtSerialPort_location Qt5::SerialPort LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtSerialPort_location})
endif(Qt5SerialPort_FOUND)
if(Qt5Sensors_FOUND)
get_target_property(QtSensors_location Qt5::Sensors LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtSensors_location})
endif(Qt5Sensors_FOUND)
if(Qt5Bluetooth_FOUND)
get_target_property(QtBluetooth_location Qt5::Bluetooth LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtBluetooth_location})
endif(Qt5Bluetooth_FOUND)
if(Qt5Positioning_FOUND)
get_target_property(QtPositioning_location Qt5::Positioning LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtPositioning_location})
endif(Qt5Positioning_FOUND)
if(Qt5Nfc_FOUND)
get_target_property(QtNfc_location Qt5::Nfc LOCATION)
set(LIB_LOC ${LIB_LOC} ${QtNfc_location})
endif(Qt5Nfc_FOUND)
target_link_libraries(qtbase smokeqt ${R_LIBRARIES} ${LIB_LOC})
I'm getting further and further facing new and new undefined symbols, and finally I get stuck at:
** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'qtbase', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/home/sieger/R-qt5/x86_64-pc-linux-gnu-library/3.1/qtbase/libs/qtbase.so':
/home/sieger/R-qt5/x86_64-pc-linux-gnu-library/3.1/qtbase/libs/qtbase.so: undefined symbol: _ZNK17QWebHitTestResult8mediaUrlEv
Note that the _ZNK17QWebHitTestResult8mediaUrlEv
symbol is defined in libQt5WebKitWidgets.so.
In this case, qtbase.so linking command was:
-fPIC -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -shared
-Wl,-soname,qtbase.so -o qtbase.so CMakeFiles/qtbase.dir/init.cpp.o
CMakeFiles/qtbase.dir/EventLoop.cpp.o
CMakeFiles/qtbase.dir/convert.cpp.o CMakeFiles/qtbase.dir/wrap.cpp.o
CMakeFiles/qtbase.dir/metaobject.cpp.o
CMakeFiles/qtbase.dir/connect.cpp.o CMakeFiles/qtbase.dir/invoke.cpp.o
CMakeFiles/qtbase.dir/dynamicqobject.cpp.o
CMakeFiles/qtbase.dir/RDynamicQObject.cpp.o
CMakeFiles/qtbase.dir/ClassFactory.cpp.o
CMakeFiles/qtbase.dir/Class.cpp.o
CMakeFiles/qtbase.dir/SmokeClass.cpp.o
CMakeFiles/qtbase.dir/MocClass.cpp.o CMakeFiles/qtbase.dir/RClass.cpp.o
CMakeFiles/qtbase.dir/classes.cpp.o
CMakeFiles/qtbase.dir/ForeignMethod.cpp.o
CMakeFiles/qtbase.dir/SmokeMethod.cpp.o
CMakeFiles/qtbase.dir/RMethod.cpp.o
CMakeFiles/qtbase.dir/MocMethod.cpp.o
CMakeFiles/qtbase.dir/DynamicBinding.cpp.o
CMakeFiles/qtbase.dir/MocDynamicBinding.cpp.o
CMakeFiles/qtbase.dir/MethodCall.cpp.o
CMakeFiles/qtbase.dir/type-handlers.cpp.o
CMakeFiles/qtbase.dir/MocStack.cpp.o
CMakeFiles/qtbase.dir/MocProperty.cpp.o
CMakeFiles/qtbase.dir/RProperty.cpp.o
CMakeFiles/qtbase.dir/SmokeModule.cpp.o
CMakeFiles/qtbase.dir/module.cpp.o
CMakeFiles/qtbase.dir/RSmokeBinding.cpp.o
CMakeFiles/qtbase.dir/SmokeList.cpp.o
CMakeFiles/qtbase.dir/SmokeObject.cpp.o
CMakeFiles/qtbase.dir/ObjectTable.cpp.o
CMakeFiles/qtbase.dir/InstanceObjectTable.cpp.o
CMakeFiles/qtbase.dir/smoke.cpp.o
CMakeFiles/qtbase.dir/DataFrameModel.cpp.o
CMakeFiles/qtbase.dir/RTextFormattingDelegate.cpp.o
CMakeFiles/qtbase.dir/qtbase_automoc.cpp.o
-L/home/sieger/src/qtbase-qt5-ts-hack-libs2/qtbase/src/../kdebindings-build/smoke/qt
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5MultimediaWidgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sql.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Test.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKit.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKitWidgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5DBus.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Svg.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5XmlPatterns.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5PrintSupport.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Help.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sensors.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Bluetooth.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Positioning.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Nfc.so.5.2.1
-lsmokeqt
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5MultimediaWidgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sql.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Test.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKitWidgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5DBus.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Svg.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5XmlPatterns.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5PrintSupport.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Help.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sensors.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Bluetooth.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Positioning.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Nfc.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKit.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5OpenGL.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Gui.so.5.2.1
/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Core.so.5.2.1
-Wl,-rpath,/home/sieger/src/qtbase-qt5-ts-hack-libs2/qtbase/src/../kdebindings-build/smoke/qt:/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib:
In this latter case (tweaking CMakeLists.txt), R CMD ldd qtbase.so found libQt5WebKitWidgets.so in /usr/lib/x86_64-linux-gnu. If I remove that library (and some more) from there, I can load qtbase.so successfully. Why did R try to find the lib in another location than the one supplied via LD_LIBRARY_PATH (which contained the lib as well)?
Hi Tomas,
Please submit a PR for the fixes you needed to get this far. Unfortunately, I have no idea why R is disobeying the LD_LIBRARY_PATH.
On Tue, Jul 8, 2014 at 7:30 AM, Tomas Sieger notifications@github.com wrote:
I'm facing the very same issue (undefined symbol _ZTI23QBluetoothTransferReply referenced from qtbase.so) on Ubuntu 14.04 LTS, 64-bit, R version 3.1.0 (2014-04-10), Platform: x86_64-pc-linux-gnu (64-bit), with Qt 5.2.1.
R CMD ldd qtbase.so does not show QtBluetooth library, even though I supplied LD_LIBRARY_PATH to a directory containing the library when building qtbase.
qtbase.so linking command was:
Linking CXX shared library qtbase.so -fPIC -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -shared -Wl,-soname,qtbase.so -o qtbase.so CMakeFiles/qtbase.dir/init.cpp.o CMakeFiles/qtbase.dir/EventLoop.cpp.o CMakeFiles/qtbase.dir/convert.cpp.o CMakeFiles/qtbase.dir/wrap.cpp.o CMakeFiles/qtbase.dir/metaobject.cpp.o CMakeFiles/qtbase.dir/connect.cpp.o CMakeFiles/qtbase.dir/invoke.cpp.o CMakeFiles/qtbase.dir/dynamicqobject.cpp.o CMakeFiles/qtbase.dir/RDynamicQObject.cpp.o CMakeFiles/qtbase.dir/ClassFactory.cpp.o CMakeFiles/qtbase.dir/Class.cpp.o CMakeFiles/qtbase.dir/SmokeClass.cpp.o CMakeFiles/qtbase.dir/MocClass.cpp.o CMakeFiles/qtbase.dir/RClass.cpp.o CMakeFiles/qtbase.dir/classes.cpp.o CMakeFiles/qtbase.dir/ForeignMethod.cpp.o CMakeFiles/qtbase.dir/SmokeMethod.cpp.o CMakeFiles/qtbase.dir/RMethod.cpp.o CMakeFiles/qtbase.dir/MocMethod.cpp.o CMakeFiles/qtbase.dir/DynamicBinding.cpp.o CMakeFiles/qtbase.dir/MocDynamicBinding.cpp.o CMakeFiles/qtbase.dir/MethodCall.cpp.o CMakeFiles/qtbase.dir/type-handlers.cpp.o CMakeFiles/qtbase.dir/MocStack.cpp.o CMakeFiles/qtbase.dir/MocProperty.cpp.o CMakeFiles/qtbase.dir/RProperty.cpp.o CMakeFiles/qtbase.dir/SmokeModule.cpp.o CMakeFiles/qtbase.dir/module.cpp.o CMakeFiles/qtbase.dir/RSmokeBinding.cpp.o CMakeFiles/qtbase.dir/SmokeList.cpp.o CMakeFiles/qtbase.dir/SmokeObject.cpp.o CMakeFiles/qtbase.dir/ObjectTable.cpp.o CMakeFiles/qtbase.dir/InstanceObjectTable.cpp.o CMakeFiles/qtbase.dir/smoke.cpp.o CMakeFiles/qtbase.dir/DataFrameModel.cpp.o CMakeFiles/qtbase.dir/RTextFormattingDelegate.cpp.o CMakeFiles/qtbase.dir/qtbase_automoc.cpp.o -L/home/sieger/src/qtbase-qt5/qtbase/src/../kdebindings-build/smoke/qt /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5MultimediaWidgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sql.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Test.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKitWidgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5DBus.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Svg.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5XmlPatterns.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5PrintSupport.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Help.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sensors.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Bluetooth.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Positioning.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Nfc.so.5.2.1 -lsmokeqt /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5OpenGL.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKit.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Gui.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Core.so.5.2.1 -Wl,-rpath,/home/sieger/src/qtbase-qt5/qtbase/src/../kdebindings-build/smoke/qt:/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib:
Note that the _ZTI23QBluetoothTransferReply symbol appears in libQt5Bluetooth.so, and that libQt5Bluetooth.so comes before -lsmokeqt.
This issue is similar to the one we'd been discussing with Michael some time ago on the cranvas google group (see https://groups.google.com/forum/?hl=en#!topic/cranvas/qX2rkNMlKXk). If I try to (iteratively) tweak src/CMakeLists.txt in a way similar to your last solution:
set(LIB_LOC "") if(Qt5Multimedia_FOUND) get_target_property(QtMultimedia_location Qt5::Multimedia LOCATION) set(LIB_LOC ${LIB_LOC} ${QtMultimedia_location}) endif(Qt5Multimedia_FOUND) if(Qt5MultimediaWidgets_FOUND) get_target_property(QtMultimediaWidgets_location Qt5::MultimediaWidgets LOCATION) set(LIB_LOC ${LIB_LOC} ${QtMultimediaWidgets_location}) endif(Qt5MultimediaWidgets_FOUND) if(Qt5Network_FOUND) get_target_property(QtNetwork_location Qt5::Network LOCATION) set(LIB_LOC ${LIB_LOC} ${QtNetwork_location}) endif(Qt5Network_FOUND) if(Qt5Qml_FOUND) get_target_property(QtQml_location Qt5::Qml LOCATION) set(LIB_LOC ${LIB_LOC} ${QtQml_location}) endif(Qt5Qml_FOUND) if(Qt5Quick_FOUND) get_target_property(QtQuick_location Qt5::Quick LOCATION) set(LIB_LOC ${LIB_LOC} ${QtQuick_location}) endif(Qt5Quick_FOUND) if(Qt5Sql_FOUND) get_target_property(QtSql_location Qt5::Sql LOCATION) set(LIB_LOC ${LIB_LOC} ${QtSql_location}) endif(Qt5Sql_FOUND) if(Qt5Test_FOUND) get_target_property(QtTest_location Qt5::Test LOCATION) set(LIB_LOC ${LIB_LOC} ${QtTest_location}) endif(Qt5Test_FOUND) if(Qt5Webkit_FOUND) get_target_property(QtWebkit_location Qt5::Webkit LOCATION) set(LIB_LOC ${LIB_LOC} ${QtWebkit_location}) endif(Qt5Webkit_FOUND) if(Qt5WebKitWidgets_FOUND) get_target_property(QtWebKitWidgets_location Qt5::WebKitWidgets LOCATION) set(LIB_LOC ${LIB_LOC} ${QtWebKitWidgets_location}) endif(Qt5WebKitWidgets_FOUND) if(Qt5DBus_FOUND) get_target_property(QtDBus_location Qt5::DBus LOCATION) set(LIB_LOC ${LIB_LOC} ${QtDBus_location}) endif(Qt5DBus_FOUND) if(Qt5Svg_FOUND) get_target_property(QtSvg_location Qt5::Svg LOCATION) set(LIB_LOC ${LIB_LOC} ${QtSvg_location}) endif(Qt5Svg_FOUND) if(Qt5XmlPatterns_FOUND) get_target_property(QtXmlPatterns_location Qt5::XmlPatterns LOCATION) set(LIB_LOC ${LIB_LOC} ${QtXmlPatterns_location}) endif(Qt5XmlPatterns_FOUND) if(Qt5PrintSupport_FOUND) get_target_property(QtPrintSupport_location Qt5::PrintSupport LOCATION) set(LIB_LOC ${LIB_LOC} ${QtPrintSupport_location}) endif(Qt5PrintSupport_FOUND) if(Qt5Help_FOUND) get_target_property(QtHelp_location Qt5::Help LOCATION) set(LIB_LOC ${LIB_LOC} ${QtHelp_location}) endif(Qt5Help_FOUND) if(Qt5UiTools_FOUND) get_target_property(QtUiTools_location Qt5::UiTools LOCATION) set(LIB_LOC ${LIB_LOC} ${QtUiTools_location}) endif(Qt5UiTools_FOUND) if(Qt5SerialPort_FOUND) get_target_property(QtSerialPort_location Qt5::SerialPort LOCATION) set(LIB_LOC ${LIB_LOC} ${QtSerialPort_location}) endif(Qt5SerialPort_FOUND) if(Qt5Sensors_FOUND) get_target_property(QtSensors_location Qt5::Sensors LOCATION) set(LIB_LOC ${LIB_LOC} ${QtSensors_location}) endif(Qt5Sensors_FOUND) if(Qt5Bluetooth_FOUND) get_target_property(QtBluetooth_location Qt5::Bluetooth LOCATION) set(LIB_LOC ${LIB_LOC} ${QtBluetooth_location}) endif(Qt5Bluetooth_FOUND) if(Qt5Positioning_FOUND) get_target_property(QtPositioning_location Qt5::Positioning LOCATION) set(LIB_LOC ${LIB_LOC} ${QtPositioning_location}) endif(Qt5Positioning_FOUND) if(Qt5Nfc_FOUND) get_target_property(QtNfc_location Qt5::Nfc LOCATION) set(LIB_LOC ${LIB_LOC} ${QtNfc_location}) endif(Qt5Nfc_FOUND) target_link_libraries(qtbase smokeqt ${R_LIBRARIES} ${LIB_LOC})
I'm getting further and further facing new and new undefined symbols, and finally I get stuck at:
\ testing if installed package can be loaded Error : .onLoad failed in loadNamespace() for 'qtbase', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/home/sieger/R-qt5/x86_64-pc-linux-gnu-library/3.1/qtbase/libs/qtbase.so': /home/sieger/R-qt5/x86_64-pc-linux-gnu-library/3.1/qtbase/libs/qtbase.so: undefined symbol: _ZNK17QWebHitTestResult8mediaUrlEv
Note that the _ZNK17QWebHitTestResult8mediaUrlEv symbol is defined in libQt5WebKitWidgets.so.
In this case, qtbase.so linking command was:
-fPIC -Wl,-Bsymbolic-functions -Wl,-z,relro -shared -shared -Wl,-soname,qtbase.so -o qtbase.so CMakeFiles/qtbase.dir/init.cpp.o CMakeFiles/qtbase.dir/EventLoop.cpp.o CMakeFiles/qtbase.dir/convert.cpp.o CMakeFiles/qtbase.dir/wrap.cpp.o CMakeFiles/qtbase.dir/metaobject.cpp.o CMakeFiles/qtbase.dir/connect.cpp.o CMakeFiles/qtbase.dir/invoke.cpp.o CMakeFiles/qtbase.dir/dynamicqobject.cpp.o CMakeFiles/qtbase.dir/RDynamicQObject.cpp.o CMakeFiles/qtbase.dir/ClassFactory.cpp.o CMakeFiles/qtbase.dir/Class.cpp.o CMakeFiles/qtbase.dir/SmokeClass.cpp.o CMakeFiles/qtbase.dir/MocClass.cpp.o CMakeFiles/qtbase.dir/RClass.cpp.o CMakeFiles/qtbase.dir/classes.cpp.o CMakeFiles/qtbase.dir/ForeignMethod.cpp.o CMakeFiles/qtbase.dir/SmokeMethod.cpp.o CMakeFiles/qtbase.dir/RMethod.cpp.o CMakeFiles/qtbase.dir/MocMethod.cpp.o CMakeFiles/qtbase.dir/DynamicBinding.cpp.o CMakeFiles/qtbase.dir/MocDynamicBinding.cpp.o CMakeFiles/qtbase.dir/MethodCall.cpp.o CMakeFiles/qtbase.dir/type-handlers.cpp.o CMakeFiles/qtbase.dir/MocStack.cpp.o CMakeFiles/qtbase.dir/MocProperty.cpp.o CMakeFiles/qtbase.dir/RProperty.cpp.o CMakeFiles/qtbase.dir/SmokeModule.cpp.o CMakeFiles/qtbase.dir/module.cpp.o CMakeFiles/qtbase.dir/RSmokeBinding.cpp.o CMakeFiles/qtbase.dir/SmokeList.cpp.o CMakeFiles/qtbase.dir/SmokeObject.cpp.o CMakeFiles/qtbase.dir/ObjectTable.cpp.o CMakeFiles/qtbase.dir/InstanceObjectTable.cpp.o CMakeFiles/qtbase.dir/smoke.cpp.o CMakeFiles/qtbase.dir/DataFrameModel.cpp.o CMakeFiles/qtbase.dir/RTextFormattingDelegate.cpp.o CMakeFiles/qtbase.dir/qtbase_automoc.cpp.o -L/home/sieger/src/qtbase-qt5-ts-hack-libs2/qtbase/src/../kdebindings-build/smoke/qt /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5MultimediaWidgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sql.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Test.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKit.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKitWidgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5DBus.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Svg.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5XmlPatterns.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5PrintSupport.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Help.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sensors.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Bluetooth.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Positioning.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Nfc.so.5.2.1 -lsmokeqt /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5MultimediaWidgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sql.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Test.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKitWidgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5DBus.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Svg.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5XmlPatterns.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5PrintSupport.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Help.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5UiTools.a /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5SerialPort.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Sensors.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Bluetooth.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Positioning.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Nfc.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Multimedia.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Quick.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Qml.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5WebKit.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5OpenGL.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Network.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Widgets.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Gui.so.5.2.1 /home/sieger/Qt5.2.1/5.2.1/gcc_64/lib/libQt5Core.so.5.2.1 -Wl,-rpath,/home/sieger/src/qtbase-qt5-ts-hack-libs2/qtbase/src/../kdebindings-build/smoke/qt:/home/sieger/Qt5.2.1/5.2.1/gcc_64/lib:
In this latter case (tweaking CMakeLists.txt), R CMD ldd qtbase.so found libQt5WebKitWidgets.so in /usr/lib/x86_64-linux-gnu. If I remove that library (and some more) from there, I can load qtbase.so successfully. Why did R try to find the lib in another location than the one supplied via LD_LIBRARY_PATH (which contained the lib as well)?
— Reply to this email directly or view it on GitHub https://github.com/ggobi/qtbase/issues/16#issuecomment-48343759.
PR #26 submitted.
Additional PR #27 submitted. See also #24.
With the recent rework of the linking, I think this issue is resolved. Please open a new one if things do not work.
In continuation of #15 a new error appear during 'Testing if package can be loaded'