xiaochen-2050 / megapirateng

Automatically exported from code.google.com/p/megapirateng
0 stars 0 forks source link

Unable to build MPNG from /beta on Linux using make #41

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create fresh check out.
2. Run "make configure"
3. Set "ARDUINO=${HOME}/arduino" in config.mk
4. Run "make"

What is the expected output? What do you see instead?
Expected output is complete build of MPNG (like below):
...
%% arduino/core.a
%% ArduCopter.elf
%% ArduCopter.eep
%% ArduCopter.hex

Instead I see error message:
../libraries/AP_Common/Arduino.cygwin.mk:195: *** ERROR: cannot find the 
compiler tools anywhere on the path /home/kb/arduino/hardware/tools/avr/bin. 
Stop.

What version of the MegaPirateNG are you using?
#define THISFIRMWARE "MegaPirateNG V2.9 R7"
http://megapirateng.googlecode.com/svn/beta/2.9.1 @ r298

Please provide any additional information below.
Patch fixing this issue is attached. It includes arduino_version.sh from 
https://code.google.com/p/ardupilot-mega/source/browse/Tools/scripts/arduino_ver
sion.sh

Original issue reported on code.google.com by krzyszto...@gmail.com on 18 Mar 2013 at 8:32

Attachments:

GoogleCodeExporter commented 9 years ago
The default config is now for Windows based PCs.

Edit the makefile located here:

http://code.google.com/p/megapirateng/source/browse/beta/2.9.1/ArduCopter/Makefi
le

and remove "cygwin." from the file name in line 1

include ../libraries/AP_Common/Arduino.cygwin.mk
>>> 
include ../libraries/AP_Common/Arduino.mk

This way you will be back to the old makefile for Linux

Original comment by pa...@kulma.pl on 19 Mar 2013 at 2:56

GoogleCodeExporter commented 9 years ago
I will try to add automatic system discovery to the makefile .....

Original comment by pa...@kulma.pl on 19 Mar 2013 at 2:57

GoogleCodeExporter commented 9 years ago
Sorry I did not saw the patch you send.
But first part should solve the problem

-include ../libraries/AP_Common/Arduino.cygwin.mk
+include ../libraries/AP_Common/Arduino.mk

Original comment by pa...@kulma.pl on 19 Mar 2013 at 3:00

GoogleCodeExporter commented 9 years ago
To support both Cygwin and "generic" Unix-like system it might be enough to 
apply my patch and then replace 1st line of .../2.9.1/ArduCopter/Makefile with:

ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
    include ../libraries/AP_Common/Arduino.cygwin.mk
else
    include ../libraries/AP_Common/Arduino.mk
endif

Original comment by krzyszto...@gmail.com on 19 Mar 2013 at 3:15

GoogleCodeExporter commented 9 years ago
Sure, test this procedure and let me know if it works.

Original comment by pa...@kulma.pl on 19 Mar 2013 at 3:20

GoogleCodeExporter commented 9 years ago
ifneq ($(findstring CYGWIN, $(SYSTYPE)),)
    include ../libraries/AP_Common/Arduino.cygwin.mk
else
    include ../libraries/AP_Common/Arduino.mk
endif

is not working on Windows ......

Original comment by pa...@kulma.pl on 20 Mar 2013 at 9:45

GoogleCodeExporter commented 9 years ago
SYSTYPE is CYGWIN_NT-6.1-WOW64

Original comment by pa...@kulma.pl on 20 Mar 2013 at 9:51

GoogleCodeExporter commented 9 years ago
Looks like I forgot setting SYSTYPE in Makefile. Attached fixed patch. Tested 
under Cygwin and Ubuntu.

Original comment by krzyszto...@gmail.com on 20 Mar 2013 at 12:16

Attachments:

GoogleCodeExporter commented 9 years ago
test it under poor windows prompt as well, that's where it should work: 
Linux,Cygwin Terminal, Windows Prompt

Original comment by pa...@kulma.pl on 20 Mar 2013 at 12:27

GoogleCodeExporter commented 9 years ago
It does. Just need to have cygwin's bin folder in PATH.

Original comment by krzyszto...@gmail.com on 20 Mar 2013 at 1:00

GoogleCodeExporter commented 9 years ago
Nice ... will test it a little later, I am busy on other issue ....

Original comment by pa...@kulma.pl on 20 Mar 2013 at 1:06