Qt5 development primer
-
I faced same problem,
check out this bug https://bugreports.qt-project.org/browse/QTBUG-30561
applying this patch resolved the issue https://codereview.qt-project.org/#patch,sidebyside,52170,1,mkspecs/features/qt_module.prf
-
Hi,
Can the owner of this documentation pls update the steps for running the 'configure' script on Win7+MinGW/MSys.
The correct command as pointed by 'JKSH' user is
$configure.bat -developer-build -opensource -nomake examples -nomake tests -opengl desktopLinks:
http://qt-project.org/forums/viewthread/27435/
http://qt-project.org/forums/viewthread/22257Thanks
-
You can edit it any time.
-
I was getting a "runtime/CodeCache.cpp
The bug is not reproducible, so it is likely a hardware or OS problem."
error when using make -j 4.
I had to do a make without specifying '-j 4' (which "I think is serial execution":http://www.gnu.org/software/make/manual/html_node/Parallel.html) for the build to work. -
Uncanny.
I'm routinely compiling various Qt versions, from 4.8 to 5.1, with make -j9 and never had an issue. Well, once :)
Maybe your "make" is outdated?
-
[quote author="Munawwar" date="1368987136"]I was getting a "runtime/CodeCache.cpp
The bug is not reproducible, so it is likely a hardware or OS problem."
error when using make -j 4.
I had to do a make without specifying '-j 4' (which "I think is serial execution":http://www.gnu.org/software/make/manual/html_node/Parallel.html) for the build to work.[/quote]What CPU, and how much RAM, do you have? -
I'm having problems getting Qt 5.1 to compile:
In file included from ../../include/QtWidgets/qgraphicsscene.h:1:0,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview.h:48,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:56,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicsview_p.h:1,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem_p.h:59,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicswidget_p.h:57,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicswidget_p.h:1,
from kernel/qaction_p.h:58,
from kernel/qactiongroup.cpp:46:
../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:160:24: error: missing binary operator before token "("
../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:167:24: error: missing binary operator before token "("
../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:174:24: error: missing binary operator before token "("
In file included from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem_p.h:56:0,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicswidget_p.h:57,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicswidget_p.h:1,
from kernel/qaction_p.h:58,
from kernel/qaction.cpp:46:
../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem.h:176:24: error: missing binary operator before token "("
../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem.h:240:24: error: missing binary operator before token "("
../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem.h:298:24: error: missing binary operator before token "("
In file included from ../../include/QtWidgets/qgraphicsscene.h:1:0,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview.h:48,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsview_p.h:56,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicsview_p.h:1,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicsitem_p.h:59,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/../../../../../src/widgets/graphicsview/qgraphicswidget_p.h:57,
from ../../include/QtWidgets/5.1.0/QtWidgets/private/qgraphicswidget_p.h:1,
from kernel/qaction_p.h:58,
from kernel/qaction.cpp:46:
../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:160:24: error: missing binary operator before token "("
../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:167:24: error: missing binary operator before token "("
../../include/QtWidgets/../../src/widgets/graphicsview/qgraphicsscene.h:174:24: error: missing binary operator before token "("
In file included from kernel/qactiongroup.cpp:382:0:
.moc/release-shared/moc_qactiongroup.cpp:15:2: error: #error "This file was generated using the moc from 5.1.0. It"
.moc/release-shared/moc_qactiongroup.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
.moc/release-shared/moc_qactiongroup.cpp:17:2: error: #error "(The moc has changed too much.)"
In file included from ../../include/QtWidgets/qaction.h:1:0,
from kernel/qactiongroup.h:45,
from kernel/qactiongroup.cpp:42:
../../include/QtWidgets/../../src/widgets/kernel/qaction.h:61:32: error: expected initializer before ‘:’ token
In file included from kernel/qaction.cpp:1313:0:
.moc/release-shared/moc_qaction.cpp:15:2: error: #error "This file was generated using the moc from 5.1.0. It"
.moc/release-shared/moc_qaction.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
.moc/release-shared/moc_qaction.cpp:17:2: error: #error "(The moc has changed too much.)"
In file included from kernel/qaction.cpp:42:0:
kernel/qaction.h:61:32: error: expected initializer before ‘:’ token
make[3]: *** [.obj/release-shared/qactiongroup.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [.obj/release-shared/qaction.o] Error 1
make[3]: Leaving directory/media/usb_700_ext4/qt5/qtbase/src/widgets' make[2]: *** [sub-widgets-make_first] Error 2 make[2]: Leaving directory
/media/usb_700_ext4/qt5/qtbase/src'
make[1]: *** [sub-src-make_first] Error 2
make[1]: Leaving directory `/media/usb_700_ext4/qt5/qtbase'
make: *** [module-qtbase-make_first] Error 2
allen@ubuntu:/media/usb_700_ext4/qt5$Can anybody explain why?
-
[quote author="allenck" date="1369345509"].moc/release-shared/moc_qactiongroup.cpp:15:2: error: #error “This file was generated using the moc from 5.1.0. It”
.moc/release-shared/moc_qactiongroup.cpp:16:2: error: #error “cannot be used with the include files from this version of Qt.”[/quote]It looks like you have multiple versions of Qt in your environment. Remove the older one from your PATH, clean your build tree (i.e. delete all the files that have been compiled so far), and try again.Also, what compiler are you using? How did you configure + build Qt?
-
Thanks. I checked the requirements as it pertained to environment variables but didn't check the path. Undoubtedly that is the reason as the compile seems to be working OK, so far, on another machine.
The compiler is g++ and I was using these configuration settings:
./configure -prefix $PWD/qtbase -opensource -nomake tests -system-sqlite -plugin-sql-sqlite -plugin-sql-odbc -plugin-sql-mysql -nomake demo -nomake examples -
I am building from source on Windows with VS2012.
I update the sources from git using the command:
qtrepotools\bin\qt5_tool -p --Branch stable
The problem occurs because the headers in qtbase\include don't get updated when I 'nmake' and those include files are in the include path for each of the subdirectories.
Any idea what I need to do to get the sources to build after updating?
If I make clean, run configure again, and nmake everything works. But it would be better if I didn't have to take those steps every time.
-
[quote author="cmeyer" date="1375727141"]If I make clean, run configure again, and nmake everything works.[/quote]Hi,
That IS the expected procedure. configure performs some bootstrapping and builds a small subset of qtbase.git, which is then used to build the rest of Qt. After you update the code, you have to re-bootstrap (i.e. rerun configure)
You can simplify things by writing a Batch file to run configure with the options you want.
-
[quote author="JKSH" date="1375750792"][quote author="cmeyer" date="1375727141"]If I make clean, run configure again, and nmake everything works.[/quote]Hi,
That IS the expected procedure. configure performs some bootstrapping and builds a small subset of qtbase.git, which is then used to build the rest of Qt. After you update the code, you have to re-bootstrap (i.e. rerun configure)[/quote]
Actually I tried the reconfigure and it still fails. What does work is doing the "really clean" clean, then configure and rebuild:
git submodule foreach --recursive "git clean -dfx"
Maybe the mistake I made this time was not cleaning before updating from the repository. Ugh. And now I'm stuck in some strange state that requires a "really clean" clean and rebuild.
-
sudo apt-add-repository ppa:u-szeged/sedkit && sudo apt-get update && sudo apt-get install sedkit-env-qtwebkit in ubuntu gives me the following errors:
W: Failed to fetch http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/raring/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Am i making some newbie linux mistake or is this method currently broken?
Thanks,
Rich
-
[quote author="rockdemon" date="1376560830"]W: Failed to fetch http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found[/quote]It looks like U-Szeged Team has become inactive. They only created packages up till Ubuntu 12.10 (Quantal Quetzal): http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/ Unfortunately that means you can't use this method for Ubuntu 13.04 (Raring Ringtail)
[quote author="bitu" date="1376896656"]I had to give root permission to run this script & fix this issue.
But why it is required to give root permission to run script that is present inside my working directory[/quote]What script, for what issue?Did you remember to give it execution permissions? (chmod +x, or right-click -> Properties -> Permissions -> Execute) No script is allowed to run unless they have been given permission.
-
thanks for the info :)
I got it working the manual way so all good in the end :)
Cheers,
Rich
[quote author="JKSH" date="1377003458"][quote author="rockdemon" date="1376560830"]W: Failed to fetch http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/raring/main/binary-amd64/Packages 404 Not Found[/quote]It looks like U-Szeged Team has become inactive. They only created packages up till Ubuntu 12.10 (Quantal Quetzal): http://ppa.launchpad.net/u-szeged/sedkit/ubuntu/dists/ Unfortunately that means you can't use this method for Ubuntu 13.04 (Raring Ringtail)
[quote author="bitu" date="1376896656"]I had to give root permission to run this script & fix this issue.
But why it is required to give root permission to run script that is present inside my working directory[/quote]What script, for what issue?Did you remember to give it execution permissions? (chmod +x, or right-click -> Properties -> Permissions -> Execute) No script is allowed to run unless they have been given permission.[/quote]
-
In the Issues section at the end, one helpful hint may be to describe the error where configure fails on MacOS when certain brew or port packages have been installed with a message that says that no XCB lib found, like this:
Running configuration tests...
The test for linking against libxcb and support libraries failed!
You might need to install dependency packages, or pass -qt-xcb.
See src/plugins/platforms/xcb/README.The easy workaround is to pass -no-pkg-config to configure.
See also this patch which has not yet been accepted: