Trouble with portable IDE

I have a portable Arduino IDE version 1.6.5 set up, and have used it for years.

Not so recently however.

I tried compiling an old sketch that uses/needs 1.6.5, and got this

toss165Cant.ino:2:20: fatal error: Servo.h: No such file or directory
compilation terminated.
Error compiling.

I looked in the Arduino 1.6.5 package. I saw the Servo library. I removed it, and used the IDE to install a servo library.

It went into my Java/portable/sketchbook/libraries folder. But still was not found by the compiler.

I thought that would do. Just in case I moved the Servo folder into Java/libraries as a stab at the dark. No joy.

Yes, restart IDE between these steps.

The IDE knows where to put the libraries, but not where to find them?

More: I downloaded the Arduino IDE 1.6.5 zip and set up a new portable instance. I changed the file permissions of the entire installation to wide open for everyone after adding the Java/portable folder.

Launching that IDE gives an error dialog

Arduino cannot run because it could not create a folder to store your sketchbook

Something I will follow up on, in the meantime tell me I am missing something ovbious.

Recipe for portable, my notes after finding how here. Some time ago.


Hi @alto777. Please try compiling this sketch:

#include <Servo.h>
void setup() {}
void loop() {}

Does it compile successfully, or is there an error?

In preparing to respond to @in0's request, I discovered the following:

In my old poratble IDE 1.6.5 this

# include <Servo.h>
void setup() {}
void loop() {}

gives the following error

 sketch_dec02a.ino:1:20: fatal error: Servo.h: No such file or directory
 compilation terminated.
 Error compiling.

but this

#include <Servo.h>
void setup() {}
void loop() {}


Sketch uses 1,112 bytes (3%) of program storage space. Maximum is 32,256 bytes.
Global variables use 51 bytes (2%) of dynamic memory, leaving 1,997 bytes for local variables. 
Maximum is 2,048 bytes.

For less-than-Eagle-eyed readers, the difference is a single space after the # on the include line.

Take it out, put it in - compiles, doesn't. Rinse and repeat.

I am a huge fan of spaces, space after '#' comes right out of my elbow… def something I always do, and removing a space to see "if it helps" wouldn't be something I'd try, amIright?

So thanks for providing a cut/paste sketch that "solves" the problem. Until its nasty nastier relatives show up, which in my experience is likely with errors like this.

Needless to say, this is somewhat disconcerting.

Anyone with an idea of what is going on?


Still working on the other issue, which cropped when I attempted to just start over:

various portable IDE installations all say

  Arduino cannot run because it could not create a folder to store your sketchbook

even though I have done what and all I ever did WRT permissions and portable IDE setup.

I'm on Mac OSX 10.14.5 which feels like it might be relevant now?

Maybe I don't need to solve that right now (back to working on the actual thing with fingers crossed), but I would like to figure it out in case I do need, again, to make a portable IDE.


It looks like It's time to update your Arduino IDE. There have been a lot of advancements in the sketch preprocessing and library discovery system over the 6 years since 1.6.5 came out. If you use the modern version (i.e., 1.8.16) you can pad preprocessor directives to your heart's content.

Yeah, thanks.

I only mentioned the odd fact that adding a space where it shouldn't (and never had) make a difference because it made me think the installation was broken corrupt.

Pursuing that theory - starting over with 1.6.5 - led to the other problem, a problem that crops with other versions I have tried

 Arduino cannot run because it could not create a folder to store your sketchbook

If you never had to work with old software and old toolchains, you are lucky, or young or both: I must either change a crap-ton of code OR get 1.6.5 to work as it did. The odds are changing rapidly, but it def looked like getting something to work that always has, and should continue to do, would be easier. Read faster and less expensive. If arguably short-sighted. Some decisions get made above my pay grade.

I appreciate that the 1.6.5 package alone is not the entirety of the old tool chain and that changes external to that may have led to this unfortunate impasse.

It could just be the end of skating past the unofficial (and unsupported) method for making a portable installation under MacOS.

At least with the recipes I have found so far.


You can use the old toolchains with the new IDE. Just install the same version of the boards platform in Boards Manager.

You can do the same with libraries in Library Manager.