Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt5 development primer



  • I certainly don't see this stated in the wiki page, but it seems to me that flex is required whenever using Angle… This was in a build of qtbase only, so I'm pretty sure it wasn't a webkit option that caused this build failure:

    win_flex --noline --nounistd --outfile=Tokenizer.cpp ........\3rdparty\angle\src\compiler\preprocessor\Tokenizer.l
    'win_flex' is not recognized as an internal or external command,



  • I'm trying to build Qt 5 from git with Visual Studio 2008.
    My os is Windows Vista SP2

    The configuration seems to be ok, but I have a strange problem in the building (nmake): the first time that rcc is used (with mimetypes.qrc), it crashes, so the building can't continue.
    I've tried to run rcc manually. If there is some error in the qrc file (eg some file missing) it correcly outputs the error. Instead if it's all right, it crashes.

    I also tried to compile the source taken from the zip in the downolad page, but I have the same result.

    I don't know what I have to do to better understand the problem.



  • Adding some debug lines in the rcc.cpp code I've found that the problem is the function "qCompress()".
    So I added the -qt-zlib option to the configure tool, and now seems to work!

    So my question now is why the system zlib cause this problem? I have installed the 7.0 version of the Windows SDK, maybe the 7.1 is needed.
    The guide indicates a generic Windows SDK 7 version for Visual Studio 2008...

    Now I'm going to build all and I hope that it works!


  • Moderators

    What compiler was your system Zlib compiled with?



  • [quote author="JKSH" date="1389219853"]What compiler was your system Zlib compiled with?[/quote]

    I don't know... And I don't know how to know :)


  • Moderators

    [quote author="puffosauro" date="1389252183"][quote author="JKSH" date="1389219853"]What compiler was your system Zlib compiled with?[/quote]

    I don't know... And I don't know how to know :)[/quote]Windows doesn't come with zlib, so if you didn't build zlib yourself, it doesn't exist on your system (unless something else installed it).

    I'm guessing something else installed zlib on your system, and that version is incompatible with MSVC 2008. (Another possibility is, there's no zlib on your system but configuration utility thought you did)



  • Hello. I built qt5 on my Gentoo machine and tried to run one of its tools (designer, for instance) but it failed. No GUI is shown but process runs. Later, I connected to machine through ssh with X forwarding, executed designer and it ran well, GUI was shown. Thanks



  • There is a nice shortcut for installing build dependencies for qt5 on ubuntu/debian based systems.

    sudo apt-get build-dep qt5-default

    I'm not exactly sure where to put this tip in the wiki page though.


  • Moderators

    [quote author="ezust" date="1412525485"]There is a nice shortcut for installing build dependencies for qt5 on ubuntu/debian based systems.

    sudo apt-get build-dep qt5-default

    I'm not exactly sure where to put this tip in the wiki page though.
    [/quote]Here's a good place: http://qt-project.org/wiki/Building_Qt_5_from_Git (It's a rather massive page though, so read through the whole thing first to find the best place to put yours)



  • Hi!

    I got http://download.qt-project.org/development_releases/qt/5.4/5.4.0-beta/single/qt-everywhere-opensource-src-5.4.0-beta.tar.xz

    When I compile I got errors:

    .obj/qsqldatabase.o:qsqldatabase.cpp:function QSqlDatabasePrivate::database(QString const&, bool): error: undefined reference to ‘QDebug::~QDebug()’

    .obj/qsqlfield.o:qsqlfield.cpp:function operator<<(QDebug, QSqlField const&): error: undefined reference to ‘QDebug::~QDebug()’

    .obj/qtestlog.o:qtestlog.cpp:function QTest::messageHandler(QtMsgType, QMessageLogContext const&, QString const&): error: undefined reference to ‘qFormatLogMessage(QtMsgType, QMessageLogContext const&, QString const&)’

    .obj/qnetworkaccessbackend.o:qnetworkaccessbackend.cpp:function QNetworkAccessBackend::createUploadByteDevice(): error: undefined reference to ‘QNonContiguousByteDeviceFactory::createShared(QSharedPointer<QRingBuffer>)’

    what can help here?

    I build qt for MX6 SOC.

    My config is

    @unset QTDIR
    export PATH="$PWD/qtbase/bin:$PWD/qtrepotools/bin:$PATH"
    export LIBS="$PWD:$LIBS"

    ./configure -opensource -confirm-license
    -device imx6
    -device-option CROSS_COMPILE=/usr/local/linaro-toolchain/bin/arm-linux-gnueabihf-
    -no-pch
    -no-opengl
    -no-xcb
    -opengl es2
    -make libs
    -nomake examples
    -nomake tests
    -sysroot /home/work/fs -no-gcc-sysroot
    -prefix /opt/qt5
    -v@



  • Hello.

    I am trying to build Qt 5.4.1 on CentOS 5.10. Unfortunately I got stuck on step:

    yum install libxcb libxcb-devel xcb-util xcb-util-devel

    Error:

    sudo yum install libxcb libxcb-devel xcb-util xcb-util-devel
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile



  • This post is deleted!


  • @werispaul did you found a solution to this compiling error: "QtGui/QPlatformDialogHelper": No such file or directory?
    I have similar problem with missing headers, when compiling Qt from git.



  • This post is deleted!


  • I try build Qt 5.12 on my Ubuntu 18 with X11 on OrangePi 4 like here
    Qt soures are on qt5 folder
    build folder is parallel qt5
    I use
    cd build
    sudo ../configure -developer-build -opensource -nomake examples -namake tests -confirm-licence -skip webengine -v

    And there are errors like failed to create symbolic link 'libreduce_exports.so': Operation not permitted

    But I use sudo... Also I try use sudo su. The same. Is this error because of FAT32 file system for my qt5 and build folders?
    After make -j 4 I got build/qtbase/lib/libQt5Core.so No such file or directory


  • Lifetime Qt Champion

    @DungeonLords Why do you use FAT32 on Linux?
    You should not use sudo at all - put Qt sources and build folder in your home directory.



  • Hi,
    About this page: https://wiki.qt.io/Building_Qt_5_from_Git

    • For openSUSE (I'm on Leap 15), I had to install more software than the one listed (sudo zypper install git-core gcc-c++ make), they are llvm-devel clang clang-devel mozilla-nss-devel (not sure for clang if just clang is needed or just clang-devel or both),
    • And just out of curiosity, is there a reason why weneed run configure with ../qt5/configure and not just ./configure ?

    Thanks


  • Lifetime Qt Champion

    @Gluttony said in Qt5 development primer:

    And just out of curiosity, is there a reason why weneed run configure with ../qt5/configure and not just ./configure ?

    It is better to do out of source builds to not to pollute source tree with build artefacts.



  • I proposed a few edits over on the wiki to clarify the business about parallel directories and shadow builds, because I found the instructions very confusing. I now think it needs yet another edit, and I wanted to run it by this forum.

    If you follow the instructions about creating a build directory that is parallel to the source directory, you end up with two directories both in home: (1) ~/qt5, which holds the source (per the git clone instructions on the page, and (2) ~/qt5-build (or something like that), in which the source is built. Number (2) is not explicit in the existing instructions, but it has to be the intention, otherwise the command given for running configure, namely ../qt5/configure, would not work.

    But if you build Qt inside your home directory, then when you try to run qmake naked at a prompt, you get an error:

    qmake: could not exec '/usr/lib/qt5/bin/qmake': No such file or directory

    The error makes sense, because if we followed directions, we didn't build Qt into /usr/lib/qt5, but instead into ~/qt5-build (or something like it). So to run qmake, we need to provide the full path (or change the PATH environment variable).

    My question: Am I missing something? If I'm not, then I think that the wiki should be further edited to make this point about the path. But I hesitate to make yet another edit in case I am missing something. If anyone can shed some light either way, please do. If I'm right, I'll just edit the wiki page.


  • Lifetime Qt Champion

    @bhagerty hi and welcome to devnet,

    What using a custom build of Qt: always use the full path to qmake. You may have the one provided by your distribution installed which will be the one invoked. One other thing you did not take into account is unless you are doing a developer build (because you want to hack on Qt) you have to call 'make install' as last step.


Log in to reply