[Interest] Qt 5.5.1 Error when building dbus support

Paulo Caetano paulo.a.o.caetano at gmail.com
Wed Nov 11 12:12:11 CET 2015


On Fri, Nov 6, 2015 at 1:56 PM,  <interest-request at qt-project.org> wrote:
> ---------- Forwarded message ----------
> From: Paulo Caetano <paulo.a.o.caetano at gmail.com>

As promised, here is the follow-up.

The workaround worked. I then ran ths command on gdb:
------------- BEGIN
/mnt/Data/devel/source/qt/build.exp/qtbase/bin/qmake
/mnt/Data/devel/source/qt/qt5/qtbase/src/dbus/dbus.pro -o Makefile
------------- END

However, there were too many variables eliminated by optimization, and
it was hard figuring out what was happening. E.g., on void
MakefileGenerator::setProjectFile(QMakeProject *p), on this check
------------- BEGIN
    if (project->isActiveConfig("win32"))
        target_mode = TARG_WIN_MODE;
    else if (project->isActiveConfig("mac"))
        target_mode = TARG_MAC_MODE;
    else
        target_mode = TARG_UNIX_MODE;
------------- END

I was getting TARG_MAC_MODE, instead of the TARG_UNIX_MODE I expected,
especially because on MakefileGenerator *
MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
------------- BEGIN
    if(gen.isEmpty()) {
...
    } else if(gen == "UNIX") {
        mkfile = new UnixMakefileGenerator;
    } else if(gen == "MINGW") {
        mkfile = new MingwMakefileGenerator;
    } else if(gen == "PROJECTBUILDER" || gen == "XCODE") {
------------- END

I got a mkfile = new UnixMakefileGenerator, as expected.

So, I decided to run configure with -no-optimized-qmake, and try
again. And I've got errors on elementar functionality, e.g., this:
------------- BEGIN
/mnt/Data/devel/source/qt/qt5/qtbase/mkspecs/features/qt_module_pris.prf:136:
Cannot write file /mkspecs/modules-inst/qt_lib_dbus.pri: Cannot create
parent directory
Project ERROR: Aborting.
------------- END

or this:
------------- BEGIN
QFileSystemEngine::currentPath () at
/mnt/Data/devel/source/qt/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:760
760        qWarning("QFileSystemEngine::currentPath: getcwd() failed");
------------- END

So, I became even more suspicious of my environment, and decided to
step back and run a more systematic test suite, which got me the
results below on dbus support:

                        -optimized-qmake  -no-optimized-qmake
Custom GCC           Failed                       Failed
Fedora GCC            Failed                       Success

If we discount my custom environment (back to the drawing board for
me), I've apparently hit some issue with my configuration options and
-optimized-qmake.

This makes more sense. Since the default is -no-optimized-qmake, it
could explain why most people never get hit by this. Most "Qt-building
recipes" I found on the web just take the default, and I've only used
-optimized-qmake because I found it on Fedora's package source and
decided to give it a try.

I'll leave it at that, for now.

Thanks for the help.

Paulo Caetano
http://cidebycide.blogspot.pt/



More information about the Interest mailing list