[Scons-users] FW: how to execute Clang static analyzer perlscript instead of gcc.exe on Mingw/MSYS

Bill Deegan bill at baddogconsulting.com
Fri Apr 12 14:08:53 EDT 2013


Dennis,

I've not tried myself, but setting a non cmd.exe as the shell on win32
platforms seems to be tricky.
It may be that we need a mingw platform.

I know there's been a lot of talk (and work) about/on re-architecting the
tools and platforms logic in SCons.


You're problem may be related to your env['PATH'] being win32 notation, and
then using mingw bash?
In mingw bash what does your PATH typically look like?

-Bill



On Fri, Apr 12, 2013 at 9:58 AM, Dennis Cote <DennisC at harding.ca> wrote:


> ** **

>

> Any idea why the #! Line is being ignored?****

>

> ** **

>

> Following up on my last post, I tried setting the Scons SHELL environment

> variable to “bash” based on this description in the Scons man page. ****

>

> ** **

>

> SHELL****

>

> A string naming the shell program that will be passed to the *$SPAWN* function.

> See the *$SPAWN* construction variable for more information.****

>

> ** **

>

> ** **

>

> My environment is now****

>

> ** **

>

> env = Environment(ENV = {'PATH' : os.environ['PATH']},****

>

> tools = ['mingw'], ****

>

> SHELL = 'bash',****

>

> CC='ccc-analyzer', ****

>

> CFLAGS=flags, CPPDEFINES=defs)****

>

> ** **

>

> I now get a different error message from Scons ****

>

> ** **

>

> scons: Building targets ...****

>

> ccc-analyzer -o build\DXL\GoAheadWeb\asp.o -c -Wall -include builtin.h -I.

> -DNU_MMU_MODE=0 -DNU_MODULE_SUPPORT=1 -DNU_SUPERV_USER_MODE=1 -DNU_DEBUG=1

> -DXL_DEBUG_ENABLE=1 -DDXLIO_METHOD=DXLIO_TELNET -DENDIAN=0 -DNUDEBUG_MEMORY

> -D_SH4 -DUEMF -DWEBS -DNUCLEUS_NET -Ibuild\DXL\GoAheadWeb -Ibuild\ATI

> -Ibuild\DXL\Intercom\hdr -Ibuild\ATI\plus build\DXL\GoAheadWeb\asp.c****

>

> scons: bash: No such file or directory****

>

> scons: *** [build\DXL\GoAheadWeb\asp.o] Error 127****

>

> scons: building terminated because of errors.****

>

> ** **

>

> It looks like scons can’t find bash.****

>

> ** **

>

> I am also looking for the meaning of the Error 127 from scons.****

>

> ** **

>

> I added print statements to dump the PATH from the scons environment and I

> get the following:****

>

> ** **

>

> scons: Reading SConscript files ...****

>

> PATH:

> C:\MinGW\bin;.;C:\MinGW\msys\1.0\local\bin;C:\MinGW\msys\1.0\bin;c:\Perl64\site\bin;c:\Perl64\bin;c:\Program

> Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS

> Client\;c:\Windows\system32;c:\Windows;c:\Windows\System32\Wbem;c:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program

> Files\Intel\Intel(R) Management Engine Components\DAL;c:\Program

> Files\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files

> (x86)\Intel\Intel(R) Management Engine Components\DAL;c:\Program Files

> (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files

> (x86)\Intel\OpenCL SDK\2.0\bin\x86;c:\Program Files (x86)\Intel\OpenCL

> SDK\2.0\bin\x64;c:\Program Files (x86)\Altium Designer Summer

> 08\System;c:\Python27;c:\Python27\Scripts;c:\Program Files (x86)\CMake

> 2.8\bin;c:\gnuwin32\bin;c:\Program Files\Microsoft SQL

> Server\110\Tools\Binn\;c:\Program

> Files\TortoiseSVN\bin;c:\cmd_line_tools;c:\cmd_line_tools\AStyle\bin;c:\cmd_line_tools\mingw32-dw2\bin

> ****

>

> SHELL: bash****

>

> CC: ccc-analyzer****

>

> scons: done reading SConscript files.****

>

> scons: Building targets ...****

>

> ccc-analyzer -o build\DXL\GoAheadWeb\asp.o -c -Wall -include builtin.h -I.

> -DNU_MMU_MODE=0 -DNU_MODULE_SUPPORT=1 -DNU_SUPERV_USER_MODE=1 -DNU_DEBUG=1

> -DXL_DEBUG_ENABLE=1 -DDXLIO_METHOD=DXLIO_TELNET -DENDIAN=0 -DNUDEBUG_MEMORY

> -D_SH4 -DUEMF -DWEBS -DNUCLEUS_NET -Ibuild\DXL\GoAheadWeb -Ibuild\ATI

> -Ibuild\DXL\Intercom\hdr -Ibuild\ATI\plus build\DXL\GoAheadWeb\asp.c****

>

> scons: bash: No such file or directory****

>

> scons: *** [build\DXL\GoAheadWeb\asp.o] Error 127****

>

> ** **

>

> I have tried both “bash” and “bash.exe” for the SHELL and I get the same

> result.****

>

> ** **

>

> I can find bash here in the MSYS shell I use to run scons.****

>

> ** **

>

> $ which bash****

>

> /bin/bash.exe****

>

> ** **

>

> The /bin here corresponds to the path C:\MinGW\msys\1.0\bin from the PATH

> above.****

>

> ** **

>

> Any other ideas anyone can suggest?****

>

> ** **

>

> Thanks.****

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130412/0c34f461/attachment.htm>


More information about the Scons-users mailing list