Re: Trouble Finding GCC
"Waqar, Faaiq G" <[email protected]> Mon, 16 Sep 2024 18:06:40 +0000
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <SA1PR07MB10051F514758658168B53E63498602@SA1PR07MB10051.namprd07.prod.outlook.com> |
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 <[email protected]>
Sent: Monday, September 16, 2024 1:54 PM
To: SCons users mailing list <[email protected]>; Waqar, Faaiq G <[email protected]>
Subject: Re: [Scons-users] Trouble Finding GCC
[You don't often get email from [email protected]. 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))
>
> 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?