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!
Related
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
I am getting an error while trying to install Rserve 1.8.6. I can successfully install 1.7.3 from CRAN. This is on Mac OS High Sierra.
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [forward] Error 1
make: *** [all] Error 2
ERROR: compilation failed for package ‘Rserve’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
The downloaded source packages are in
‘/private/var/folders/v7/hyxrfmk94p1_03gdrm27fnxncy3vq1/T/RtmpFHKNMe/downloaded_packages’
This worked for me (MacOS):
In terminal:
brew install openssl
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
I'm running Mac OS 10.15 Catalina, I've spent 2 days trying to fix this same problem, scouring the internet for help. I finally managed it by cobbling together solutions from a few different sources.
The key thing I was missing was that Mac OS ships with its own version of openssl which it thinks is superior to anything else you can find. It is wrong. What you need to do is go and download the latest version of openssl, install that, then export THAT library to your library path variable. Here are the steps I took with openssl 1.1.1:
Get the version number for the latest version of openssl from the source (https://www.openssl.org/source/) and then manually install it directly where it's supposed to go:
cd /usr/local/src
If you're getting "No such file or directory", make it:
cd /usr/local && mkdir src && cd src
Download openssl using curl (shown) or using the link above to the source code (make sure you put the file in the directory you just made in the previous step):
curl --remote-name https://www.openssl.org/source/openssl-1.1.1f.tar.gz
Extract and cd in:
tar -xzvf openssl-1.1.1f.tar.gz
cd openssl-1.1.1f
Compile and install (these are the 64 bit Mac OS instructions. Refer to the openssl documentation for 32 bit and other OS instructions):
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
make depend
sudo make install
This created a new openssl folder so when you export the library path you have to feed it the right openssl folder:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl#1.1/lib/
Hope that helps you if you haven't figured it out yet, and anyone else in the future who is ready to chuck their computer across the room, like I was.
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.
I am new to Ubuntu and i am getting a message while building Qt 4.8.3 on Ubuntu 12:
Basic XLib functionality test failed! You might need to modify the
include and library search paths by editing QMAKE_INCDIR_X11 and
QMAKE_LIBDIR_X11 in
/home/majidmax/qt-everywhere-opensource-src-4.8.3/mkspecs/linux-g++.
what the proper steps to build Qt on Ubuntu?
http://qt-project.org/doc/qt-4.8/requirements-x11.html
the website provide the package list which must be installed
try it~
These are the packages you need to install and you'll be good to go. I just had this same problem and this worked for me. These came from the link provided by Garlic Tseng in the accepted answer. I am just putting these here for convenience:
libfontconfig1-dev
libfreetype6-dev
libx11-dev
libxcursor-dev
libxext-dev
libxfixes-dev
libxft-dev
libxi-dev
libxrandr-dev
libxrender-dev
One (copy pastable) command to install all:
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
What about sudo apt-get build-dep qt4-qmake?
Try to run that command before you compile Qt (on Debian-like distros).
Same problem i faced in fedora20 (64-bit) for Qt-4.8.3
1)- yum install libXext-devel
(internet connectivity should be there for checking the dependency and install all dependency).
2)- ./configure
3)- make
4)- make install
5)- Installation finish successfully.
The error message doesn't give a lot of information as to the actual issue of XLib failing.
To get more information on the error causing it to fail you can 'make' the xlib tests:
$ cd <Qt_Source_Directory>/config.tests/x11/xlib/
$ make
g++ -Wl,-O1 -o xlib xlib.o -L/usr/X11R6/lib -ltcg -lXext -lX11 -lm
/usr/bin/ld: cannot find -ltcg
collect2: error: ld returned 1 exit status
make: *** [xlib] Error 1
In my case above, I was using -ltcg which was being interpreted as an explicit library to include. I was using this option as it is listed on the qt 4.8 configure options as:
Use Link Time Code Generation
When I looked at the configure options using ./configure --help I noticed that this option isn't listed. Removing the option from my configure line fixed my issue.
what the proper steps to build Qt on Ubuntu?
Check the Qt supported Platforms.
Check Qt for X11 requirements.
3a. Check steps to install Qt on X11 platforms(along with build).
or
3b. Check steps to build static Qt.
To keep the Q&A aspect:
I got a strange problem with the latest (v.2.4.2) OpenCV version, which failed to install with the following error:
In file included from /OpenCV-2.4.2/modules/core/src/system.cpp:460:
/OpenCV-2.4.2/release/modules/core/version_string.inc:37:1:
warning: missing terminating " character In file included from
/OpenCV-2.4.2/modules/core/src/system.cpp:460:
/OpenCV-2.4.2/release/modules/core/version_string.inc:37: error:
missing terminating " character
So what went wrong? Take a look at my answer.
As mentioned in this bug report the problem is an old version (2.8.2) of cmake. So the solution was to grab a fresh copy of the cmake source, compile it and use it to install OpenCV.
Note 18/09/2012: This also works on Ubuntu 12.04 with cmake 2.8.9!
# get the cmake src
wget http://www.cmake.org/files/v2.8/cmake-2.8.8.tar.gz
# extract archive
tar xfvz cmake-2.8.8.tar.gz
# build the new version
cd cmake-2.8.8
cmake .
make
sudo make install
# get the OpenCV src
wget -O OpenCV-2.4.2.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.2/OpenCV-2.4.2.tar.bz2/download
# extract it …
tar -xvf OpenCV-2.4.2.tar.bz2
# build it
mkdir build
cd build
/usr/local/bin/cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make
sudo make install
# setup OpenCV
sudo echo “/usr/local/lib” >> /etc/ld.so.conf
sudo ldconfig
That's it.
Unfortunately newer cmake depends on newer cmake than the outdated cmake 2.6-patch 0 in lenny. To compile cmake 2.8.8 as mentioned above, first you have to compile CMake 2.6.3 or above which builds with lenny outdated cmake 2.6-patch 0.