Baffled by readlink error

I'm a newbie, which might be part of the problem, but I've tried to do due diligence in debugging this myself.

I'm trying to use adafruit's library for their 16-channel PWM & Servo driver, but when I attempt to verify or upload their example programs pwmtest or servo I get the following error:

readlink C:\Users\paul\OneDrive\Documents\Arduino\libraries\Adafruit_PWMServoDriver\examples\pwmtest\pwmtest.ino: The system cannot find the file specified.

Error compiling for board Arduino/Genuino Uno.

I've verified that the address in the error is actually correct; the file is there. I can copy that address, paste it into windows file explorer, click on that file, attempt to verify, and I get the error that the file isn't there. :confused: Every other example file uploads just fine

I'm running the 1.8.5 Arduino IDE straight off the windows store on a windows 10 machine, and I'm using an uno.

To get the library I downloaded and renamed the file therein to Adafruit_PWMServoDriver and put that directory into C:\Users\paul\OneDrive\Documents\Arduino\libraries.

What the heck am I doing wrong?

Compiles fine for me. I get one warning because I have compiler warnings set to ALL. Try installing the library through Sketch->Include Library->Manage Libraries... It's called "Adafruit PWM Servo Driver Library" and currently Version 1.0.0.

/Users/john/Documents/Arduino/libraries/Adafruit_PWM_Servo_Driver_Library/examples/pwmtest/pwmtest.pde: In function 'void setup()':
/Users/john/Documents/Arduino/libraries/Adafruit_PWM_Servo_Driver_Library/examples/pwmtest/pwmtest.pde:39:11: warning: unused variable 'twbrbackup' [-Wunused-variable]
   uint8_t twbrbackup = TWBR;
Sketch uses 3550 bytes (11%) of program storage space. Maximum is 32256 bytes.
Global variables use 419 bytes (20%) of dynamic memory, leaving 1629 bytes for local variables. Maximum is 2048 bytes.

The problem might be related to OneDrive.

sterretje: The problem might be related to OneDrive.

I think that's it. I tried it on another machine that's running Windows 10 but without onedrive as the default install location. It worked there.


I’m having the same problem with libraries on onedrive. Has only started happening since updating to windows 10 Creators.

Would be great to know if there’s a solution as it is handy to use onedrive to be able to share code across my pc’s

I am getting the error as well. :( I am not even trying to use a library, if I try to compile just a blink sketch it gives the readlink error. readlink D:\OneDrive\Documents\ArduinoData\packages: The system cannot find the file specified. It gives the error even though there is a packages folder at that directory.

The IDE worked fine for at least a year with the sketch folder in OneDrive until the Windows 10 Creator update. Now the IDE throws the "cannot find file" error after I reopen a sketch. For example, I can type in and run a sketch. Save it to the sketch folder on onedrive. Close the IDE. Reopen the IDE. Load the previously working sketch. The readlink error appears immediately on compile.

I notice that Example sketches always run when loaded from onedrive but fail when saved back to onedrive in a new folder so there may be something related to the read protection of the Examples folders.

The IDE has this problem with the sketches whether they are in the cloud or available locally.

Running IDE 1.8.5 on Windows 10 Insider preview Build 17025

I’ve tried to do a bit more digging on this - it happens on all my pc’s which have been updated to the latest stable release of windows - in my case Windows 10 Enterprise version 1709 build 16299.19 running IDE 1.8.5.

The bit that is actually erroring is arduino-builder.exe, which is getting a SHARING VIOLATION error when trying to create a file in \hardware

High Resolution Date & Time:	09/11/2017 17:17:12.6825392
Event Class:	File System
Operation:	CreateFile
Path:	D:\Onedrive\Personal\OneDrive\Development\Arduino\hardware
TID:	22580
Duration:	0.0000697
Desired Access:	Generic Read
Disposition:	Open
Options:	Synchronous IO Non-Alert, Open Reparse Point
Attributes:	n/a
ShareMode:	None
AllocationSize:	n/a
Name:	arduino-builder.exe
Path:	C:\Program Files (x86)\Arduino\arduino-builder.exe
Command Line:	"C:\Program Files (x86)\Arduino\arduino-builder"  -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware C:\Users\jamemcbr\AppData\Local\Arduino15\packages -hardware D:\Onedrive\Personal\OneDrive\Development\Arduino\hardware
PID:	20108
Parent PID:	23380
Session ID:	1
User:	mydomain\jamemcbr
Auth ID:	00000000:00095c68
Architecture:	32-bit
Virtualized:	False
Integrity:	High
Started:	09/11/2017 17:17:12
Ended:	09/11/2017 17:17:12
kernel32.dll	0x110000	0xae000	C:\Windows\System32\kernel32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	22/06/1976 06:45:20
arduino-builder.exe	0x400000	0x33e000	C:\Program Files (x86)\Arduino\arduino-builder.exe			01/01/1970 00:00:00
user32.dll	0x2750000	0x18e000	C:\Windows\System32\user32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	25/12/1964 14:29:36
hmpalert.dll	0x53e90000	0xd3000	C:\Windows\SysWOW64\hmpalert.dll	SurfRight B.V.	18/09/2017 14:14:21
wow64cpu.dll	0x5cf80000	0xa000	C:\Windows\System32\wow64cpu.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	24/03/2011 12:04:08
wow64win.dll	0x5cf90000	0x77000	C:\Windows\System32\wow64win.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	04/05/1968 08:03:44
wow64.dll	0x5d010000	0x51000	C:\Windows\System32\wow64.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	14/04/2012 09:44:48
rsaenh.dll	0x72660000	0x2f000	C:\Windows\SysWOW64\rsaenh.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	03/08/2014 01:46:05
cryptsp.dll	0x72690000	0x13000	C:\Windows\SysWOW64\cryptsp.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	27/12/1908 05:19:00
bcrypt.dll	0x72d50000	0x19000	C:\Windows\SysWOW64\bcrypt.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	18/01/1921 05:15:05
winmmbase.dll	0x72f60000	0x23000	C:\Windows\SysWOW64\winmmbase.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	05/11/1938 14:33:30
winmm.dll	0x73080000	0x24000	C:\Windows\SysWOW64\winmm.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	24/03/1951 13:13:51
sophos_detoured.dll	0x73ce0000	0x32000	C:\Program Files (x86)\Sophos\Sophos Anti-Virus\sophos_detoured.dll	Sophos Limited	23/08/2017 11:52:04
cryptbase.dll	0x73ec0000	0xa000	C:\Windows\SysWOW64\cryptbase.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	22/09/1983 00:05:07
SHCore.dll	0x73ef0000	0x88000	C:\Windows\SysWOW64\SHCore.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	24/07/1995 07:31:52
msvcrt.dll	0x73f80000	0xbd000	C:\Windows\SysWOW64\msvcrt.dll	Microsoft Corporation	7.0.16299.15 (WinBuild.160101.0800)	28/11/2025 03:36:23
KernelBase.dll	0x74040000	0x1d7000	C:\Windows\SysWOW64\KernelBase.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	30/10/1993 02:15:25
powrprof.dll	0x74220000	0x45000	C:\Windows\SysWOW64\powrprof.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	16/06/1988 08:01:11
profapi.dll	0x74300000	0x14000	C:\Windows\SysWOW64\profapi.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	28/03/2027 06:37:00
advapi32.dll	0x74320000	0x78000	C:\Windows\SysWOW64\advapi32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	11/07/1910 07:15:56
ucrtbase.dll	0x74430000	0x117000	C:\Windows\SysWOW64\ucrtbase.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	03/01/1918 09:54:15
win32u.dll	0x74560000	0x16000	C:\Windows\SysWOW64\win32u.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	09/03/1948 23:55:49
msvcp_win.dll	0x74590000	0x7c000	C:\Windows\SysWOW64\msvcp_win.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	22/05/1965 22:32:38
cfgmgr32.dll	0x746b0000	0x38000	C:\Windows\SysWOW64\cfgmgr32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	23/06/1902 06:31:45
gdi32.dll	0x748d0000	0x22000	C:\Windows\SysWOW64\gdi32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	13/09/1935 20:27:28
shell32.dll	0x749d0000	0x1333000	C:\Windows\SysWOW64\shell32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	01/03/1952 14:43:57
bcryptprimitives.dll	0x75d10000	0x57000	C:\Windows\SysWOW64\bcryptprimitives.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	17/06/1938 22:36:29
shlwapi.dll	0x75d70000	0x45000	C:\Windows\SysWOW64\shlwapi.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	19/11/1931 03:20:39
imm32.dll	0x75ea0000	0x25000	C:\Windows\SysWOW64\imm32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	11/01/2016 03:35:41
ws2_32.dll	0x75f30000	0x66000	C:\Windows\SysWOW64\ws2_32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	12/06/1961 19:15:33
combase.dll	0x75fb0000	0x246000	C:\Windows\SysWOW64\combase.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	15/07/1902 23:38:10
kernel.appcore.dll	0x76200000	0xe000	C:\Windows\SysWOW64\kernel.appcore.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	02/12/2028 15:50:47
gdi32full.dll	0x76270000	0x15f000	C:\Windows\SysWOW64\gdi32full.dll	Microsoft Corporation	10.0.16299.19 (WinBuild.160101.0800)	09/01/1928 22:05:31
rpcrt4.dll	0x763d0000	0xbe000	C:\Windows\SysWOW64\rpcrt4.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	24/08/2028 08:20:04	0x764f0000	0x5c6000	C:\Windows\SysWOW64\	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	16/03/1913 01:48:14
user32.dll	0x76ac0000	0x175000	C:\Windows\SysWOW64\user32.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	25/10/1993 07:27:51
psapi.dll	0x76c40000	0x6000	C:\Windows\SysWOW64\psapi.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	18/11/1948 08:11:39
sechost.dll	0x77210000	0x43000	C:\Windows\SysWOW64\sechost.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	09/07/1937 14:38:22
ntdll.dll	0x774b0000	0x18d000	C:\Windows\SysWOW64\ntdll.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	19/08/1925 05:47:45
ntdll.dll	0x7ff8e8130000	0x1e0000	C:\Windows\System32\ntdll.dll	Microsoft Corporation	10.0.16299.15 (WinBuild.160101.0800)	04/12/2008 08:25:14

I see sophos; is that the virus scanner?

Maybe temporarily switch it off and check if it will work.

Well spotted, yes Sophos is in the mix too. I have tried it with this off and completely uninstalled as that was my first thought

Hi, I just want to report that I'm seeing the same error while verifying/uploading a sketch. My configurations is also Win10 Fall Creators update, and it fails if the sketch is on a OneDrive folder.

I just moved it to non Onedrive folder and now is ok.

The strange thing is that I have 2 computers, one laptop (SUrface Pro 4) and a desktop (Dell Optiplex), I maintain my user files synchronized on both machines using OneDrive, and I also try to keep them with the exact same configuration on everything else (Apps, folders, any customization, etc.)

The problem is only present on the SP4, not on the desktop.

For the time being when I'm working on the SP4, I'll have to put my sketches on a non OneDrive folder, and later move.... :(

Me too. I cannot compile/upload any Arduino project in the OneDrive folder after Fall Creators Update 1709. Any idea how to fix?

Any idea how to fix?

Isn't that obvious? Don't work out of the OneDrive folder.

PaulS: Isn't that obvious? Don't work out of the OneDrive folder.

That's a very unhelpful answer. I for one always work in a onedrive folder. So I have continuous backup and file versioning. I have moved folders including "Documents" into the Onedrive folder. The Arduino IDE is the only thing I have found so far that doesn't work. And, sadly, provides a very unhelpful error message.

Working on Onedrive is now standard:

Bug report:

I ran into the same error and copying the sketch out to a non-cloud location fixed it. Which kinda sucks really.

Fortunately, this issue is being tracked as an issue with Arduino-builder:

"Compilation fails with OneDrive / “Cloud reparse points”

Just in case anyone still enncounters this problem (as I did today). The solution danghoanganh posted in solved it for me:

Uncheck "Save space and download files as you use them" under "Files on Demand" in the "Settings" tab in the OneDrive settings.

Just in case anyone still enncounters this problem (as I did today). The solution danghoanganh posted in solved it for me:

Uncheck “Save space and download files as you use them” under “Files on Demand” in the “Settings” tab in the OneDrive settings.

This is a workaround rather than a solution. It’s useless if, like me, your Onedrive contains more data than will fit on your laptop SSD!

Domininho: Just in case anyone still enncounters this problem (as I did today). The solution danghoanganh posted in solved it for me:

Uncheck "Save space and download files as you use them" under "Files on Demand" in the "Settings" tab in the OneDrive settings.

Same here, the workaround works for me. I just ran into this after a Win 10 auto-update changed my default for "Files on Demand" from off to on! I noticed file manager was providing status updates for my OneDrive files, but did not realize the setting had been changed or even what "Files on Demand" feature was for that matter.

Yes a permanent fix is the preferred option. OneDrive is a fact of life so Arduino will need to gain compatibility at some point.


I had the same problem. Windows 10, reinstalled the IDE to most recent version. Other replies have more details about why the problem was happening with the Arduino folder in Onedrive, but if you want a quick solve like me and still want your docs folder for example to use OneDrive, move your Arduino folder elsewhere (ex. Desktop) and change your folder location in the IDE under preferences to the location you placed it. Fixed it up for me and I also happened to finish my project with 1 line of code afterwards :)