Building qt 5.9.7 on CentOS 7 completes but qtsvg seems to be missing
-
I am learning to build Qt on CentOS 7 and began by building Qt 5.9.7 which happens to be the version available in repository for CentOS 7 and therefore should build without any problems. I am building in a docker container where I have not installed qt from any repository but cloned from github and checked out version 5.9.7.
I can successfully - I think - build qt5 but when I later try to build another application, pgmodeler 0.9.0-alpha1, which uses qt5, building the latter fails on qtsvg not being available.
I am not sure what I have to do to build that as well. Here are the build commands I have used in my docker container for qt5:
cd ~/qt5
perl init-repository
git submodule update --init --recursive
cd ~/qt5-build/
../qt5/configure -opensource -nomake examples -nomake tests -skip qtquick1
gmakePlease not the removal of developer-build since the process otherwise fails on warnings being treated as errors and the addition of -skip qtquick1, the latter I picked up on the web because the process failed on a function not being available...
Any pointer on how to get qtsvg to build and being available would be appreciated. qtsvg is in the qt5 tree.
Last, I am user devtoolset-9 for CentOS 7, the latest and greatest.
Finally, I know I can download all of qt5 from a repository but since the point is building it on my machine, that is not an option.
-
Hi and welcome to devnet,
Do you have any error ?
Did you try to build it alone ? -
Then go to the qtsvg subdirectory and type 'make' to see if something gets compiled.
-
I just did and nothing additional built. Two questions:
- Are there any test programs etc. I can run to make sure I have clean and complete compile?
- After compiling qt with, in my case, gmake and then gmake install, are there any environment variables I need to set in order to compile another application that uses qt? If I type qmake --version it tells me:
QMake version 3.1
Using Qt version 5.9.7 in /usr/local/Qt-5.9.7/lib
Is this sufficient for when using qmake to build this other application, pgmodeler, that uses qt?
-
I just checked pgmodeler.pri, apparently the file qmake pulls in when building pgmodeler and it contains the following statements for qt:
General Qt settings
QT += core widgets printsupport network svg
CONFIG += ordered qt stl rtti exceptions warn_on c++11
TEMPLATE = subdirs
MOC_DIR = moc
OBJECTS_DIR = obj
UI_DIR = srcIs there anything above that I should double-check? The most likely explanation for the error:
Project ERROR: Unknown module(s) in QT: svg
might be that something is misconfigured?? -
I now have two docker containers:
- In the first one I downloaded the qt5 libraries (5.9.7) etc available in CentOS repositories and then cloned pgmodeler from github and was able to build version 0.9.0-alpha1 of the latter successfully.
- In the second container I did /not/ download the qt5 libraries from the repositories but cloned pgmodeler exactly as above and the compile of that results in Qt svg not found as earlier stated.
I see three differences between the two different docker containers:
- In the first one I use qmake-qt5 for the build, in the second I use qmake (no qmake-qt5 is generated).
- In the first one the qt libraries are in /usr/lib64 and in the second one they are in /usr/local/Qt-5.9.7/lib.
- The third difference is a slight difference in size of individual library files, not sure why.
But, could there be a configuration problem?
-
Do you have the QtSvg module installed in your custom build ?
-
Just for "fun" I removed the svg reference in the qt section of the build profile for the third-party app and I could begin building it. However, it failed late in the build process when it tried to access qtsvg.
I have to believe there is something wrong with the setup since the qtsvg modules are not picked up. Might there be some bug in qt 5.9.7 itself that does not make qtsvg available? Or some setup configuration I have missed since although it builds, it does not seem to be available later...
Is there any way I can test this hypothesis outside my third-party app?
-
@yryu4526 said in Building qt 5.9.7 on CentOS 7 completes but qtsvg seems to be missing:
Could you explain a bit further, what do you mean by "installed in your custom build"? Two messages up I pasted the qt section of the build profile for the other app.
Take a look into the folder that was populated after you called "make install". Do you find anything related to QtSvg ?
-
Ok, do you have the same issue if you create a small dummy project using that module ?
-
@yryu4526
Hi
You can just use Creator and the menu File->"New File Or project"
and then
then add
QT += svg
in the pro file and see if that compiles.just in case you dont have creator.
here is default project created with thw wizard
https://www.dropbox.com/s/vvz5s4yhka68uui/justDefualt.zip?dl=0 -
I downloaded the file into a new directory, ran "qmake -r justDefualt.pro" and got the following output:
Info: creating stash file /root/test/.qmake.stash
Project ERROR: Unknown module(s) in QT: svgNote that I am running as root in a docker container, not on the main machine itself.
-
And the qmake is from your self compiled Qt ?
-
Correct, it's located in /root/qt5-build/qtbase/bin. I am wondering, since I am doing this in a docker container, there might be some configuration issue?
This is the output after running the first ./configure command (../qt5/configure -opensource -prefix /usr/lib64 -nomake examples -skip qtquick1 | tee -a /qt-build.txt)
:
Configure summary:Build type: linux-g++ (x86_64, CPU features: mmx sse sse2)
Configuration: use_gold_linker sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples enable_new_dtags f16c largefile precompile_header shared rpath release c++11 c++14 c++1z concurrent dbus reduce_exports reduce_relocations stl
Build options:
Mode ................................... release
Optimize release build for size ........ no
Building shared libraries .............. yes
Using C++ standard ..................... C++1z
Using ccache ........................... no
Using gold linker ...................... yes
Using new DTAGS ........................ yes
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
AVX .................................. AVX AVX2 F16C
AVX512 ............................... F ER CD PF DQ BW VL IFMA VBMI
Build parts ............................ libs tools
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... yes
Qt D-Bus directly linked to libdbus .... yes
Qt Gui ................................. yes
Qt Network ............................. yes
Qt Sql ................................. yes
Qt Testlib ............................. yes
Qt Widgets ............................. yes
Qt Xml ................................. yes
Support enabled for:
Using pkg-config ....................... yes
QML debugging .......................... yes
udev ................................... no
Using system zlib ...................... yes
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... yes
iconv .................................. no
ICU .................................... yes
Logging backends:
journald ............................. no
syslog ............................... no
slog2 ................................ no
Using system PCRE2 ..................... no
Qt Network:
getaddrinfo() .......................... yes
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
OpenSSL ................................ yes
Qt directly linked to OpenSSL ........ no
SCTP ................................... no
Use system proxies ..................... yes
Qt Gui:
Accessibility .......................... yes
FreeType ............................... yes
Using system FreeType ................ yes
HarfBuzz ............................... yes
Using system HarfBuzz ................ yes
Fontconfig ............................. yes
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... no
PNG .................................. yes
Using system libpng ................ yes
EGL .................................... no
OpenVG ................................. no
OpenGL:
Desktop OpenGL ....................... yes
OpenGL ES 2.0 ........................ no
OpenGL ES 3.0 ........................ no
OpenGL ES 3.1 ........................ no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. yes
libinput ............................... no
INTEGRITY HID .......................... no
mtdev .................................. no
tslib .................................. no
xkbcommon-evdev ........................ yes
QPA backends:
DirectFB ............................... no
EGLFS .................................. no
LinuxFB ................................ yes
VNC .................................... yes
Mir client ............................. no
X11:
Using system-provided XCB libraries .. yes
EGL on X11 ........................... no
Xinput2 .............................. yes
XCB XKB .............................. yes
XLib ................................. yes
XCB render ........................... yes
XCB GLX .............................. yes
XCB Xlib ............................. yes
Using system-provided xkbcommon ...... yes
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... yes
Qt Sql:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. yes
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt SerialBus:
Socket CAN ............................. yes
Socket CAN FD .......................... yes
QtXmlPatterns:
XML schema support ..................... yes
Qt QML:
QML interpreter ........................ yes
QML network support .................... yes
Qt Quick:
Direct3D 12 ............................ no
AnimatedImage item ..................... yes
Canvas item ............................ yes
Support for Qt Quick Designer .......... yes
Flipable item .......................... yes
GridView item .......................... yes
ListView item .......................... yes
Path support ........................... yes
PathView item .......................... yes
Positioner items ....................... yes
ShaderEffect item ...................... yes
Sprite item ............................ yes
Qt Gamepad:
SDL2 ................................... no
Qt 3D:
Assimp ................................. yes
System Assimp .......................... no
Output Qt3D Job traces ................. no
Output Qt3D GL traces .................. no
Qt 3D GeometryLoaders:
Autodesk FBX ........................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
BlueZ .................................. no
BlueZ Low Energy ....................... no
Linux Crypto API ....................... no
Qt Sensors:
sensorfw ............................... no
Qt Quick Controls 2:
Styles ................................. Default Material Universal
Qt Quick Templates 2:
Hover support .......................... yes
Multi-touch support .................... yes
Qt Positioning:
Gypsy GPS Daemon ....................... no
WinRT Geolocation API .................. no
Qt Location:
Geoservice plugins:
OpenStreetMap ........................ yes
HERE ................................. yes
Esri ................................. yes
Mapbox ............................... yes
MapboxGL ............................. yes
Itemsoverlay ......................... yes
Qt Multimedia:
ALSA ................................... yes
GStreamer 1.0 .......................... no
GStreamer 0.10 ......................... no
Video for Linux ........................ yes
OpenAL ................................. no
PulseAudio ............................. yes
Resource Policy (libresourceqt5) ....... no
Windows Audio Services ................. no
DirectShow ............................. no
Windows Media Foundation ............... no
Qt WebEngine:
Embedded build ......................... no
Pepper Plugins ......................... yes
Printing and PDF ....................... yes
Proprietary Codecs ..................... no
Spellchecker ........................... yes
WebRTC ................................. yes
Using system ninja ..................... no
ALSA ................................... yes
PulseAudio ............................. yes
System libraries:
re2 .................................. no
ICU .................................. no
libwebp and libwebpdemux ............. no
Opus ................................. no
ffmpeg ............................... noNote: Also available for Linux: linux-clang linux-icc
Note: Dropped compiler flags '-pthread' when detecting library 'glib'.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
Qt is now configured for building. Just run 'gmake'.
Once everything is built, you must run 'gmake install'.
Qt will be installed into '/usr/lib64'.Is there something above that does /not/ look correct?
-
Did you call make install ?
You can also skip building the tests.I find it strange that QtSvg is not listed. Did you parse them tests logs to see if anything has failed for it ?
Did you try to manually build it after the rest was built ?
-
Yes, I called make install and I did try building it manually - I already posted that previously.
But should svg have been listed in the configuration summary I posted?? It seems odd other qt components are listed but since I am not very knowledgeable I do not know if this means anything.