[Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Discussions related to using the OSE version of VirtualBox.
Post Reply
Cancer1987
Posts: 11
Joined: 11. Aug 2017, 05:05

[Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Cancer1987 »

hello everyone, I've tried to build Virutalbox 5.1, and when I execute command "./configure", It shows that cannot find qt5, the output text like this:

Code: Select all

root@luchang-virtual-machine:~/VirtualBox-5.1.26# ./configure --disable-hardening 
Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for gcc: found version 4.8, OK.
Checking for Open Watcom: 
  ** Open Watcom was not found, using alternative BIOS sources!
Checking for iasl: found version 20140214, OK.
Checking for xslt: found, OK.
Checking for mkisofs: found genisoimage 1.1.11 (Linux), OK.
Checking for pthread: found, OK.
Checking for libxml2: found version 2.9.1, OK.
Checking for libIDL: found version 0.8.14, OK.
Checking for ssl: found version OpenSSL 1.0.1f 6 Jan 2014, OK.
Checking for libcurl: found version 7.35.0, OK.
Checking for libvpx: found version 1.6.1, OK.
Checking for zlib: found version 1.2.8, OK.
Checking for libpng: found version 1.2.50, OK.
Checking for SDL: found version 1.2.15, OK.
Checking for X libraries: found, OK.
Checking for Xcursor: found, OK.
Checking for Xinerama: found, OK.
Checking for Xrandr: found, OK.
Checking for Xmu: found, OK.
Checking for Mesa / GLU: found version 1.4, OK.
Checking for Qt5: 
  ** qt5 not found!
Check /home/luchang/VirtualBox-5.1.26/configure.log for details
In configure.log :

Code: Select all

***** Checking Qt5 *****
Package Qt5Core was not found in the pkg-config search path.
Perhaps you should add the directory containing `Qt5Core.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Qt5Core' found
(Qt5 from '/usr/lib/qt5')
compiling the following source file:
#include <QtGlobal>
extern "C" int main(void)
{
#if QT_VERSION >= 0x050302
  return 0;
#else
  return 1;
#endif
}
using the following command line:
g++  -fPIC -g -O -Wall -o /home/luchang/VirtualBox-5.1.26/.tmp_out /home/luchang/VirtualBox-5.1.26/.tmp_src.cc "-L/usr/lib/qt5/lib -lQt5CoreVBox -lpthread -I/usr/lib/qt5/include -I/usr/lib/qt5/include/QtCore -DQT_SHARED"
/home/luchang/VirtualBox-5.1.26/.tmp_src.cc:1:20: fatal error: QtGlobal: No such file or directory
 #include <QtGlobal>
                    ^
compilation terminated.

......(some more error log just like this : " QtGlobal: No such file or directory " )
It does NOT solve this problem even after I install qt5 by run the installation file "qt-opensource-linux-x64-5.9.1.run" which download from
http://download.qt.io/archive/qt/5.9/5.9.1/
By the way, my qt5 installation directory is /opt/Qt5.9.1/

----------------------------------
How should I do ? Thanks for reading and/or help my question.

-------------------------------------
Sorry for sending to a wrong forum, please move me to "Virtualbox OSE" forum, Thank you !!
Last edited by socratis on 18. Aug 2017, 08:41, edited 2 times in total.
Reason: Enclosed the information in [code] tag for better readability
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: [Compile Problem] "** qt5 not found" in Ubuntu

Post by Perryg »

The install location is not default and that is why VBox can not find it. Add "--with-qt-dir=/opt/Qt5.9.1/" to the configure line.

Code: Select all

./configure --with-qt-dir=/opt/Qt5.9.1/
Cancer1987
Posts: 11
Joined: 11. Aug 2017, 05:05

Re: [Compile Problem] "** qt5 not found" in Ubuntu

Post by Cancer1987 »

I've tried, but it still didn't work, neither as "--with-qt-dir=/opt/Qt5.9.1/5.9.1/gcc_64"
It still shows "** qt5 not found!"
Last edited by socratis on 18. Aug 2017, 08:42, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Perryg »

Sorry I just copied and pasted your information and the path should not have the last "/"

Code: Select all

    ./configure --with-qt-dir=/opt/Qt5.9.1
Cancer1987
Posts: 11
Joined: 11. Aug 2017, 05:05

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Cancer1987 »

Sorry, it still does NOT work.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Perryg »

Very odd. It works well for me on a 14.04 version. Did you remove the older version of QT? I have seen that cause lsb conflicts if they both were on the same machine. Most of the time I build packages from source but I did try the ppa to install the qt package on one machine to test and had the issue I described above.
Cancer1987
Posts: 11
Joined: 11. Aug 2017, 05:05

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Cancer1987 »

My OS is Ubuntu 14.04 too, I don't remove older version of QT.

It does very well when I build 5.0.44 which need only qt4,

but 5.1.26 need qt5.
I've tried to use apt-get install qt5-default to install qt5 from reposity, but still does NOT work. :oops:
-----------------------------
By the way, what's your qt5's version ? Is it 5.6.2 ??
Last edited by socratis on 18. Aug 2017, 08:43, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Perryg »

I had to remote into that machine to get it, miles away:

Code: Select all

Using Qt version 5.6.2 in /opt/qt56/lib
Cancer1987
Posts: 11
Joined: 11. Aug 2017, 05:05

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Cancer1987 »

I've installed qt5.6.2 and qt5.5.1 under /opt/, but it does NOT work.
---------------------------------
Could somebody start the compiling from the head under Ubuntu 14.04 ???
Last edited by socratis on 18. Aug 2017, 08:44, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by socratis »

I can't really tell how or why your system is messed up, but if everything else fails, then try the "generic" package. From the Linux downloads try the 'All distributions' (the last one). It contains its own Qt libraries that do not mess with the system ones.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Pablo Valdez
Posts: 1
Joined: 1. Oct 2017, 08:47

Re: [Help] "** qt5 not found" in Ubuntu when build Virtualbox 5.1.x

Post by Pablo Valdez »

...
No package 'Qt5Core' found
...
How should I do ? Thanks for reading and/or help my question.
...

You have to install all packages before configuring and building virtualbox:

On Debian-based systems(UBUNTU), the following command should install the required packages:

apt-get install gcc g++ bcc iasl xsltproc uuid-dev zlib1g-dev libidl-dev \
libsdl1.2-dev libxcursor-dev libasound2-dev libstdc++5 \
libhal-dev libpulse-dev libxml2-dev libxslt1-dev \
python-dev libqt4-dev qt4-dev-tools libcap-dev \
libxmu-dev mesa-common-dev libglu1-mesa-dev \
linux-kernel-headers libcurl4-openssl-dev libpam0g-dev \
libxrandr-dev libxinerama-dev libqt4-opengl-dev makeself \
libdevmapper-dev default-jdk python-central \
texlive-latex-base \
texlive-latex-extra texlive-latex-recommended \
texlive-fonts-extra texlive-fonts-recommended

On 64-bit Debian-based systems, the following command should install the required additional packages:
apt-get install ia32-libs libc6-dev-i386 lib32gcc1 gcc-multilib \
lib32stdc++6 g++-multilib

It helped me to solve exactly the same problem.
Post Reply