[Scons-users] QT4 tool.

Leandro Moreno leandro.moreno at tallertechnologies.com
Thu Jun 5 13:17:47 EDT 2014


Thanks Dirk! I resolved the problem. I used QT4_AUTOSCAN to dissable one of
the both calls. The QT_DEBUG variable helps me a lot.

Thanks!


On Tue, Jun 3, 2014 at 2:22 PM, Dirk Bächle <tshortik at gmx.de> wrote:

>  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
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>


-- 
<http://www.tallertechnologies.com>
Leandro Moreno
Intern Engineer

San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina

Phone: +54 351 4217888 / +54 351 4218211
Skype: letossgm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20140605/b642cf23/attachment-0001.html>


More information about the Scons-users mailing list