Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the format Name#Password
Comment
[i]Italic Text[/i]
[b]Bold Text[/b]
[spoiler]Spoiler Text[/spoiler]
>Highlight/Quote Text
[pre]Preformatted & Monospace Text[/pre]
[super]Superset Text[/super]
[sub]Subset Text[/sub]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Makefile problem

Reply
- Wed, 28 Dec 2016 13:47:24 EST 677AANqx No.36419
File: 1482950844378.png -(5817B / 5.68KB, 225x225) Thumbnail displayed, click image for full size. Makefile problem
Hello,
I`ve been trying to make a project on unix, but yesterday I ran to a problem I just simply cannot solve.
I work on windows mostly and am Makefile noob.

I have everything installed up. But makefile yields: ".lib/arduino.a" no file or directory.
I figured out it must be some logical mistake in makefile; that it wants arduino.a before it is compiled.

Could anyone help me out?

Makefile: http://pastebin.com/QNGT1XNm
Readme: http://pastebin.com/ZtEA3SqW
Directory structure: http://pastebin.com/JLe8XNRB
>>
Beatrice Somblesirk - Wed, 28 Dec 2016 14:28:39 EST WLOo3E7i No.36420 Reply
>>36419
What commands are run running and in which directory that is giving you that error?
>>
Hannah Drummlewill - Wed, 28 Dec 2016 14:57:52 EST 677AANqx No.36421 Reply
Make clean, src, bootloader, boards are working...

Make src checks arduino path and other paths. Return no error, so everything should be ok.

When I hit "make", following error occurs:
/Users/ondraznojil/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs .lib/arduino.a
/Users/ondraznojil/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar: .lib/arduino.a: No such file or directory
make: *** [.lib/arduino.a] Error 1

I run the makefile from the directory where it is located (=parent directory of the project)
>>
Hannah Drummlewill - Wed, 28 Dec 2016 15:00:52 EST 677AANqx No.36422 Reply
I`m using OS X Yosemite.
Also tried Ubuntu 13, but the same error occured.
>>
Molly Casslelock - Wed, 28 Dec 2016 15:19:08 EST kEUrK4GZ No.36423 Reply
>Make src checks arduino path and other paths. Return no error, so everything should be ok.

There is no "make src". And it looks like you're just trying to link to an arduino library binary so source is irrelevant. You either have arduino.a somewhere or you don't.
>>
Beatrice Somblesirk - Wed, 28 Dec 2016 15:24:29 EST WLOo3E7i No.36424 Reply
# building the arduino library
$(ARDUINOLIB): $(ARDUINOLIBOBJS)
$(AR) rcs $@ $?

looks like that might be the line it creates .lib/arduino.a, maybe try just running that to see if you get a better error message

also, are you setting the right platform?
>>
Hannah Drummlewill - Wed, 28 Dec 2016 15:53:02 EST 677AANqx No.36425 Reply
Guys that`s it I guess.

.lib/arduino is not valid unix path, as far as I know.

I changed it to "lib/arduino" and it got further. I still get error, but different one.

Thank you very much for your help.
>>
Hannah Drummlewill - Wed, 28 Dec 2016 16:16:04 EST 677AANqx No.36427 Reply
Ok, it seems I`m wrong anyway.

I left only arduino build section and tried to make:
lib/arduino.a:
make: lib/arduino.a:: No such file or directory
make: *** [all] Error 1

What is the reason?
  1. The build needs aduino.a but they did`t send me the file with the rest of the project.
  2. The makefile includes BUILDING the static library "arduino.a" but it is not able to build it because I do something wrong.

Is there any possibility it caused by the reason no. 2?
>>
Molly Casslelock - Wed, 28 Dec 2016 16:52:35 EST kEUrK4GZ No.36428 Reply
>>36427
If you read through the makefile and did everything you were told to do, one likely possibility is that you're using the wrong version of something. The makefile is copyrighted 2013, so look into that.
>>
Thomas Greenhood - Wed, 28 Dec 2016 19:10:25 EST 9QSfnS0r No.36430 Reply
If you are tired of writing your Makefile by hand try out platformio.
It creates project files based on imported libraries via a few command line commands.
>>
Nathaniel Dradgework - Thu, 29 Dec 2016 14:21:32 EST sGFR0zid No.36431 Reply
1483039292221.jpg -(166021B / 162.13KB, 1332x1776) Thumbnail displayed, click image for full size.
>>36425

>I changed it to "lib/arduino" and it got further. I still get error, but different one.

tfw PROGRESS :)

Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.