Pages: [1]   Go Down
Author Topic: Compiling Error - 'Unable to rename core.a - permission denied'  (Read 1217 times)
0 Members and 1 Guest are viewing this topic.
Canada
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys,

I just received my Arduino Uno R3 a few minutes ago and I've written my first program (basic flashing LED). However, when I try to compile my code I get the following error:

D:\Documents\Arduino\Arduino 1.0.2\hardware\tools\avr\bin\avr-ar: unable to rename 'core.a'; reason: Permission denied

This also happens when I try compiling one of the example programs. I've tried editing the permissions in the folder containing avr-ar to no avail.

Does anyone know how to fix this?

Thanks,

Felix
« Last Edit: November 25, 2012, 01:11:04 pm by FelixVanOost » Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46113
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I've tried editing the permissions in the folder containing avr-ar to no avail.
Is that where core.a is? If not, then you are diddling with permissions on the wrong folder.

Enable verbose mode for compiling (File + Preferences) to get more details about what is going on.

Logged

Offline Offline
Full Member
***
Karma: 4
Posts: 187
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Hey guys,

I just received my Arduino Uno R3 a few minutes ago and I've written my first program (basic flashing LED). However, when I try to compile my code I get the following error:

D:\Documents\Arduino\Arduino 1.0.2\hardware\tools\avr\bin\avr-ar: unable to rename 'core.a'; reason: Permission denied

This also happens when I try compiling one of the example programs. I've tried editing the permissions in the folder containing avr-ar to no avail.

Does anyone know how to fix this?

Thanks,

Felix

Post more info
Are you running windows 7?
Is there any firewall on your system?

Logged

From Idea To Invention

Albuquerque, NM
Offline Offline
Newbie
*
Karma: 2
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For those like me, who still might run into this issue...
Just installed arduino IDE on my windows 7 laptop and ran into the same problem. After tinkering with multitude of security settings with my PC and in particular with the arduino directories and the specific "avr-ar.exe",  the only temporary solution I could find was to launch arduino.exe in administrator mode. My actual windows login ID does have admin previlages but that does not suffice. smiley-sad
I will investigate further and find a more elegant solution but for now the only way to make this compilation go through is to launch the arduino.exe by right clicking on it and selecting the option "Run as administrator".

I am surprised that more people aren't running into this issue and there is not much activity on this post.

If anybody else has found the specific root cause of this issue, I'd like to know.
Logged

East Anglia (UK)
Offline Offline
Faraday Member
**
Karma: 89
Posts: 3487
May all of your blinks be without delay()
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which folder are your sketches in ?
Logged

Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.

Albuquerque, NM
Offline Offline
Newbie
*
Karma: 2
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I moved the Arduino installation folder to various different locations like C:/ or "My Documents" or a shared drive. Same error.
I also moved around the sketches folder to various different locations mentioned above. Same error.
I tried to manually create a dummy core.a file into any of those folders. I was able to.
But still the compilation failed at the same step.

Arduino compiler is able to create the .o files in that same folder without trouble.
I tried manually executing avr-ar command per the arduino compiler log and that DID fail with the exact same error.

Looks like the avr-ar.exe, which is the final step of creating the archive, has some permission issues conflicting with either Windows or my Norton security settings. When I run the entire IDE as administrator, all the children processes assume the same permission level and are successful.
I may try to fiddle around with the properties of avr-ar.exe and see if that works.

Logged

UK
Offline Offline
Faraday Member
**
Karma: 92
Posts: 3969
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Try temporarily disabling norton (there should be an option in there to disable it for a bit).  It could well be that thinking it's doing something bad and stopping it.
Logged

Why not visit my eBay shop? http://stores.ebay.co.uk/Majenko-Technologies
Replacement for the Arduino IDE: UECIDE - Proper serial terminal, graphing facilities, plugins, overhauled internals.
Java isn't bad in itself, but it has enabled morons to write programs.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I've got the same Core-A problem.  Running Vista and Uno.  I have BullGuard not Norton.  This problem comes and goes for reasons I can't figure out. 
Logged

ivrea (to)
Offline Offline
Faraday Member
**
Karma: 57
Posts: 3527
miaaao ^-^
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can try reading this post (I hope it's this the problem):
http://forum.arduino.cc/index.php?topic=95938.msg720346#msg720346
Logged

my name is IGOR, not AIGOR

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1451
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Open a command prompt
Type CD %temp%

In this folder, Arduino builds the sketches

You can also type %temp% in the explorer path for Vista, Win7/8, maybe XP

You can also from the command prompt, after the CD %temp% command, type "start ." (that is 'start' <space> 'period' without the quotes) and press Enter key to start explorer in the current command directory.

Anyway, this is where the build process happens.  On Vista and later, running Arduino with Administrator permissions ensures that the program can write, rename, and delete.

I have seen this happen on Vista without Norton/Symantec installed, only Microsoft Windows Essentials.  In my case, it cured itself after a few seconds - I was doing back-back compiles; compile check then immediately compile upload.  I suspect that the AV program had some files still tied-up and just have not released them (although the AV file scan architecture is suppose to prevent this issue.)

Recommend cleaning out your %temp% directory and then restarting Arduino.  If problem continues, try turning off UAC, if continues, run Arduino as Administrator.

Ray
« Last Edit: August 23, 2013, 09:55:26 pm by mrburnette » Logged

Albuquerque, NM
Offline Offline
Newbie
*
Karma: 2
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Disabling Notron & Microsoft Security Essentials didn't change the situation.

Finding temp folder is even easier. The temp folder location is viewable right there in the compiler log at the bottom of the IDE.
Funny thing is, Aarduino compiler creates its own temporary subfolder in the temp location, and that doesn't fail. The C++ compiler (gcc or g++) is able to create the .o files in this folder with no problems. Only when "avr-ar" is collecting the ".o"s to build the archive, that step fails to create the core.a
So, I don't think the folder permissions is an issue.

Anyway, I'm running out of ideas now smiley-confuse  I haven't tried creating a new windows user and running Arduino in that user space. I don't want to bother with that.

For now I'm just going to run it as an administrator. That shouldn't create any security holes as Arduino IDE doesn't really communicate with the outside ("internet") world in any way.
Setting it up with admin previlages means simply right clicking on the exe and changing the properties. In the "Compatibility" toolbar there is a checkbox called "Run as administrator".


Logged

Albuquerque, NM
Offline Offline
Newbie
*
Karma: 2
Posts: 46
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW, This thread should probably go into "Installation & Troubleshooting" forum rather than "Programming Questions".
Logged

Québec
Offline Offline
Sr. Member
****
Karma: 7
Posts: 389
When it's not human error, it's Windows going schizophrenic.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Some time if you just execute the program with Administrator privilege, it stop saying that kind of message. So just right click on your program and chose the option "Execute as Administrator".

If you want a more permanent solution, go to the property of your program there is a section where you can tel windows to executed as Admin every time you run it.

How ever you will have to confirm the opening every time you start the program from then
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys,

I just received my Arduino Uno R3 a few minutes ago and I've written my first program (basic flashing LED). However, when I try to compile my code I get the following error:

D:\Documents\Arduino\Arduino 1.0.2\hardware\tools\avr\bin\avr-ar: unable to rename 'core.a'; reason: Permission denied

This also happens when I try compiling one of the example programs. I've tried editing the permissions in the folder containing avr-ar to no avail.

Does anyone know how to fix this?

Thanks,

Felix
[Just Run ARDUINO in ADMIN MODE, right click on the arduino file  an click run as administrator  ]
Logged

Pages: [1]   Go Up
Jump to: