AnsweredHot!New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my old pr

Author
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
2017/07/15 19:27:32 (permalink)
0

New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my old pr

Any of my projects, all give the same error, even if the source code is nothing more than:
/*
 * File:   main.c
 * Author: Brian
 *
 * Created on July 15, 2017, 10:35 PM
 */


#include <xc.h>

void main(void) {
    return;
}


 
Here is the error:
CLEAN SUCCESSFUL (total time: 136ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Work/LED_SIGN_pulse.X'
make -f nbproject/Makefile-default.mk dist/default/production/LED_SIGN_pulse.X.production.hex
make[2]: Entering directory 'C:/Work/LED_SIGN_pulse.X'
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1 --chip=12LF1571 -Q -G --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/main.p1 main.c
 
 
 
**************************** ATTENTION: Problem starts on the next 3 lines ********************************
mv: cannot move `build/default/production/main.d' to `build/default/production/main.p1.d': Permission denied
make[2]: [build/default/production/main.p1] Error 1 (ignored)
nbproject/Makefile-default.mk:106: recipe for target 'build/default/production/main.p1' failed
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --chip=12LF1571 -G -mdist/default/production/LED_SIGN_pulse.X.production.map --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" --memorysummary dist/default/production/memoryfile.xml -odist/default/production/LED_SIGN_pulse.X.production.elf build/default/production/main.p1
Microchip MPLAB XC8 C Compiler (Free Mode) V1.42
Build date: Apr 12 2017
Part Support Version: 1.42
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

:: warning: (1273) Omniscient Code Generation not available in Free mode
 
**************************** ATTENTION: Problem continues below ********************************
:: error: (460) rename failed; error: -1, Permission denied
dist/default/production\LED_SIGN_pulse.X.production.hex:: error: (141) can't open input file "dist/default/production\LED_SIGN_pulse.X.production.hex": No such file or directory
(908) exit status = 1
nbproject/Makefile-default.mk:131: recipe for target 'dist/default/production/LED_SIGN_pulse.X.production.hex' failed
make[2]: Leaving directory 'C:/Work/LED_SIGN_pulse.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Work/LED_SIGN_pulse.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/LED_SIGN_pulse.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 2s)

 
All my projects cant get past that point.
Even if I create a new project and import just a main.c and build, it will fail at that point.
Do I have to find an old MPLAB & XC8 which allowed compiling?
 
post edited by BrianG. - 2017/07/15 19:41:45
#1
qhb
Superb Member
  • Total Posts : 4750
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/15 19:44:59 (permalink) ☼ Best Answerby BrianG. 2017/07/15 19:49:28
+2 (2)
It appears there is some permission problem on the folder your files are stored in.
Maybe try creating a new folder and copy your files into that.
 
 
#2
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/15 19:52:48 (permalink)
0
Ok, I made a new folder on my drive 'C' called 'Work2'
I created a new project 'LedSign'
Made a default new source file 'main.c'
/*
 * File:   main.c
 * Author: Brian
 *
 * Created on July 15, 2017, 10:50 PM
 */


#include <xc.h>

void main(void) {
    return;
}

Nothing copied, all brand new.
Same error:
CLEAN SUCCESSFUL (total time: 63ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Work2/LedSign'
make  -f nbproject/Makefile-default.mk dist/default/production/LedSign.production.hex
make[2]: Entering directory 'C:/Work2/LedSign'
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=12LF1571 -Q -G  --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib   --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"    -obuild/default/production/main.p1  main.c
nbproject/Makefile-default.mk:106: recipe for target 'build/default/production/main.p1' failed
mv: cannot move `build/default/production/main.d' to `build/default/production/main.p1.d': Permission denied
make[2]: [build/default/production/main.p1] Error 1 (ignored)
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe"  --chip=12LF1571 -G -mdist/default/production/LedSign.production.map  --double=24 --float=24 --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,-osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"      --memorysummary dist/default/production/memoryfile.xml -odist/default/production/LedSign.production.elf  build/default/production/main.p1     
Microchip MPLAB XC8 C Compiler (Free Mode) V1.42
Build date: Apr 12 2017
Part Support Version: 1.42
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

:: warning: (1273) Omniscient Code Generation not available in Free mode
:: error: (460) rename failed; error: -1, Permission denied
dist/default/production\LedSign.production.hex:: error: (141) can't open input file "dist/default/production\LedSign.production.hex": No such file or directory
(908) exit status = 1
nbproject/Makefile-default.mk:131: recipe for target 'dist/default/production/LedSign.production.hex' failed
make[2]: Leaving directory 'C:/Work2/LedSign'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Work2/LedSign'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/LedSign.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 1s)

 
#3
qhb
Superb Member
  • Total Posts : 4750
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/15 19:57:54 (permalink)
+1 (1)
Sorry, I'm not sure what else to suggest.
I've never seen those errors before, but they certainly imply that Windows is rejecting rename and move operations in your project folder.
Possibly you have some anti-virus software that is false triggering.
 
#4
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/15 20:17:10 (permalink)
0
I am using Microsoft Security Essentials, as I always have even with MPLABXIDE 3.1x (Last year approximately)
I'll begin trying to play with some OS settings, though I don't think I should have to...
 
#5
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/15 20:41:56 (permalink)
+1 (1)
Ok, this hasn't truly solved my problem, but, I can make MPLABXIDE compile by running it 'Run As Administrator'.  Now it will compile all my projects.  The question is why for the first time ever, I need to run MPLAB with Administrator privileges?
 
I mean, MPLAB is not really functional unless I open it every time with a right click and 'Run As Administrator'...
 
 
#6
RISC
Super Member
  • Total Posts : 4022
  • Reward points : 0
  • Status: online
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 04:02:54 (permalink)
+2 (2)
Hi,
 
Maybe you need 2 levels of subdirectory ? I mean C:\TEMP\work1 ?
You can set the icon to always run as administrator so you don't need to go through the right click anymore.
 
Regards
 
#7
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 04:16:35 (permalink)
+1 (1)
Some of my projects already have 2 sub levels of directories, this doesn't help.
As for setting the icon to default run as administrator, yes this is a fix, however, it is strange that with all the PCB cad tools, FPGA compilers, word processors & spread sheet software, why is it that the latest MPLABX is the only one which requires some special permissions?
#8
Gort2015
Klaatu Barada Nikto
  • Total Posts : 885
  • Reward points : 0
  • Joined: 2015/04/30 10:49:57
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 04:23:26 (permalink)
+2 (2)
I don't think it is mse, are you the admin?
 
It is windows working which is a good thing.

MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
https://www.youtube.com/watch?v=Iu1qa8N2ID0
+ ST:Continues, "What Ships are Made for", Q's back.
#9
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 04:30:05 (permalink)
+1 (1)
Yes, I am the admin.  The only user.  The account which I installed MPLABX.  When installing, I selected to make it available for all users, even though I only have the 1 user account on this PC.  I disabled the send data back to Microchip feature during the install.
I'm running Win7 Pro 64bit, service pack 1, everything up to date.
 
#10
rodims
Super Member
  • Total Posts : 715
  • Reward points : 0
  • Joined: 2009/02/10 11:08:59
  • Location: 51.9627, 7.6262
  • Status: online
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 05:01:13 (permalink) ☄ Helpfulby BrianG. 2017/07/16 05:58:11
+2 (2)
From your posts title I conclude that you never succesfully built on your new Windows 7 installation. So it doesn't matter whether the same project built successfully on a previous Windows installation.
It's likely related to your user rights on the c: partition and related folders, but it's not really possible to check that without sitting in front of the PC. (To be sure you probably already have turned off the Defender for one build)
 
You are using directories in the root of c:.  Access rights might be more restricted than you think.
If your File Explorer, command prompt or whatever would run with higher user rights than MpLabx (it should not of course) that could explain such problems.
Also, work2 now is created newly, but work1 possibly is a 'relict' of your previous windows installations.
Avoid anything which inherits the rights / permissions from previous installation.


To analyze the problem you could use Sysinternals Process Monitor, which will show the source of the problem, but your
mv: cannot move `build/default/production/main.d' to `build/default/production/main.p1.d': Permission denied

is already rather clear.  Again without sitting in front of the PC,- difficult to say, but either the creation of the file is not allowed, or there is already a file with same name which cannot be deleted.
 
I think the very first test, which I would do in this situation is, - don't test with existing project/files
a) create a new MPlabX project using the default directory which it proposes.
Should be something like %appdata%/MpLabx  ...   (not sure, cannot look it up right now)
Does it build, yes / no.
b) if that works, goto %appdata%  ...  and create your own Directory there, e.g. Work3 and copy your old project there.  Do NOT copy your existing WORKx directories, instead only copy the source and project files into the Work3 directory, do not copy any folder, avoid copying the created binaries. Create all folders yourself.
 
The results might give more clues where to continue. Letting MpLabX work with Admin Rights is only a workaround. At some point the files generated with admin rights might also strike back ...
 
<edit:  the same is true for your current tests. Do not continue your tests with a project folder, where you already let MpLabX build the project with admin rights >
 
post edited by rodims - 2017/07/16 05:16:58
#11
RISC
Super Member
  • Total Posts : 4022
  • Reward points : 0
  • Status: online
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 05:43:46 (permalink)
0
Hi,
You might want to try to clean MPLAB X persistence directories
http://microchipdeveloper.com/mplabx:persistence-data
Regards
 
#12
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 05:59:29 (permalink)
0
I've just tried a new project from scratch, in the default MPLABX directory.
Same problem.
After investigating further into the drive C's 'Properties/Security', the only thing which might be causing problems is that System & Administrators have full control, Users have only Read, Execute & list privileges, Authenticated users have no privileges.
Directory 'Work's 'Authenticated Users does have read and write rights except for 'delete subfolder and files'.
After changing permissions to allow for 'delete subfolder and files', after running MPLABX once again and trying to compile, same error.
Now inspecting the security on the work folder, my project source files once again lost the privilege 'delete subfolder and files'
Somehow, MPLAB is changing the permission of the files it creates.
 
#13
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 09:21:23 (permalink)
0
How is it that this thread is considered 'Answered'?
I found an improper work-around but I would like to properly solve the problem if possible.
 
#14
CinziaG
PORCAMADONNA
  • Total Posts : 2438
  • Reward points : 0
  • Joined: 2016/12/07 14:20:36
  • Location: Wien
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 09:26:01 (permalink)
0
"answered" does not mean "solved" grin

PORCAMADONNA
#15
rodims
Super Member
  • Total Posts : 715
  • Reward points : 0
  • Joined: 2009/02/10 11:08:59
  • Location: 51.9627, 7.6262
  • Status: online
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 11:06:46 (permalink)
+1 (1)
There is no guarantee for a post that there is a helping answer. Some do not even get any response ... Since thousands of MpLabX users did not experience the problems with Windows 7 and the most recent MpLabX (and/or compiler) and these user rights problem, I think chances are very high, that its just a local problem of your windows installation. It's difficult to help without sitting in front of your PC or knowing why your Windows 7 is different. 
After investigating further into the drive C's 'Properties/Security', the only thing which might be causing problems is that System & Administrators have full control, Users have only Read, Execute & list privileges, Authenticated users have no privileges.

 
I think that is enough to cause the problem. There is no user who has enough rights apart from the administrator, so it cannot work.  This does not answer the reason for this situation however.  On my Win10 system I have also do not have my projects in the default MpLabX directory, which is
C:\Users\xyzuser\MPLABXProjects 
And for this directory I have the same group 'user' which also has not enough rights, but it's the 'authenticated user' who has the rights: modify, read, write, read & execute.So that's a difference compared to your system, and this is why it works on my PC. However there is another thing which looks weird. 
In your own user directory, e.g. C:\Users\xyzuser\MPLABXProjects\ ...   you
a)  ALWAYS should have enough rights.
b) on my WIN10 it does not display the groups 'authenticated user' nor 'user', it just has me personnally with my Windows account as user here. 
 
You said for your PC it's the same for c:\work and your c:\users\xyzuser\MPLABXProjects\     ??It looks as if the Windows installation itself is non-standard.If possible compare it to another Windows installation which you have access to.
post edited by rodims - 2017/07/17 03:44:55
#16
Gort2015
Klaatu Barada Nikto
  • Total Posts : 885
  • Reward points : 0
  • Joined: 2015/04/30 10:49:57
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/16 16:29:31 (permalink)
+1 (1)
Strange that, if you are the Admin. then you can do anything.
 
Have you tried:
control panel->action center->user account control settings
set to never notify.
 
I remember on crappy vista, you'd get warnings trying to do anything on c drive.
 
It is impossible to look at without connecting to your network.
 
Best think you can do is a fresh install.

MPLab X playing up, bug in your code? Nevermind, Star Trek:Discovery will be with us soon.
https://www.youtube.com/watch?v=Iu1qa8N2ID0
+ ST:Continues, "What Ships are Made for", Q's back.
#17
rodims
Super Member
  • Total Posts : 715
  • Reward points : 0
  • Joined: 2009/02/10 11:08:59
  • Location: 51.9627, 7.6262
  • Status: online
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/17 04:11:28 (permalink)
+1 (1)
BrianI've just tried a new project from scratch, in the default MPLABX directory. Same problem.

 
I verified my above observations on my office Win10 PC. Please check again the File-Explorers Security Tab for
a) your user directory, e.g.
C:\Users\briang
b)  your MPLABX directory
C:\Users\briang\MPLABXProjects
 
The groups SYSTEM and Administrators are not interesting here.
You usually should have listed your individual user account here, because this user directory on this PC is ONLY for you.  And the user representing YOU in the directory has the same rights as the Administrators group
(btw. I assume that MpLabX was installed with the same account which you are now using to develop, i.e. no company admin did the installation for you) 
 
For this directory I have no group user or Authenticated users
Possibly you only checked the root c: before.
Anyway, if you already changed access rights for the root c: (possibly inheriting for everything, which is not a good idea) you already don't have a standard installation any more.
 
edit:
BrianHow is it that this thread is considered 'Answered'?

I do not see any other reason than that you marked it answered yourself (a link below the individual answers for your post)
 
Also I assume that YOU are also a member of the group  Administrators, if you installed Windows 7 yourself
 
post edited by rodims - 2017/07/17 05:17:10
#18
BrianG.
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2013/04/09 11:03:42
  • Location: 0
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/18 20:08:02 (permalink)
+2 (2)
After taking ownership of the drive 'C' and giving my personal login name '...', not just administrators, full privileges on the drive, MPLABX now compiles fine without the need to run it with Administrative privileges...
 
Thx to those who have helped.
BG.
 
#19
mlp
boots too small
  • Total Posts : 479
  • Reward points : 0
  • Joined: 2012/09/10 15:12:07
  • Location: Microchip XC8 and XCLM team
  • Status: offline
Re: New instalation on MPLABXIDE v3.6x, on new install Win7 Pro, wont compile any of my ol 2017/07/19 06:33:46 (permalink)
+3 (3)
BrianG.
After taking ownership of the drive 'C' and giving my personal login name '...', not just administrators, full privileges on the drive



Taking off my Microchip hat, and putting on my System Administrator hat:
 
This workaround is perhaps adequate for a machine that only you will ever use, but it is not a solution - it simply hides the existence of the problem. It is the equivalent of cutting a BrianG-shaped hole into every wall in your house because one of your interior doors is stuck closed.

Please, before you post, read the Forum Guidelines
To get a useful answer, always state which PIC you are using!
 
Mark (not paid to state the opinions of Microchip Technology Inc.)


#20
Jump to:
© 2017 APG vNext Commercial Version 4.5