Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling Qt-base: error: libQt5Core.so.5: no version information available

Tags:

c++

qt

I was compiling from sources qt-base. I build one of the tests (tst_qdom) and I got an error when executing. This is the result of ldd:

ldd tests/auto/xml/dom/qdom/tst_qdom

**tests/auto/xml/dom/qdom/tst_qdom: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by tests/auto/xml/dom/qdom/tst_qdom)
tests/auto/xml/dom/qdom/tst_qdom: /usr/lib/x86_64-linux-gnu/libQt5Test.so.5: no version information available (required by tests/auto/xml/dom/qdom/tst_qdom)
tests/auto/xml/dom/qdom/tst_qdom: /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5: no version information available (required by tests/auto/xml/dom/qdom/tst_qdom)**
linux-vdso.so.1 =>  (0x00007ffe5775f000)
libQt5Xml.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Xml.so.5 (0x00007f855e131000)
libQt5Test.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Test.so.5 (0x00007f855df08000)
libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007f855d862000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f855d55e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f855d348000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f855cf83000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f855cd65000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f855cb4c000)
libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52 (0x00007f855c745000)
libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52 (0x00007f855c3cc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f855c1c8000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f855bec0000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f855bcb8000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f855b9b2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f855e36d000)
libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52 (0x00007f855a145000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f8559f07000)

Does someone know how to solve this problem? Googling was not useful for me.

EDITED:

This is the compile command of tst_qdom:

g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_XML_LIB -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/home/pe/qtbase/tests/auto/xml/dom/qdom"' -I. -I../../../../../include -I../../../../../include/QtXml -I../../../../../include/QtTest -I../../../../../include/QtCore -I.moc -I../../../../../mkspecs/linux-g++ -o .obj/tst_qdom.o tst_qdom.cpp

g++ -Wl,-O1 -fuse-ld=gold -Wl,--enable-new-dtags -Wl,-rpath,/usr/local/Qt-5.7.0/lib -o tst_qdom .obj/tst_qdom.o   -L/home/pe/qtbase/lib -lQt5Xml -lQt5Test -lQt5Core -lpthread 
like image 505
pedret Avatar asked Oct 17 '15 17:10

pedret


2 Answers

you can made this permanent editing ~/.bashrc and including the following line

export LD_LIBRARY_PATH='/home/pe/qtbase/lib':$LD_LIBRARY_PATH; 

or made the same thing in

/etc/bash.bashrc and this will be permanent for all users!

like image 163
Leonardo Hermoso Avatar answered Nov 16 '22 04:11

Leonardo Hermoso


Just make some change in bashrc according to below example

export LD_LIBRARY_PATH=/path/to/QT/gcc_64/lib/:$LD_LIBRARY_PATH
like image 21
pyAddict Avatar answered Nov 16 '22 02:11

pyAddict