[Scons-users] Trouble Finding GCC

Mats Wichmann mats at wichmann.us
Mon Sep 16 17:39:23 EDT 2024


On 9/16/24 12:06, Waqar, Faaiq G wrote:
> Thank you for your response, and making me aware of this question from the FAQ.
> So the gcc I am using is located in is /usr/bin/gcc. I added the following lines to my SConscript based my rudimentary understanding of the FAQ solution:
> 
> main = Environment(tools=[
>          'default', 'git', TempFileSpawn, EnvDefaults, MakeActionTool,
>          ConfigFile, AddLocalRPATH, SwitchingHeaders, TagImpliesTool, Blob
>      ])
> 
> ->main.AppendENVPath('PATH', '/usr/bin/gcc')
> ->main.Tool("gcc")
> 
> main.Tool(SCons.Tool.FindTool(['gcc', 'clang'], main))
> main.Tool(SCons.Tool.FindTool(['g++', 'clang++'], main))
> 
> I am still running into the issue, I assume because I am not using this correctly. Any advice? Thank you again for your time
> -----Original Message-----
> From: Mats Wichmann <mats at wichmann.us>
> Sent: Monday, September 16, 2024 1:54 PM
> To: SCons users mailing list <scons-users at scons.org>; Waqar, Faaiq G <faaiq.waqar at gatech.edu>
> Subject: Re: [Scons-users] Trouble Finding GCC
> 
> [You don't often get email from mats at wichmann.us. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> On 9/16/24 11:51, Waqar, Faaiq G wrote:
>> Hello Scons Community,
>>
>> I am working on the tool Gem5, working within a container (using
>> Apptainer) to set up all necessary dependencies. Within my SConscript
>> file, I have the following lines
>>
>> main.Tool(SCons.Tool.FindTool(['gcc', 'clang'], main))
>>
>> main.Tool(SCons.Tool.FindTool(['g++', 'clang++'], main))
So I looked at my gem5 checkout here - a few folks have popped up on 
this list or on the SCons Discord with questions previously.  Lines 
you've quoted are right from the gem5 SConstruct, so I'm actually kind 
of guessing that someone at the project knows about this.  As outsiders 
(to gem5), we don't really know why they're doing things this way, but 
it shouldn't be causing you problems unless your install is somehow 
strange - this working for lots of people, I assume.

main = Environment(tools=[
         'default', 'git', TempFileSpawn, EnvDefaults, MakeActionTool,
         ConfigFile, AddLocalRPATH, SwitchingHeaders, TagImpliesTool, Blob
     ])

main.Tool(SCons.Tool.FindTool(['gcc', 'clang'], main))
main.Tool(SCons.Tool.FindTool(['g++', 'clang++'], main))





More information about the Scons-users mailing list