Compiling Qt 5.9 - 5.11 on centos 6
-
Hello all,
I have a requirement to use any of Qt 5.9 - 5.11 on Centos 6 and SUSE 11. I have tried to run the precompiled versions on these OSes but, seems that the glibc on these OSes are too old.
I ended up compiling my own gcc on these machines and then trying to compile Qt, but there are build errors. The dependencies seem to be too new in Qt.Has anyone had any luck in doing so? If so, can anyone post the steps here?
Any help is greatly appreciated.
-
Hi
So the old way for Qt do not work for newer version ?
https://wiki.qt.io/How_to_Install_Qt_5_and_Qwt_on_CentOS_6Also, its very hard to help without the actual build errors.
Anyway, do you need to RUN a Qt app on centOS or do you need
to actual develop on the Cent ? -
I am trying to build Qt again with scl developer toolset with gcc 6.x, shall report all the errors that I encounter.
I want to develop on the newer distributions and deploy on the oldest possible.
Steps:
sudo yum install centos-release-scl automake autoconf gettext sudo yum install devtoolset-6 scl enable devtoolset-6 bash sudo yum install gtkglext-devel gtkglext-libs mesa-libGLw su - -c "yum --enablerepo=updates install libxcb libxcb-devel xcb-util xcb-util-devel xcb-util-*-devel libX11-devel libXrender-devel libXi-devel" sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel su - -c "yum install flex bison gperf libicu-devel libxslt-devel ruby" sudo yum install libgcrypt-devel libgcrypt pciutils-devel nss-devel libXtst-devel gperf cups-devel pulseaudio-libs-devel libgudev1-devel systemd-devel libcap-devel alsa-lib-devel flex bison ruby gcc-c++ dbus libXrandr-devel libXcomposite-devel libXcursor-devel dbus-devel fontconfig-devel git clone git://gitorious.org/qt/qt5.git qt5 cd qt5 git checkout 5.11 perl init-repository --module-subset=default,-qtwebkit,-qtwebkit-examples,-qtwebengine ./configure -developer-build -opensource -nomake examples -nomake tests -confirm-license make -j 2
Error (compiling qt 5.11, gcc 6)
qevdevgamepadbackend.cpp: In member function ‘void QEvdevGamepadDevice::resetConfiguration()’: qevdevgamepadbackend.cpp:270:18: error: ‘BTN_TRIGGER_HAPPY1’ was not declared in this scope m_buttonsMap[BTN_TRIGGER_HAPPY1] = QGamepadManager::ButtonLeft; ^~~~~~~~~~~~~~~~~~ qevdevgamepadbackend.cpp:271:18: error: ‘BTN_TRIGGER_HAPPY2’ was not declared in this scope m_buttonsMap[BTN_TRIGGER_HAPPY2] = QGamepadManager::ButtonRight; ^~~~~~~~~~~~~~~~~~ qevdevgamepadbackend.cpp:272:18: error: ‘BTN_TRIGGER_HAPPY3’ was not declared in this scope m_buttonsMap[BTN_TRIGGER_HAPPY3] = QGamepadManager::ButtonUp; ^~~~~~~~~~~~~~~~~~ qevdevgamepadbackend.cpp:273:18: error: ‘BTN_TRIGGER_HAPPY4’ was not declared in this scope m_buttonsMap[BTN_TRIGGER_HAPPY4] = QGamepadManager::ButtonDown; ^~~~~~~~~~~~~~~~~~
Build env:
gcc version 6.3.1 20170216 (Red Hat 6.3.1-3) (GCC) git version 2.17.0 cmake version 3.11.0-rc3 perl, v5.10.1 Python 2.6.6
-
Hi and welcome to devnet,
Looks like what is talked in this mailing list thread.
-
Hi and welcome to devnet,
Looks like what is talked in this mailing list thread.
@SGaist
so, I tried further and had some glitches with gamepad module. I removed it from build.
Not I am having the following problem:make[3]: Entering directory '/DATA/qt5.11_build/qtremoteobjects/src/remoteobjects' rm -f libQt5RemoteObjects.so.5.11.0 libQt5RemoteObjects.so libQt5RemoteObjects.so.5 libQt5RemoteObjects.so.5.11 g++ -Wl,--no-undefined -Wl,--version-script,QtRemoteObjects.version -fuse-ld=gold -Wl,--enable-new-dtags -Wl,--gdb-index -Wl,-z,origin -Wl,-rpath,\$ORIGIN -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5RemoteObjects.so.5 -o libQt5RemoteObjects.so.5.11.0 .obj/qconnectionfactories.o .obj/qconnection_local_backend.o .obj/qconnection_tcpip_backend.o .obj/qremoteobjectabstractitemmodeladapter.o .obj/qremoteobjectabstractitemmodelreplica.o .obj/qremoteobjectdynamicreplica.o .obj/qremoteobjectnode.o .obj/qremoteobjectpacket.o .obj/qremoteobjectpendingcall.o .obj/qremoteobjectregistry.o .obj/qremoteobjectregistrysource.o .obj/qremoteobjectreplica.o .obj/qremoteobjectsettingsstore.o .obj/qremoteobjectsource.o .obj/qremoteobjectsourceio.o .obj/qtremoteobjectglobal.o .obj/moc_qremoteobjectabstractitemmodelreplica.o .obj/moc_qremoteobjectregistry.o .obj/moc_qremoteobjectreplica.o .obj/moc_qtremoteobjectglobal.o .obj/moc_qconnectionfactories_p.o .obj/moc_qconnection_local_backend_p.o .obj/moc_qconnection_tcpip_backend_p.o .obj/moc_qremoteobjectabstractitemmodeladapter_p.o .obj/moc_qremoteobjectabstractitemmodelreplica_p.o .obj/moc_qremoteobjectpendingcall_p.o .obj/moc_qremoteobjectregistrysource_p.o .obj/moc_qremoteobjectsettingsstore.o .obj/moc_qremoteobjectsourceio_p.o -L/DATA/qt5.11_build/qtbase/lib -lQt5Network -lQt5Core -lpthread /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld.gold: error: QtRemoteObjects.version:1:1: syntax error, unexpected $end, expecting STRING or QUOTED_STRING or '{' /opt/rh/devtoolset-6/root/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/ld.gold: fatal error: unable to parse version script file QtRemoteObjects.version collect2: error: ld returned 1 exit status
Any help is appreciated.
-
Hi
You could also skip that too
Qt RemoteObjects is new module and if you dont need it,
you wont be missing any features in rest of Qt. -
@zaazu said in Compiling Qt 5.9 - 5.11 on centos 6:
I want to develop on the newer distributions and deploy on the oldest possible.
Oh, just as a note.
Im running Qt app on extremely old knoppix. (2003)
by simply using the
export LD_LIBRARY_PATH
http://doc.qt.io/qt-5/linux-deployment.html
"trick" and gave it some newer system SO files needed
that was way to old in the distro.
That was Qt5.5 though. Not sure if Qt5.10 is as easy to get running
by simply throwing missing stuff at it.
Note that my use case is single user, and as far as i know
LD_LIBRARY_PATH export is sub optimal on real user systems in regards to
update and maintenance.The app was build in a pretty new linux mint and it was just to test Qt with my old runtime and there might have issues i didnt see :)
-
Thanks all,
Have been able to compile qt with qml after I removed the following modules (pasting my configure options here..)./configure -opensource -nomake examples -nomake tests -confirm-license -skip qtgamepad -skip qtcanvas3d -skip qtdatavis3d -skip qtlocation -skip qtmultimedia -skip qtpurchasing -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwinextras -skip remoteobjects -skip qtscxml -skip qtwebsockets -prefix /usr/local/qt
Shall try to run apps and find out if the compiled binaries run at all. Tried to open designer, that opens well though.
@mrjj, my approach would be to add LD_LIBRARY_PATH, QT_LIB_PATH etc in the startup script of the application.
A second approach is to set the rpaths, but as far as I have read online, setting only rpaths dont work.