[Scons-users] Trouble Finding GCC

Mats Wichmann mats at wichmann.us
Mon Sep 16 13:54:08 EDT 2024


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))
> 
> Which unfortunately throw the following error:
> 
> main.Tool(SCons.Tool.FindTool(['gcc', 'clang'], main))
> 
>    File "/usr/lib/python3/dist-packages/SCons/Environment.py", line 2033:
> 
>      tool(self)
> 
> I am able to run GCC outside this with no problems, and which gcc 
> returns the path to the version of gcc I am intending on using. I have 
> had no luck finding this issue online, so I was wondering if anyone 
> knows why this might be happening. I appreciate any insights you can 
> provide. Thank you!

Presumably this is an instance of one of the oldest problems in the 
book, with some notes here:

https://scons.org/faq.html#Why_doesn.27t_SCons_find_my_compiler.2BAC8-linker.2BAC8-etc..3F_I_can_execute_it_just_fine_from_the_command_line.


Where is your gcc located?


More information about the Scons-users mailing list