• AVR Freaks

Hot!make errors on XC8

Author
ob1knob
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2018/01/19 11:51:01
  • Location: 0
  • Status: offline
2019/04/16 20:24:24 (permalink)
0

make errors on XC8

I have been using the MPLAB-X IDE as an assembler for some time.  I have loaded the XC8 version 2.05 (several times) and keep getting the following errors.  I am only trying to compile a simple int main (void) {return 0;) program with an xc.h include.
 
make[2]: *** [build/default/production/main.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
::: error: (900) exec failed: /opt/microchip/xc8/v2.05/pic/bin/clang
(908) exit status = 1
nbproject/Makefile-default.mk:106: recipe for target 'build/default/production/main.p1' failed
make[2]: Leaving directory '/home/ob1knob/MPLABXProjects/Test10xc8.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory '/home/ob1knob/MPLABXProjects/Test10xc8.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed

BUILD FAILED (exit value 2, total time: 576ms)I have been using the MPLAB-X for some time for assembly language with no problem.  Now I wanted to write something in C so I installed XC8 version 2.05, to write and compile code for a 16F1503.  I have tried several time s to compile a simple 3 line code and continually get the following errors:
 
 
I reloaded the compiler and eventually the MPLAB-X too.  I always get the following errors from the make file.  I have read the documentation by Microchip for beginning use of the compiler.  Please help.
#1

5 Replies Related Threads

    mdp
    Administrator
    • Total Posts : 29
    • Reward points : 0
    • Joined: 2013/03/14 09:16:58
    • Location: 0
    • Status: offline
    Re: make errors on XC8 2019/04/16 20:46:49 (permalink)
    +1 (1)
    ob1knob,
       It looks like you are running on a Linux system. Did you run the XC8 installer with a sudo? You should also check to see if you have execute permissions.
    Mark.
    post edited by mdp - 2019/04/16 21:11:18
    #2
    NKurzman
    A Guy on the Net
    • Total Posts : 17237
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: make errors on XC8 2019/04/16 21:30:31 (permalink)
    +1 (1)
    int main (void) {return 0;) I assume the Parentheses is a typing error
    #3
    davekw7x
    Entropy++
    • Total Posts : 1717
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: make errors on XC8 2019/04/16 22:56:51 (permalink)
    +3 (3)
    ob1knob
    ::: error: (900) exec failed: /opt/microchip/xc8/v2.05/pic/bin/clang

    There is a bug in the Linux installer for XC8 version 2.00 and 2.05 that leaves clang not executable by "others"
    So if you installed version 2.05 as root, and you are now logged in as yourself, clang can't be executed.
     
    Enter the following in a command window:
     
    cd /opt/microchip/xc8/v2.05/pic/bin
    sudo chmod o+x clang


    Permissions (shown by  ls -l) were -rwxrw-r--, and now will be -rwxrw-r-x 
     
    Every other file in that directory is -rwxr-xr-x.  Don't know why the heck they made clang different.  Just careless I guess.
     
    Additionally, you can enter sudo chmod g-w+x clang to make clang exactly like the others but "o+x" is really all you need.
     
    Regards,

    Dave
    post edited by davekw7x - 2019/04/17 01:31:04

    Sometimes I just can't help myself...
    #4
    mlp
    boots too small
    • Total Posts : 735
    • Reward points : 0
    • Joined: 2012/09/10 15:12:07
    • Location: previously Microchip XC8 team
    • Status: offline
    Re: make errors on XC8 2019/04/17 07:49:30 (permalink)
    +1 (1)
    davekw7x
    cd /opt/microchip/xc8/v2.05/pic/bin
    sudo chmod o+x clang

    Probably best to do
        sudo chmod a+x clang #that is, "all" instead of "other"
    to avoid being bitten by a possible group-membership issue.
     
    (which is the effect of Dave's later suggestion but in a single command)

    Mark (this opinion available for hire)
    #5
    ob1knob
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2018/01/19 11:51:01
    • Location: 0
    • Status: offline
    Re: make errors on XC8 2019/04/19 08:45:08 (permalink)
    0
    My thanks to Dave kw7x and MIP (mark).  I don't know if I would have ever found this.  I'm not sure I have a good handle of the entirety of Microchips make file but I will work on that.  Thanks again.  Works great.
     
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5