QT 4.8.5 compile error in CentOS 5.X - qt

I have download the Qt-everywhere-4.8.5.tar.gz from Qt official website. And In the CentOS 5.X, it's GCC version is 4.1.2. So I have compiled the gcc-4.7.2 from source code and installed it in $HOME/software/, then in the install directory, there are bin and lib and lib64, and I have add the path into LD_LIBRARY_PATH.
Then, I uncompressed the qt source code, configure it with
./configure -prefix $HOME/softwares/ -nomake demos -nomake examples
Then, make it. there is an error:
/home/user/Downloads/qt-everywhere-opensource-src-4.8.5/bin/lrelease:assistant_cs.ts -qm assistant_cs.qm
/home/user/Downloads/qt-everywhere-opensource-src-4.8.5/bin/lrelease: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /home/user/Downloads/qt-everywhere-opensource-src-4.8.5/bin/lrelease)
/home/user/Downloads/qt-everywhere-opensource-src-4.8.5/bin/lrelease: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /home/user/Downloads/qt-everywhere-opensource-src-4.8.5/bin/lrelease)
gmake[1]: *** [assistant_cs.qm] Error 1
And, I have found the libstdc++.so.6 in $HOME/softwares/lib64, and I have add the path into LD_LIBRARY_PATH, why the make command just use the system's library, not use the provided one? I have no root privileges, so I can't link the system's library with my home gcc's library. Could you give me some advice, please? Thanks.

Related

QT "Could not find the Qt platform plugin "xcb" "

I installed QT-everywhere 5.15 open-source for academic reasons, but I have failed to run a program.
Firstly, I compiled the necessary source files with make and installed the QT Creator, then I selected qmake for running programs inside it. When I tried to run an example program, I encounter this error:
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "/usr/lib/x86-64-linux-gnu"
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
The program has unexpectedly finished.
The process was ended forcefully.
Then I looked into /usr/lib/x86-64-linux-gnu for finding the xcb plugin and set LD_LIBRARY_PATH=/usr/lib/x86-64-linux-gnu, but again the same error appeared.
What should I do to solve this problem?
1. Install requirements:
sudo apt install make g++ pkg-config libgl1-mesa-dev libxcb*-dev libfontconfig1-dev libxkbcommon-x11-dev python libgtk-3-dev
python is optional for QtQuick.
libgtk-3-dev optional if you want the GTK native theme for QtWidgets.
2. Configure:
./configure -opensource -confirm-license -nomake tests -nomake examples -prefix /path/to/install/dir
3. Compile:
make -j $(nproc)
make install

Build Qt with the specific openssl version

I need to built Qt with the openssl lib version 1.0.2k. But in the OS I use (Debian 7 x64) there is the 1.0.1 version is installed by default. I've already built the needed version from source code, so I have it. But Qt still is being built with the 1.0.1 version.
I've already tried to substitute openssl in the "/usr/bin/" directory and set the directory with the new libs ("usr/local/ssl/lib/", cuz "usr/local/ssl" is the directory with openssl-1.0.2k) to LD_LIBRARY_PATH, but it isn't work, Qt is still being built with openssl-1.0.1.
Maybe somedoby know how to define the new version of openssl for the building of Qt?
When I'm building Qt, I use the following configuration and version 5.6.3 of Qt:
./configure -prefix $PWD/qtbase -release -opensource -confirm-license -static -accessibility -openssl-linked
The best way would be to modify the debian source package and rebuild the Debian package instead of building from source.
But this requires some knowledge about how Debian packages are built.
Otherwise chances are high that Qt somehow relieas on pkgconfig to find the right openssl library. So try changing libcrypto.pc and libssl.pc. Or Override your PKG_CONFIG_PATH

how does configure look for working mpi and fftw3 libararies?

I am trying to compile Blochlibs-1.2 libraries on Ubuntu 15.04 (32 bit). Ihave successfully compiled fftw3 and mpi libraries which all ended up in /usr/local/lib and usr/local/include. mpicc is in the path and LD_LIBRARY_PATH is set correctly. when I run configure like this:
./configure --with-mpi=/usr/local --with-fftw=/usr/local
then i get this error:
checking for functioning MPI library ... configure: error: couldn't
find mpi library for --with-mpi
How does the configure file search for the libraries?
Thanks,
Z

Undefined reference to QIconvCodec during Qt embedded make?

I'm trying to configure my Qt for Embedded Linux with a virtual framebuffer according to these instructions. From the Qt for Embedded source folder, I'm trying:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
I get the following error which prevents me from doing make install:
.obj/release-shared-emb-x86/qtextcodec.o: In function `setup()':
qtextcodec.cpp:(.text+0x23cc): undefined reference to `QIconvCodec::QIconvCodec()'
collect2: ld returned 1 exit status
make[1]: *** [../../lib/libQtCore.so.4.8.4] Error 1
make[1]: Leaving directory `/home/cstjean/qt/src/corelib'
make: *** [sub-corelib-all-ordered] Error 2
If I do:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make -no-iconv
sudo make install -no-iconv
...This works. But when I go into QtCreator, Tools > Options > Build & Run > Qt Versions, I try to select qmake for Qt Embedded (for me it's in /home/cstjean/qt/bin/qmake) and it tells me:
Qt version is not properly installed, please run make install
I've tried googling this like crazy. There are a lot of suggestions to download various libraries, which I've tried to no avail, but perhaps I'm missing something because this is a pretty fresh installation of Ubuntu I'm using.
Thanks.
I solved this problem by installing Gnome and starting over from scratch for my Qt Embedded for Linux installation.
I googled gnome for ubuntu 12.04 and found these instructions. You'll have to see which version of Ubuntu you have and search for that of course. You can see which version you have by typing into a command line:
lsb_release -a
Once I had gnome installed, I restarted my computer and signed in using Gnome.
Then I completely uninstalled and removed all traces of Qt Embedded:
cd yourQtEmbeddedDir
sudo make uninstall
cd ..
rm -r yourQtEmbeddedDir sourceFileTarYouHadDownloaded.tar.gz
I redownloaded the source file tar for Qt Embedded for Linux (from here) and proceeded to install according to these instructions after extracting the source files from the tar:
./configure -embedded -opensource -confirm-license -verbose -qvfb
make
sudo make install
Now, if you tell QtCreator about qmake from this installation, then QtCreator will no longer complain about a bad installation! Ta da!
Note: If you're attempting to the do the Virtual Framebuffer business too, then this is not the end of the road. You need to have Qt for X11 installed as well in order to compile qvfb.
Long story short: You need Gnome if you're trying to install Qt Embedded for Linux with a Virtual Framebuffer on Ubuntu!

How can i Built Qt-Creator against Qt5, in Ubuntu 12.04?

I had an existing Qt4 installation on my ubuntu built using the "Software center". After that, I installed Qt5 from git using the default settings. Now, realizing that the Qt Creator version I had, was configured for Qt 4.8.1, I uninstalled it (using software center) and now i am looking for some guidance to re-build it and link against Qt5. From their blog, I have noticed that the latest version should be a part of Qt5 installation but I am unable to start it from the HUD in ubuntu, nor do i know of any command-line options to fire it up from the terminal. Thank you for your time.
Hate to just throw up a link, but this guy explains it well.. for multiple operating systems.
http://qt-project.org/wiki/Building_Qt_5_from_Git
You may refer to the Qt wiki.
An example procedure of build:
./configure -developer-build -opensource -nomake examples -nomake tests
./make
./make install
Your build target may be ARM or other platform,then you can use ./configure --help to see more configure help.

Resources