Unsolved libqsqlmysql.so: version node not found!
-
Hi,
During building a static version of Qt using the following arguments:
./configure -prefix /home/mbnoimi/.Qt/5.7/gcc_64_static -opensource -static -largefile -accessibility -qt-sql-sqlite -qt-sql-psql -qt-sql-mysql -plugin-sql-sqlite -plugin-sql-psql -plugin-sql-mysql -no-qml-debug -qt-zlib -qt-libpng -qt-libjpeg -qt-doubleconversion -qt-freetype -openssl-linked -qt-pcre -qt-xcb -qt-xkbcommon-x11 -silent -confirm-license -v
I get this error message:
g++ -c -pipe -I/usr/include/mysql -O2 -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -I../../../../include/QtSql/5.7.0 -I../../../../include/QtSql/5.7.0/QtSql -I../../../../include/QtCore/5.7.0 -I../../../../include/QtCore/5.7.0/QtCore -I../../../../include -I../../../../include/QtSql -I../../../../include/QtCore -I.moc -I../../../../mkspecs/linux-g++ -o .obj/moc_qsql_mysql_p.o .moc/moc_qsql_mysql_p.cpp rm -f libqsqlmysql.so g++ -Wl,--no-undefined -Wl,-O1 -Wl,--enable-new-dtags -Wl,-z,origin -Wl,-rpath,\$ORIGIN/../../lib -Wl,-rpath,\$ORIGIN/../../lib -shared -o libqsqlmysql.so .obj/main.o .obj/qsql_mysql.o .obj/moc_qsql_mysql_p.o -L/usr/lib64/mysql -lmysqlclient_r -lz -lcrypt -lnsl -lssl -lcrypto -L/home/mbnoimi/.Qt/5.7/Src/qtbase/lib -lQt5Sql -lQt5Core -licui18n -licuuc -licudata -lqtpcre -lm -ldl -lgthread-2.0 -pthread -lglib-2.0 -lrt -lpthread /usr/bin/ld: libqsqlmysql.so: version node not found for symbol qt_version_tag@Qt_5.6 /usr/bin/ld: failed to set dynamic section sizes: Bad value collect2: error: ld returned 1 exit status Makefile:165: recipe for target '../../../../plugins/sqldrivers/libqsqlmysql.so' failed make[5]: *** [../../../../plugins/sqldrivers/libqsqlmysql.so] Error 1 make[5]: Leaving directory '/home/mbnoimi/.Qt/5.7/Src/qtbase/src/plugins/sqldrivers/mysql' Makefile:72: recipe for target 'sub-mysql-make_first' failed make[4]: *** [sub-mysql-make_first] Error 2 make[4]: Leaving directory '/home/mbnoimi/.Qt/5.7/Src/qtbase/src/plugins/sqldrivers' Makefile:49: recipe for target 'sub-sqldrivers-make_first' failed make[3]: *** [sub-sqldrivers-make_first] Error 2 make[3]: Leaving directory '/home/mbnoimi/.Qt/5.7/Src/qtbase/src/plugins' Makefile:667: recipe for target 'sub-plugins-make_first' failed make[2]: *** [sub-plugins-make_first] Error 2 make[2]: Leaving directory '/home/mbnoimi/.Qt/5.7/Src/qtbase/src' Makefile:45: recipe for target 'sub-src-make_first' failed make[1]: *** [sub-src-make_first] Error 2 make[1]: Leaving directory '/home/mbnoimi/.Qt/5.7/Src/qtbase' Makefile:78: recipe for target 'module-qtbase-make_first' failed make: *** [module-qtbase-make_first] Error 2 mbnoimi@mbnoimi-laptop ~/.Qt/5.7/Src $
The result of ./configure is:
Build options: Configuration .......... accessibility accessibility-atspi-bridge audio-backend avx avx2 avx512bw avx512cd avx512dq avx512er avx512f avx512ifma avx512pf avx512vbmi avx512vl c++11 c++14 c++1z clock-gettime clock-monotonic compile_examples concurrent cups dbus dbus-linked doubleconversion egl eglfs egl_x11 enable_new_dtags evdev eventfd fontconfig full-config getaddrinfo getifaddrs gif glib iconv icu inotify ipv6ifname jpeg kms large-config largefile libproxy libudev linuxfb medium-config minimal-config mremap nis no-qml-debug opengl openssl-linked pcre png poll_ppoll posix_fallocate precompile_header pulseaudio qpa qpa reduce_exports reduce_relocations release rpath silent small-config sse2 sse3 sse4_1 sse4_2 ssse3 static system-freetype system-harfbuzz threadsafe-cloexec use_gold_linker xcb xcb-glx xcb-plugin xcb-qt xcb-sm xcb-xlib xinput2 xkbcommon-evdev xkbcommon-qt xlib xrender zlib Build parts ............ libs tools examples Mode ................... release Using sanitizer(s)...... none Using C++ standard ..... c++1z Using gold linker....... yes Using new DTAGS ........ yes Using PCH .............. yes Using LTCG ............. no Target compiler supports: SSE .................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX .................. AVX AVX2 AVX512 ............... AVX512F AVX512ER AVX512CD AVX512PF AVX512DQ AVX512BW AVX512VL AVX512IFMA AVX512VBMI Qt modules and options: Qt D-Bus ............... yes (linked to dbus-1) Qt Concurrent .......... yes Qt GUI ................. yes Qt Widgets ............. yes Large File ............. yes QML debugging .......... no Use system proxies ..... no Support enabled for: Accessibility .......... yes ALSA ................... no CUPS ................... yes DoubleConversion........ yes (bundled copy) Evdev .................. yes FontConfig ............. yes FreeType ............... yes (system library) Glib ................... yes GStreamer .............. no GTK platformtheme ...... no HarfBuzz ............... yes (system library) Iconv .................. yes ICU .................... yes Image formats: GIF .................. yes (in QtGui, using bundled copy) JPEG ................. yes (in QtGui, using bundled copy) PNG .................. yes (in QtGui, using bundled copy) libinput................ no Logging backends: journald ............... no syslog ............... no mtdev .................. no Networking: getaddrinfo .......... yes getifaddrs ........... yes IPv6 ifname .......... yes libproxy.............. yes OpenSSL .............. yes (linked to the libraries) NIS .................... yes OpenGL / OpenVG: EGL .................. yes OpenGL ............... desktop OpenVG ............... no PCRE ................... yes (bundled copy) pkg-config ............. yes PulseAudio ............. yes QPA backends: DirectFB ............. no EGLFS ................ yes EGLFS i.MX6 ........ no EGLFS i.MX6 Wayland. no EGLFS EGLDevice .... no EGLFS GBM .......... no EGLFS Mali ......... no EGLFS Raspberry Pi . no EGLFS X11 .......... yes LinuxFB .............. yes Mir client............ no XCB .................. yes (bundled copy) EGL on X ........... yes GLX ................ yes MIT-SHM ............ yes Xcb-Xlib ........... yes Xcursor ............ yes (loaded at runtime) Xfixes ............. yes (loaded at runtime) Xi2 ................ yes Xrandr ............. yes (loaded at runtime) Xrender ............ yes XKB ................ yes XShape ............. yes XSync .............. yes Session management ..... yes SQL drivers: DB2 .................. no InterBase ............ no MySQL ................ yes (plugin) OCI .................. no ODBC ................. yes (plugin) PostgreSQL ........... yes (plugin) SQLite 2 ............. yes (plugin) SQLite ............... yes (plugin, using bundled copy) TDS .................. yes (plugin) tslib .................. no udev ................... yes xkbcommon-x11........... yes (bundled copy, XKB config root: /usr/share/X11/xkb) xkbcommon-evdev......... yes zlib ................... yes (bundled copy) WARNING: Using static linking will disable the use of dynamically loaded plugins. Make sure to import all needed static plugins, or compile needed modules into the library. WARNING: Bundled FreeType can't be used. FontConfig use requires system FreeType. NOTE: When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. For example: OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked
How can I fix this issue?
BTW, I'm using recent MySQL from Oracle PPA (5.7.16)
-
-
Thanks @raven-worx,
@raven-worx said in libqsqlmysql.so: version node not found!:
Regarding the error you may want to read this.
How this post related to my problem. I read it and I didn't find it related at all!
Causes that come to may mind:
- make sure you are really building 64bit
I'm pretty sure because I'm using Linux Mint 18 x64 xfce. Is there any way I build 32bit?!
- where does
libqsqlmysql.so
come from? Seems you are reusing an old one? Was it compiled with a different version of gcc?!
I already use Qt shared build which comes with Qt online installer. I got the source code from Qt online installer so
libqsqlmysql.so
came from shared build. -
@mbnoimi said in libqsqlmysql.so: version node not found!:
How this post related to my problem.
as i said, make sure the gcc version is the same.
The GCC version should match the one used for compilinglibqsqlmysql.so
Edit:
Also read this.Plugins can be linked statically into your application. If you build the static version of Qt, this is the only option for including Qt's predefined plugins.
-
@raven-worx said in libqsqlmysql.so: version node not found!:
as i said, make sure the gcc version is the same.
The GCC version should match the one used for compilinglibqsqlmysql.so
Here is gcc version:
mbnoimi@mbnoimi-laptop ~/.Qt/5.7/Src $ gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. mbnoimi@mbnoimi-laptop ~/.Qt/5.7/Src $
-
@mbnoimi
so you are using v5, Qt is built with v4.
Also it makes sense that you can't simply use a dynamically linked plugin in your static built Qt. The plugin would still require to load the dynamic Qt libs. -
Edit:
Also read this.Plugins can be linked statically into your application. If you build the static version of Qt, this is the only option for including Qt's predefined plugins.
Actually I like shared version of Qt because it's much flexible but I face ton of problems when I tried to create *.deb package for a simple Qt console SQL app as mentioned in my previous thread.
I usually distribute my Qt apps as source code but recently I decided to create a binary distro so I found Qt deployment very complicated.
-
so you are using v5, Qt is built with v4.
How can fix this? I use v5 because I needed for building C++ projects using recent C++ version.
Also it makes sense that you can't simply use a dynamically linked plugin in your static built Qt. The plugin would still require to load the dynamic Qt libs.
I think Qt will rebuild the needed libraries by itself because I build it from source code... does it?
-
@mbnoimi said in libqsqlmysql.so: version node not found!:
I think Qt will rebuild the needed libraries by itself because I build it from source code... does it?
but you said you are linking against a dynamically linked plugin before...
-
@raven-worx said in libqsqlmysql.so: version node not found!:
but you said you are linking against a dynamically linked plugin before...
No, I just said I'm using the source code comes with Qt installer. See the folders structure:
The folder
gcc_64_static
is empty and I expext to fill it with static build by using-prefix /home/mbnoimi/.Qt/5.7/gcc_64_static
argument