PDA

View Full Version : Build Qt5 with developer-build on ubuntu by the instruction, got error



budi
28th January 2020, 04:51
I tried to build Qt5 on Ubuntu by the instruction https://wiki.qt.io/Building_Qt_5_from_Git#Getting_the_source_code

and pick this option in build:


$ ../qt5/configure -developer-build -opensource -nomake examples -nomake tests


all the way is without error but at


$ make -j4
...
...


make[5]: Entering directory '/opt/qt5/qtbase/src/plugins/bearer/networkmanager'
make[5]: *** No targets. Stop.
make[5]: Leaving directory '/opt/qt5/qtbase/src/plugins/bearer/networkmanager'
make[4]: *** [Makefile:99: sub-networkmanager-make_first] Error 2
make[4]: Leaving directory '/opt/qt5/qtbase/src/plugins/bearer'
make[3]: *** [Makefile:80: sub-bearer-make_first] Error 2
make[3]: *** Waiting for unfinished jobs....
cd tds/ && ( test -e Makefile || /opt/qt5/qtbase/bin/qmake -o Makefile /opt/qt5/qtbase/src/plugins/sqldrivers/tds/tds.pro ) && make -f Makefile
make[5]: Entering directory '/opt/qt5/qtbase/src/plugins/platforminputcontexts/compose'
make[5]: Nothing to be done for 'first'.


...
...
next error is


cd vnc/ && ( test -e Makefile || /opt/qt5/qtbase/bin/qmake -o Makefile /opt/qt5/qtbase/src/plugins/platforms/vnc/vnc.pro ) && make -f Makefile
/usr/bin/ld.gold: error: .obj/sqlite3.o: file is empty
qsql_sqlite.cpp:112: error: undefined reference to 'sqlite3_errmsg16'
qsql_sqlite.cpp:200: error: undefined reference to 'sqlite3_finalize'
qsql_sqlite.cpp:207: error: undefined reference to 'sqlite3_column_count'
qsql_sqlite.cpp:215: error: undefined reference to 'sqlite3_column_name16'
qsql_sqlite.cpp:218: error: undefined reference to 'sqlite3_column_table_name16'
qsql_sqlite.cpp:222: error: undefined reference to 'sqlite3_column_decltype16'
qsql_sqlite.cpp:224: error: undefined reference to 'sqlite3_column_type'
qsql_sqlite.cpp:276: error: undefined reference to 'sqlite3_column_count'
qsql_sqlite.cpp:285: error: undefined reference to 'sqlite3_step'
qsql_sqlite.cpp:296: error: undefined reference to 'sqlite3_column_typemake[6]: Entering directory '/opt/qt5/qtbase/src/plugins/platforms/xcb'

what would be the cause as every requirement suggested is fullfilled.. Thanks

ChrisW67
28th January 2020, 09:41
What was the output of configure?

If you run the make without parallel jobs (no "-j4" option) does that make a difference?

budi
29th January 2020, 01:09
Now got error in configure, as I move up to ver 5.15

budi@HP /opt/qt5
$ git pull -f
Already up to date.

budi@HP /opt/qt5
$ git branch
* 5.15
dev

budi@HP /opt/qt5
$ git checkout 5.15
M qt3d
M qtbase
M qtcanvas3d
M qtdeclarative
M qtgamepad
M qtimageformats
M qtlocation
M qtscript
M qtscxml
M qtsensors
M qtserialbus
M qttools
M qtxmlpatterns
Already on '5.15'
Your branch is up to date with 'origin/5.15'.

budi@HP /opt/qt5
$ perl init-repository --module-subset=default,-qtwebengine -f
+ git submodule init qt3d qtactiveqt qtandroidextras qtbase qtcharts qtconnectivity qtdatavis3d qtdeclarative qtdoc qtgamepad qtgraphicaleffects qtimageformats qtlocation qtlottie qtmacextras qtmultimedia qtnetworkauth qtpurchasing qtqa qtquick3d qtquickcontrols qtquickcontrols2 qtquicktimeline qtremoteobjects qtrepotools qtscript qtscxml qtsensors qtserialbus qtserialport qtspeech qtsvg qttools qttranslations qtvirtualkeyboard qtwayland qtwebchannel qtwebglplugin qtwebsockets qtwebview qtwinextras qtx11extras qtxmlpatterns
+ git config commit.template /opt/qt5/.commit-template
+ git config remote.origin.url git://code.qt.io/qt/qt3d.git

(... no err)

+ git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
+ git submodule update --force --no-fetch
Submodule path 'qt3d': checked out '4cd35e87b63d2ff4bc4ee88b6080f812de45d239'
(... no error)
Submodule path 'qtxmlpatterns': checked out 'e263fec484d23fc2e652f538f39934b5364339e1'
+ git submodule init tests/auto/qml/ecmascripttests/test262
*** /qtdeclarative/tests/auto/qml/ecmascripttests/test262 not found, ignoring alternate for this submodule
+ git config remote.origin.url git://code.qt.io/qt/qtdeclarative-testsuites.git
+ git fetch origin
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtdeclarative-testsuites.git
+ git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
+ git submodule update --force --no-fetch
Submodule path 'tests/auto/qml/ecmascripttests/test262': checked out 'db73deb3bdede559bb7639bf3d0a07a32a17c6d8'
+ git submodule init src/3rdparty/mapbox-gl-native
*** /qtlocation/src/3rdparty/mapbox-gl-native not found, ignoring alternate for this submodule
+ git config remote.origin.url git://code.qt.io/qt/qtlocation-mapboxgl.git
+ git fetch origin
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtlocation-mapboxgl.git
+ git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
+ git submodule update --force --no-fetch
Submodule path 'src/3rdparty/mapbox-gl-native': checked out 'd9577fdebe019b19e184b4cac82749ae9ec87afb'
+ git submodule init src/3rdparty/assimp/src
*** /qtquick3d/src/3rdparty/assimp/src not found, ignoring alternate for this submodule
+ git config remote.origin.url git://code.qt.io/qt/qtquick3d-assimp.git
+ git fetch origin
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtquick3d-assimp.git
+ git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
+ git submodule update --force --no-fetch
Submodule path 'src/3rdparty/assimp/src': checked out '5c900d689a5db5637b98f665fc1e9e9c9ed416b9'
+ git submodule init tests/auto/3rdparty/testsuites
*** /qtxmlpatterns/tests/auto/3rdparty/testsuites not found, ignoring alternate for this submodule
+ git config remote.origin.url git://code.qt.io/qt/qtxmlpatterns-testsuites.git
+ git fetch origin
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qtxmlpatterns-testsuites.git
+ git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/
+ git submodule update --force --no-fetch
Submodule path 'tests/auto/3rdparty/testsuites': checked out 'ddfcd98e8d3f78d696bb25ddcaacc3e3cba51e7f'
+ git config remote.gerrit.url ssh://codereview.qt-project.org/qt/qt5
+ git config remote.gerrit.fetch +refs/heads/*:refs/remotes/gerrit/* /heads/

budi@HP /opt/qt5
$ ../qt5/configure -developer-build -opensource -nomake examples -nomake tests
+ cd qtbase
+ /opt/qt5/qtbase/configure -top-level -developer-build -opensource -nomake examples -nomake tests
<srcbase> = /opt/qt5/qtbase
<bldbase> = /opt/qt5/qtbase
<outbase> = /opt/qt5/qtbase
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/.tracegen/ { qtcore_tracepoints_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/animation/

(... no err)

QtCore: created fwd-include header(s) for <srcbase>/src/corelib/time/ { qcalendar.h (1), qcalendarbackend_p.h (1), qcalendarmath_p.h (1), qdatetime_p.h (1), qdatetimeparser_p.h (1), qgregoriancalendar_p.h (1), qhijricalendar_data_p.h (1), qhijricalendar_p.h (1), qislamiccivilcalendar_p.h (1), qjalalicalendar_data_p.h (1), qjalalicalendar_p.h (1), qjuliancalendar_p.h (1), qmilankoviccalendar_p.h (1), qromancalendar_data_p.h (1), qromancalendar_p.h (1), qtimezoneprivate_data_p.h (1), qtimezoneprivate_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/tools/ { qcontainertools_impl.h (1), qduplicatetracker_p.h (1), qfreelist_p.h (1), qmakearray_p.h (1), qoffsetstringarray_p.h (1), qringbuffer_p.h (1), qscopedpointer_p.h (1), qsimd_p.h (1), qsimd_x86_p.h (1), qtools_p.h (1) }
QtCore: created fwd-include header(s) for <srcbase>/src/corelib/platform/wasm/ { qstdweb_p.h (1) }
Creating qmake...
.In file included from ../include/QtCore/../../src/corelib/io/qiodevice.h:50,
from ../include/QtCore/qiodevice.h:1,
from /opt/qt5/qtbase/qmake/library/qmakevfs.h:34,
from /opt/qt5/qtbase/qmake/library/qmakeparser.h:33,
from /opt/qt5/qtbase/qmake/library/qmakeevaluator.h:36,
from /opt/qt5/qtbase/qmake/project.h:32,
from /opt/qt5/qtbase/qmake/main.cpp:30:
../include/QtCore/qstring.h:1:10: fatal error: ../../src/corelib/tools/qstring.h: No such file or directory
1 | #include "../../src/corelib/tools/qstring.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:252: main.o] Error 1

as I'm new in Qt, this trouble is daunting me which I have no the slightest idea what's the cause.. any useful hint is appreciated

ChristianEhrlicher
29th January 2020, 17:00
Don't do an in-source build.

budi
30th January 2020, 01:56
So what should I do to solve it?

d_stranz
30th January 2020, 17:01
So what should I do to solve it?

Read the documentation on Qt Configure Options (https://doc.qt.io/qt-5/configure-options.html), especially the section on Source, Build, and Install Directories. You do an out-of-source build using the -prefix option to specify where the output goes.