I am trying to get the Qt Calculator Form example compiling using boost-build

This is my Jamfile:

using qt5 : /sdk/Qt5.4.0/5.4/gcc_64 : : <link>shared ;

exe calculator_form
:    [ glob *.cpp *.ui calculatorform.h ]
    /qt5//QtWidgets
;

This results in the following moc command being issued:

/sdk/Qt5.4.0/5.4/gcc_64/bin/moc -f calculatorform.h -o bin/gcc-4.9.2/debug/threading-multi/moc_calculatorform.cpp @"bin/gcc-4.9.2/debug/threading-multi/moc_calculatorform.cpp.rsp"

This call will hang indefinitely.

It seems the issue is due to the -f flag. If I edit the moc action in qt5.jam to remove the -f, then it works

That is, I edit this:

actions moc
{
    $(.BINPREFIX[-1])/moc -f $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
}

so it looks like this (note missing -f):

actions moc
{
    $(.BINPREFIX[-1])/moc $(>) -o $(<) @"@($(<).rsp:E=-D$(DEFINES)$(.nl) -I$(INCLUDES:T)$(.nl))"
}

Related issues:

http://lists.boost.org/boost-build/2014/01/27303.php
http://lists.boost.org/boost-build/2014/01/27305.php
https://bugreports.qt.io/browse/QTBUG-33749

Is this a bug in boost-build, or am I doing something incorrectly?

TIA
Steve