[Scons-users] QT4 tool.

Dirk Bächle tshortik at gmx.de
Tue Jun 3 13:22:41 EDT 2014


Hi Leandro,

On 03.06.2014 16:47, Leandro Moreno wrote:
> Hello SCons list!
>
> I have integrated the SCons tool to my software (fbuild 
> https://bitbucket.org/fudepan/fudepan-build). And I have the following 
> problem:
>
> My tool search the file to compile as the QT4 tool. So, Scons tell me 
> that I have two ways to compile something:
>
> Example:
> scons: warning: Two different environments were specified for target 
> build/.../moc_qtStepsPathWidget.cc,
>     but they appear to have the same action: $QT4_MOC $QT4_MOCDEFINES 
> $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE
> File 
> "/home/moreno/fudepan-build/site_scons/site_tools/qt4/__init__.py", 
> line 203, in __automoc_strategy_simple
>
> scons: warning: Two different environments were specified for target 
> build/.../moc_qtStepsPathWidget.o,
>     but they appear to have the same action: $CXX -o $TARGET -c 
> $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
> File 
> "/home/moreno/fudepan-build/site_scons/site_tools/qt4/__init__.py", 
> line 215, in __automoc_strategy_simple
>
> So, the tool and fbuild define the same way to compile (or that is 
> what I could see). The problem is when through fbuild I add another 
> flag, like "--coverage".
>
> scons: warning: Two different environments were specified for target 
> build/.../moc_qtMapDrawer.cc,
>     but they appear to have the same action: $QT4_MOC $QT4_MOCDEFINES 
> $QT4_MOCFROMHFLAGS $QT4_MOCINCFLAGS -o $TARGET $SOURCE
> File 
> "/home/moreno/fudepan-build/site_scons/site_tools/qt4/__init__.py", 
> line 203, in __automoc_strategy_simple
>
> scons: *** Two environments with different actions were specified for 
> the same target: build/.../moc_qtMapDrawer.o
> File 
> "/home/moreno/fudepan-build/site_scons/site_tools/qt4/__init__.py", 
> line 215, in __automoc_strategy_simple
>
> There, Scons cannot decide which action take. So, It fails.
>
you pretty much hit the nail on the head with this assumption. In your 
current build setup you are apparently telling SCons to create the same 
target "moc_qtMapDrawer.cc" twice. This is only a Warning as long as the 
environment is the same, but you can't create the same target in the 
same build from two (or more) environments having different settings.
You have to find the place where you add the source file 
"qtMapDrawer.cc" a second time, and correct it.
Setting the "QT4_DEBUG" flag will print some info about the "automoc" 
process, so this might help you to detect when the MOC is called a 
second time for your file(s).

I hope this helps you a little further.

Best regards,

Dirk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140603/1888e2f2/attachment-0001.html>


More information about the Scons-users mailing list