Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Problem accessing gcc(Eclipse modifies folder name)
Problem accessing gcc [message #1836301] Mon, 28 December 2020 17:57 Go to next message
Alan Rouse is currently offline Alan RouseFriend
Messages: 14
Registered: July 2009
Junior Member
Until recently I have been using Eclipse 2018 for C/C++ with 2018 versions of gcc-arm-eabi, OpenOCD and gnu. Building the tools was a bit convoluted but I have documented the required sequence, and I have saved the various components needed.

I am now trying to update to use current versions of the tools. I am impressed that Eclipse now incorporates some of the required add-ons, like Java. However, I struggled initially to install OpenOCD, gnu and gcc but I eventually mastered xpm. and added them as xpacks.

I have updated the paths in Window>>Preferences and Project>>Properties to point to the xpack folders. However, when I try to build the project it reports:
Error: Program "make" not found in PATH
PATH=[C:/Users/L-G/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin/server;C:/Users/L-G/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.1.v20201027-0507/jre/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\WinZip;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\nodejs\;C:\Users\L-G\AppData\Local\Microsoft\WindowsApps;C:\Users\L-G\AppData\Roaming\npm;C:\eclipse]

It apparently hasn't included the paths configured in Window>>Preferences or Project>>Properties. I found a workaround by adding the path ...xPacks\@gnu-mcu-eclipse\windows-build-tools\2.12.1-1\.content\bin in Project>>Properties>>C/C++ Build>>Environment.

However, although the builder now runs my Makefile it fails each time it calls gcc with the following message:
..../xpacks/@gnu-mcu-eclipse/windows-build-tools/2.12.1-1/.content/bin/sh: arm-none-eabi-gcc: not found


Eclipse has added /sh to the folder, which means it can't find gcc. I can't find anything in the configuration to explain why.

How can I correct this?
Re: Problem accessing gcc [message #1836310 is a reply to message #1836301] Mon, 28 December 2020 21:42 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Eclipse didn't add the /sh -- make did.
It's the default shell used by make
and it can't find arm-none-eabi-gcc

Here's an example
Invoking: GCC C++ Compiler
g++-bad -std=c++17 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/TestIncludes.d" -MT"src/TestIncludes.o" -o "src/TestIncludes.o" "../src/TestIncludes.cpp"
/bin/sh: g++-bad: command not found
make: *** [src/subdir.mk:20: src/TestIncludes.o] Error 127

You should avoid using relative paths for things like compilers.
The path will be relative to the current directory when running make.
It may not be what you expect.

Try setting the compiler command path in the Cross Compile settings if you are using an Eclipse Managed Build. Otherwise, fix your makefile.
index.php/fa/39625/0/

[Updated on: Mon, 28 December 2020 22:06]

Report message to a moderator

Previous Topic:Can I "Upload file" from clipboard ?
Next Topic:no (path) in problems window list
Goto Forum:
  


Current Time: Sat Apr 27 03:45:22 GMT 2024

Powered by FUDForum. Page generated in 0.03630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top