As promised, here is the follow-up.
The workaround worked. I then ran ths command on gdb:
/mnt/Data/devel/source/qt/build.exp/qtbase/bin/qmake
/mnt/Data/devel/source/qt/qt5/qtbase/src/dbus/dbus.pro -o Makefile
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
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;
I was getting TARG_MAC_MODE, instead of the TARG_UNIX_MODE I expected, especially because on MakefileGenerator * MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
if(gen.isEmpty()) {
...
} else if(gen == "UNIX") {
mkfile = new UnixMakefileGenerator;
} else if(gen == "MINGW") {
mkfile = new MingwMakefileGenerator;
} else if(gen == "PROJECTBUILDER" || gen == "XCODE") {
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:
/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.
or this:
QFileSystemEngine::currentPath () at
/mnt/Data/devel/source/qt/qt5/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:760
760 qWarning("QFileSystemEngine::currentPath: getcwd() failed");
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
Custom GCC - Failed
Fedora GCC - Failed
-no-optimized-qmake
Custom GCC - Failed
Fedora GCC - 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.