Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Using make under Eclipse varies from install to install(Using make under Eclipse varies from install to install)
Using make under Eclipse varies from install to install [message #1783029] Tue, 06 March 2018 22:46 Go to next message
Jamie Milliken is currently offline Jamie MillikenFriend
Messages: 2
Registered: March 2018
Junior Member
Several new engineers have installed Eclipse with GNU Tool ARM Embedded tool chain and GNU ARM Eclipse build tools. We also use our own custom Makefile. We noticed some people's installations would fail the make process even though they followed the same set of instructions.

Long story short - we tracked this down to the environment calling a bash shell instead of the Windows cmd shell. This is repeatable on all machines. I can build on the command line on machines that cannot build under Eclipse. Then I can open a git-bash shell and the same 'make all' command will fail. Likewise, on a machine that is able to build under Eclipse, I can repeat the same steps above at the command line and get the build to fail or succeed depending on the shell.

Ok, fine, we now have a workaround - create a project variable in Eclipse with the path to git-cmd.exe and it works just fine. But I would like to understand why this is needed on some machines but not others. In fact, the only reference to a shell that I can find is in the Preferences->Terminal->Local Terminal setting. But on my machine, this actual points to the _wrong_ shell (Git\bin\sh.exe), yet my build works just fine. I can't find any other place where Eclipse makes reference to the shell in which make should be executed. Any ideas?

Thanks,
Jamie
Re: Using make under Eclipse varies from install to install [message #1783193 is a reply to message #1783029] Fri, 09 March 2018 01:47 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
It's not clear from your post what is executing the shell: Eclipse or make.

If you mean Eclipse executing make with a shell, under Linux at least,
make is executed as its own process -- no shell.

If you mean make using a shell for recipes,
make uses the SHELL variable to select the shell but it's a bit complicated.
It's even more complicated under Windows.
https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html
Eclipse executes make and sets SHELL to its environment value when Eclipse is started.

If you look at Project --> C/C++ Build --> Variables and check Show System Variables
you should see SHELL

Why it would vary within your installations only you can answer.

If you mean something different than above, please clarify.



[Updated on: Sat, 10 March 2018 07:29]

Report message to a moderator

Re: Using make under Eclipse varies from install to install [message #1783641 is a reply to message #1783193] Wed, 14 March 2018 20:10 Go to previous messageGo to next message
Jamie Milliken is currently offline Jamie MillikenFriend
Messages: 2
Registered: March 2018
Junior Member
Thanks David. This is make using a shell for recipes under Windows 8. I will look into this resource and see if I can experiment a bit and add any other details.

-Jamie
Re: Using make under Eclipse varies from install to install [message #1783754 is a reply to message #1783641] Fri, 16 March 2018 15:36 Go to previous message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 35
Registered: September 2010
Member
This is why we locally manage an Eclipse Installation Package (containing java distribution), Program specific Eclipse Workspace & Projects. This eliminates the user installation variations.

This is not free or easy, but worth it!



Major System Configuration:
Windows 7 64-bit
Eclipse IDE for C/C++ Developers
v 4.6.2 (Neon)
v 4.7.3a (Oxygen)
v 4.8r (Photon)
v 2018_09

PyDev

MinGW
MSys
GNU Toolchain
Perforce
Previous Topic:_Please Delete; Photon 4.8m6 has C/C++ package
Next Topic:Synchronized Project files not updating, can not figure out why
Goto Forum:
  


Current Time: Fri Sep 20 06:53:43 GMT 2024

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

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

Back to the top