Skip to content

[WIN] arduino-builder doesn't walk a path with directory junctions #90

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
facchinm opened this issue Jan 8, 2016 · 6 comments
Closed

Comments

@facchinm
Copy link
Member

facchinm commented Jan 8, 2016

from @thewknd - arduino/Arduino#4402

With Arduino 1.6.7 on Windows 7 I've been unable to verify/upload when the folder for the custom libraries (Documents\Arduino\libraries) contains a directory junction. (I use directory junctions to switch between different library versions)

Error message:

C:\arduino167\arduino-builder -dump-prefs -logger=machine -hardware "C:\arduino167\hardware" -tools "C:\arduino167\tools-builder" -tools "C:\arduino167\hardware\tools\avr" -built-in-libraries "C:\arduino167\libraries" -libraries "C:\Users\thewknd\Documents\Arduino\libraries" -fqbn=arduino:avr:uno -ide-version=10607 -build-path "C:\Users\thewknd\AppData\Local\Temp\buildf861fa3b4440ac4767ab26e18e654c6c.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\thewknd\AppData\Local\Temp\untitled175997220.tmp\sketch_jan08a\sketch_jan08a.ino"
    readlink C:\Users\thewknd\Documents\Arduino\libraries\test: The system cannot find the file specified.

   Error compiling.

test is the directory junction, created with

MKLINK /J "C:\Users\thewknd\Documents\Arduino\libraries\test" "C:\Users\thewknd\Documents\test" 

With Arduino 1.6.5r5 everything was fine (didn't use 1.6.6)

@facchinm
Copy link
Member Author

facchinm commented Jan 8, 2016

The problem arises because the Filepath.Walk golang function does not traverse links. This has been resolved for UNIX systems but not for Win

@facchinm
Copy link
Member Author

facchinm commented Feb 5, 2016

This issue can be solved by patching go sources with golang/go@5717385
Tested on Win7 VM, works correctly if the junction has the same name of the origin
@cmaglie

@thewknd
Copy link

thewknd commented Mar 10, 2016

This problem is fixed for me with Arduino 1.6.8. (Win7 64 bit)

works correctly if the junction has the same name of the origin

In my use case the junction and the origin have the same name. But it is true, with different junction and origin names, the build process fails with

open C:\Users\thewknd\Documents\Arduino\libraries\test: The system cannot find the file specified.

@facchinm
Copy link
Member Author

Glad it worked. Closing as the main problem is solved, and the side problem will be solved by a golang update hopefully 😄

@rcarmo
Copy link

rcarmo commented Oct 22, 2017

I'm having this issue with IDE 1.8.5 on Windows 10 Fall Creators Update. I've tried both the standalone installer and the Windows Store app, and I can't compile anything that lives inside OneDrive (or, as it turns out, even inside some folders inside Documents - some work, some don't. Moving the sketch folder to the root of the C: drive magically fixes the problem, and it took me quite a while to figure out that junctions were involved.

@matthijskooijman
Copy link
Collaborator

I wanted to reopen this issue, but decided to open a new issue (#254) instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants