Very special compile error.... software bug

Go To Last Post
13 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I go to a university where many students use Atmel Studio 7.0 and i have heard of many people having this problem. It is not too serious of a problem but I am curious how to fix it. I have only ever made a C executable project so i'm unaware if this occurs in other types but here it is:

 

Every time i make a change in my project files and compile or build, I get the same exact error "recipe for target 'project'.elf has failed". Then i have to compile or build once more, and it compiles / builds without fail. I can even make  change in a comment or delete one character that doesn't affect the output, and the error comes back until i build for the second time. I have a feeling that it's because i'm running atmel studio on a mac via Parallels, but I was wondering if anyone has any ideas of why this is. It seems apparent that this is a bug but maybe there is a fix

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

> recipe for target 'project'.elf has failed
 
This has absolutely nothing to do with the compiler. It's a problem with your builr environment, e.g. a flaw in your Makefile (input of GNU make).

avrfreaks does not support Opera. Profile inactive.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ltimber wrote:
i have to compile or build once more, and it compiles / builds without fail.

sounds like something was not "cleaned-up" properly the first time.

 

Have you shown this to your teachers?

It will be far easier for them to help you when they can sit at your computer and see exactly what you are doing, and exactly what you have on your computer, and exactly what is happening.

 

It is vastly more difficult to debug remotely - especially for complete strangers. You will need to supply a whole lot more detail...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

"recipe failed" simply means there was a build error. If I write:

#include <avr/io.h>

int main(void) {
    // no closing brace

then I might expect to see the same. This is not a valid C program and will cause an error.

 

The point about AS7 (and the Visual Studio on which it is based in general) is that it can be very poor at showing the reason for build errors. Often the infamous "Error List" will report something like this "recipe failed" thing (which as SprinterSB says comes from make, not from the compiler) but only when you switch to the "Output" tab and read through the complete output of the compiler will you see the real reason for the failure.

 

So when you have seen "recipe failed" what has the complete build output tab actually said?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm guessing that an external make file is involved.

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't think you guys understand. It has nothing to do with what my code contains. I've made many many projects and every time I compile, i have to do it twice.

 

Also @awneil I dont understand what you mean that you dont think something was not "cleaned-up" properly the first time. And what do you mean debugging for complete strangers?

 

​The bottom line is that i have provided all of the detail possible. The problem guaranteed has nothing to do with what i'm doing wrong / right, this is a BUG

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ltimber wrote:
​The bottom line is that i have provided all of the detail possible.

No you haven't.  Is this for an AVR, Xmega, SAM? Which device?  Are you using ASF, or GCC?

 

ltimber wrote:
The problem guaranteed has nothing to do with what i'm doing wrong / right, this is a BUG

 

As suggested show us the build output.  

 

AS Cliff has explained, Visual Studio does not give a very good explanation with the "recipe failed".  THe Build Output window does give an accurate reason for what the problem is.

 

 

Jim

 

EDIT:

Recent thread with the same error:

 

https://www.avrfreaks.net/forum/t...

 

In that thread the cause for the error was a simple boo boo.  Just as we suspect here. smiley

 

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

Last Edited: Wed. Feb 28, 2018 - 02:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ltimber wrote:
 i have provided all of the detail possible

No, you haven't.

 

Specifically, you haven't provided the full build output - as requested in #4.

 

Also, #5 suggested that an external makefile may be involved.

You haven't confirmed whether that is or is not the case

 

 

Also @awneil I dont understand what you mean that you dont think something was not "cleaned-up" properly

When you build a project, the first thing it does is to delete the stuff from previous builds that's no longer required.

 

That's what I mean by "cleaning-up"

 

 

And what do you mean debugging for complete strangers?

You don't actually know anyone here, do you?

And we don't know you - so we are all "complete strangers"

 

We know nothing about you; we know nothing about your project; we know nothing about the computer (or computers?) you are using; we know nothing about how you have your computer(s) configured; we know nothing about what else may or may not be installed on your computer(s); we cannot see what you are actually doing when you get this message; we cannot see what is actually happening on your computer at the time; we cannot see what is appearing in the 'Output' window; etc; etc; etc

 

All of this makes it very much more difficult for us - as complete strangers, far away - to debug your problem.

 

But none of this applies to your teachers: they do know you; they do know about your project; they do know the computer (or computers?) you are using; they can see how you have your computer(s) configured; they can see what else may or may not be installed on your computer(s); they can see what you are actually doing when you get this message; they can see what is actually happening on your computer at the time; they can see what is appearing in the 'Output' window; etc; etc; etc

 

So, really, your teachers are best placed to help you with this.

 

The problem guaranteed has nothing to do with what i'm doing wrong / right

Almost certainly it does.

 

 

 this is a BUG

http://www.catb.org/~esr/faqs/smart-questions.html#idm46060474146768

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

ltimber wrote:
this is a BUG
yes, almost certainly a BUG in the code you have written. But until you post the build output so we can see what the compiler is complaining about no one here can help you locate what you have done wrong.

 

EDIT: just this week there was this:

 

https://www.avrfreaks.net/comment...

 

That illustrates how deficient the AS7 Error List actually is. In that case it completely failed to report the actual error even though the build output that the OP posted made it clear exactly what was wrong.

Last Edited: Wed. Feb 28, 2018 - 09:34 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
almost certainly a BUG in the code you have written.

 

and/or in the makefile you have written - if, indeed, it is an external makefile.

See #5.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I get that when I have something stupid like a missing } in a code file. I read it as "you screwed THAT up, dummy."

 

Give us an example program that produces the error.

 

277,232,917 -1 The largest known Mersenne Prime

Measure twice, cry, go back to the hardware store

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An important question has been raised, here, and the OP has been dancing around it, a bit.

 

Since this seems to be a relatively common occurrence at that site (university lab) and NOT common elsewhere, there is likely to be some common factor unique to this site. One of the factors common to universities are massive on-line storage systems. Another possibility is that the instructor(s) have set up a makefile for use in the class and that makefile is faulty. 

 

But, as awneil noted in message #8, nobody here can diagnose any of that WITHOUT A COPY OF THE BUILD OUTPUT. Not the error list, but the actual build output (as noted in message #9). You need not be defensive about all this. Instructors DO screw up (been there, done that). There may be something about PATH definitions for this class lab. Any number of things are possible. There ARE folks here who are much more knowledgable about such things than the Average Bear.

 

So, help us help you. A complete build output would go a long ways!

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Sat. Mar 3, 2018 - 05:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I would suggest everyone stop posting until the OP comes back and replies...if the OP ever does. No sense in repeating the obvious over and over.

East Coast Jim

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user