Build Qt Static Make Error - [SOLVED]
-
One more make error on Ubuntu 15.04
/usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here /usr/bin/ld.gold: error: /home/lays/qt5/qtmultimedia/plugins/playlistformats/libqtmultimedia_m3u.a(moc_qm3uhandler.o): multiple definition of 'QM3uPlaylistPlugin::staticMetaObject' /usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here /usr/bin/ld.gold: error: /home/lays/qt5/qtmultimedia/plugins/playlistformats/libqtmultimedia_m3u.a(moc_qm3uhandler.o): multiple definition of 'QM3uPlaylistPlugin::qt_metacast(char const*)' /usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here /usr/bin/ld.gold: error: /home/lays/qt5/qtmultimedia/plugins/playlistformats/libqtmultimedia_m3u.a(moc_qm3uhandler.o): multiple definition of 'QM3uPlaylistPlugin::qt_metacall(QMetaObject::Call, int, void**)' /usr/bin/ld.gold: .obj/moc_qm3uhandler.o: previous definition here collect2: error: ld returned 1 exit status Makefile:115: recipe for target 'tst_qmediaplaylist' failed make[6]: *** [tst_qmediaplaylist] Error 1 make[6]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto/unit/qmediaplaylist' Makefile.multimedia:400: recipe for target 'sub-qmediaplaylist-make_first' failed make[5]: *** [sub-qmediaplaylist-make_first] Error 2 make[5]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto/unit' Makefile:42: recipe for target 'sub-multimedia-pro-make_first' failed make[4]: *** [sub-multimedia-pro-make_first] Error 2 make[4]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto/unit' Makefile:44: recipe for target 'sub-unit-make_first' failed make[3]: *** [sub-unit-make_first] Error 2 make[3]: Leaving directory '/home/lays/qt5/qtmultimedia/tests/auto' Makefile:42: recipe for target 'sub-auto-make_first' failed make[2]: *** [sub-auto-make_first] Error 2 make[2]: Leaving directory '/home/lays/qt5/qtmultimedia/tests' Makefile:94: recipe for target 'sub-tests-make_first' failed make[1]: *** [sub-tests-make_first] Error 2 make[1]: Leaving directory '/home/lays/qt5/qtmultimedia' Makefile:299: recipe for target 'module-qtmultimedia-make_first' failed make: *** [module-qtmultimedia-make_first] Error 2 lays@lays:~/qt5$
With this configure: ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static
Am I doing something wrong? -
If i try to make from qt everywere open source from source code on qt.io i receive this message on terminal:
lays@lays:~$ cd qt-everywhere/ lays@lays:~/qt-everywhere$ ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory lays@lays:~/qt-everywhere$ gedit configure lays@lays:~/qt-everywhere$ ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static + cd qtbase + /home/lays/qt-everywhere/qtbase/configure -top-level -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static ./configure: 49: exec: /home/lays/qt-everywhere/qtbase/configure: not found lays@lays:~/qt-everywhere$ cd qtbase/ lays@lays:~/qt-everywhere/qtbase$ ./configure bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory lays@lays:~/qt-everywhere/qtbase$ gedit configure lays@lays:~/qt-everywhere/qtbase$ cd .. lays@lays:~/qt-everywhere$ ./configure -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static + cd qtbase + /home/lays/qt-everywhere/qtbase/configure -top-level -prefix QtNew -release -developer-build -opensource -confirm-license -qt-xcb -opengl -static You don't seem to have 'make' or 'gmake' in your PATH. Cannot proceed. lays@lays:~/qt-everywhere$
After i edit the configre files for encode Unix.
-
Don't build the examples nor the tests.
And if you try to call configure again without cleaning the sources, it will fail.
Do out of source builds, that way you can just nuke the failed build folder before trying again.
-
@SGaist When i try to make again, i download again the source from git, just in case. I dont try configure 2 or more time. Just one indeed. I just want to build qt static with opengl, what type of configuration do you indicate?
Because this type of configuration worked for me before, i dont know whats happening now. -
./configure -prefix QtNew -release -opensource -confirm-license -static -qt-xcb -no-glib -no-pulseaudio -no-alsa -opengl desktop -nomake examples -nomake tests
[edit: Fixed option name SGaist]
-
Sorry for bumping old topic, but this one that first shown in google search.
If someone stumbled upon something like:
+ qt-everywhere-opensource-src-5.9.1/qtbase/configure -top-level -static -no-make examples Creating qmake... .Done. ERROR: Invalid value 'no' supplied to command line option 'make'. ERROR: Invalid command line parameter 'examples'.
The correct command is
-nomake
not-no-make
-
Typos typos... Thanks, I've fixed them.
-
-
@AXZS ./configure -platform linux-g++ -release -device linux-beagleboard-g++ \ -sysroot /home/rnd100/BBB/sysroot-glibc-linaro-2.25-2019.12-arm-linux-gnueabihf -prefix ~/Qt5ForBBB -hostprefix ~/Qt5forBBB -device-option CROSS_COMPILE=/home/rnd100/BBB/gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-linux-gnueabihf- -nomake tests -nomake examples -no-opengl -opensource -confirm-license -reduce-exports -make libs
-
cd qtbase
-
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/configure -top-level -platform linux-g++ -release -device linux-beagleboard-g++ -sysroot /home/rnd100/BBB/sysroot-glibc-linaro-2.25-2019.12-arm-linux-gnueabihf -prefix /home/rnd100/Qt5ForBBB -hostprefix /home/rnd100/Qt5forBBB -device-option CROSS_COMPILE=/home/rnd100/BBB/gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-linux-gnueabihf- -nomake tests -nomake examples -no-opengl -opensource -confirm-license -reduce-exports -make libs
Creating qmake...
.In file included from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qendian.h:1,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::max()’:
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:35: error: ‘numeric_limits’ is not a member of ‘std’
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~~~~~~~~~~~~
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:54: error: ‘::max’ has not been declared; did you mean ‘std::max’?
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~ | std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qglobal.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qchar.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qstring.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec_p.h:55, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qendian.h:1,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:29: error: expected primary-expression before ‘(’ token
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:35: error: ‘numeric_limits’ is not a member of ‘std’
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~~~~~~~~~~~~
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:51: error: expected primary-expression before ‘>’ token
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:54: error: ‘::max’ has not been declared; did you mean ‘std::max’?
331 | { return QSpecialInteger(std::numeric_limits<T>::max()); }
| ^~~ | std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qglobal.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qchar.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qstring.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec_p.h:55, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qendian.h:1,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::min()’:
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:35: error: ‘numeric_limits’ is not a member of ‘std’
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~~~~~~~~~~~~
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:54: error: ‘::min’ has not been declared; did you mean ‘std::min’?
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~ | std::min
In file included from /usr/include/c++/11/algorithm:62,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qglobal.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qchar.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qstring.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec_p.h:55, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: ‘std::min’ declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qendian.h:1,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:29: error: expected primary-expression before ‘(’ token
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:35: error: ‘numeric_limits’ is not a member of ‘std’
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~~~~~~~~~~~~
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:51: error: expected primary-expression before ‘>’ token
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^
/home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qendian.h:333:54: error: ‘::min’ has not been declared; did you mean ‘std::min’?
333 | { return QSpecialInteger(std::numeric_limits<T>::min()); }
| ^~~ | std::min
In file included from /usr/include/c++/11/algorithm:62,
from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:142, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qglobal.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qchar.h:43, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qchar.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:48, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/include/QtCore/qstring.h:1, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec_p.h:55, from /home/rnd100/BBB/qt-everywhere-src-5.12.1/qtbase/src/corelib/codecs/qutfcodec.cpp:41:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: ‘std::min’ declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
gmake: *** [Makefile:378: qutfcodec.o] Error 1
-
-
Why are you using a MinGW based cross-compiler ?
-
@Mihir i think problem is in your gcc version. i also had that problem and i change my gcc version to gcc 9.5.0
-
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y
-
sudo apt install g++-9 gcc-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 80 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 --slave /usr/bin/gcov gcov /usr/bin/gcov-9
- sudo update-alternatives --config gcc
and try again with configuration
-