Skip to content

Programs in the path might conflict with external builder #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Spongman opened this issue Jun 5, 2016 · 15 comments
Closed

Programs in the path might conflict with external builder #472

Spongman opened this issue Jun 5, 2016 · 15 comments
Labels
domain: build The build does not work as the Arduino IDE. domain: configuration Configuring Sloeber does not work as docummented importance: usability OS: windows status: fixed in 4.0

Comments

@Spongman
Copy link

Spongman commented Jun 5, 2016

fresh install of mars.2, fresh install of plugin v3.

"we have found programs in the path that might conflict with our external builder.
The conflicting programs are bash and sh.
The program might still function but if you get strange build errors you know where to look"

eclipse just quits after this.

what now?

@Spongman Spongman closed this as completed Jun 5, 2016
@gerhil
Copy link

gerhil commented Aug 24, 2016

I have the same problem. What was the fix?

@rlogiacco
Copy link
Collaborator

@Wazalogic I believe @jantje was referring to the fact you closed the issue...
In any case, as the message says, both bash and sh are creating problems to the build, though they have not been reported as making Eclipse crash.
First advice I can give you is to identify the software which added bash or sh to your system path and see if you can temporarily or permanently eliminate that path inclusion: if you can, just do it and try again.

@wimjongman wimjongman changed the title installing the plugin killed my eclipse Programs in the path might conflict with external builder Oct 31, 2016
@wimjongman
Copy link
Member

wimjongman commented Oct 31, 2016

This is still a problem and is very common. Everyone that has GIT installed will run into this issue.

With some help of the net [1] I have "created" a batch script that I use to start Sloeber. Copy this script, call it sloeber.cmd and put it next to the sloeber-ide.exe:

@echo off
setlocal EnableDelayedExpansion
set path
set $line=%path%
set $line=%$line: =#%
set $line=%$line:;= %
set $line=%$line:)=^^)%

REM Here we filter all dirs with "Git" in the name. 
for %%a in (%$line%) do echo %%a | find /i "Git" || set $newpath=!$newpath!;%%a
set $newpath=!$newpath:#= !
set $newpath=!$newpath:^^=!
set path=!$newpath:~1!

REM Run Sloeber, Run!
sloeber-ide.exe

[1] http://stackoverflow.com/questions/21289762/remove-unwanted-path-name-from-path-variable-via-batch#21292905

@jantje
Copy link
Member

jantje commented Oct 31, 2016

@wimjongman
If this is a good solution shouldn't we add this to the product download?

@beniloew
Copy link

Same here.
I have bot GIT and MinGW installed

@jantje
Copy link
Member

jantje commented Oct 31, 2016

This code removes both git and mingw from the path before starting Sloeber

@echo off
setlocal EnableDelayedExpansion
set path
set $line=%path%
set $line=%$line: =#%
set $line=%$line:;= %
REM here we replace mingw with git
set $line=%$line:Mingw=git%
set $line=%$line:)=^^)%

REM Here we filter all dirs with "Git" in the name. 
for %%a in (%$line%) do echo %%a | find /i "git" || set $newpath=!$newpath!;%%a
set $newpath=!$newpath:#= !
set $newpath=!$newpath:^^=!
set path=!$newpath:~1!

REM Run Sloeber, Run!
sloeber-ide.exe

@wimjongman wimjongman reopened this Oct 31, 2016
jantje added a commit that referenced this issue Oct 31, 2016
@beniloew
Copy link

beniloew commented Nov 1, 2016

This indeed solves the issue.
Thanks a lot!

@jantje jantje added importance: usability OS: windows domain: configuration Configuring Sloeber does not work as docummented domain: build The build does not work as the Arduino IDE. labels Nov 1, 2016
@wimjongman
Copy link
Member

Would tinkering with system property java.library.path work?

-Djava.library.path=some/path

@jantje
Copy link
Member

jantje commented Nov 3, 2016

-Djava.library.path=some/path

As far as I can see this is the java library path and it is not related to the system path

@tomkcook
Copy link

tomkcook commented Dec 1, 2016

This issue has got a lot worse since Microsoft released Windows Subsystem for Linux, which puts a bash.exe in C:\Windows\System32. It's not clear what can be done; it definitely breaks builds (it's a 'proper' Linux bash, so doesn't understand backslashes in paths - I get build errors such as .librariesSPIsrcSPI.cpp.o: No such file or directory which has clearly had the backslashes removed) and removing system32 from the system path is not really a viable option.

Any suggestions?

@jantje
Copy link
Member

jantje commented Dec 1, 2016

I have no idea right now. I need to look closer into the issue and it is pretty far away from my comfort zone ;-).
What I do know:
Sloeber does not call bash or sh directly. As the problem happens during build I guess it is make that does it.
Maybe another make would fix the issue or adding a good bash/sh in the path.

Note: I don't add make to the path. The default make command is ${JANTJE.MAKE_LOCATION}make on non-windows os'es ${JANTJE.MAKE_LOCATION} resolves to nothing on windows it resolves to the correct location.

@jantje
Copy link
Member

jantje commented Dec 1, 2016

Replacing the make of the one delivered with mingw32 seems to fix the issue :-)

@tomkcook
Copy link

tomkcook commented Dec 2, 2016

I've also found that starting eclipse from an environment that doesn't include system32 or mingw also works.

@jantje
Copy link
Member

jantje commented Dec 2, 2016

V4 no longer downloads make.exe from a ftp site but from a zip file from my site. This means I have more control over the content after releasing.
V4 still contains the warning message but it should no longer experience the problem.
We should start testing V4 :-)

@jantje
Copy link
Member

jantje commented Dec 6, 2016

Seems the mingw make has problems with the defines with spaces. Those boards won't work untill I fixed the make file generator.

jantje pushed a commit that referenced this issue Dec 8, 2016
I have changed the environment variables so that both codan and make use
the same commands.
@jantje jantje closed this as completed Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: build The build does not work as the Arduino IDE. domain: configuration Configuring Sloeber does not work as docummented importance: usability OS: windows status: fixed in 4.0
Projects
None yet
Development

No branches or pull requests

7 participants