amperka / ino

Command line toolkit for working with Arduino hardware
http://inotool.org
MIT License
1.08k stars 232 forks source link

Including files it shouldn't and compiling useless plugins #179

Open hroncok opened 10 years ago

hroncok commented 10 years ago

Hi,

I'm running ino on Fedora 20 and rawhide, trying to compile Ultimaker Marlin firmware.

I'm observing two things:

Some conditional includes from pdo file are included even when conditions are not met:

Marlin.pde:

...
#ifdef ULTRA_LCD
  #if defined(LCD_I2C_TYPE_PCF8575)
    #include <Wire.h>
    #include <LiquidCrystal_I2C.h>
  #elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)
    #include <Wire.h>
    #include <LiquidTWI2.h>
  #elif defined(DOGLCD)
    #include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)
  #else
    #include <LiquidCrystal.h> // library for character LCD
  #endif
#endif
...

Non of the defines (ULTRA_LCD, LCD_I2C_TYPE_PCF8575, DOGLCD) is defined, yet the compilation fails:

+ ino build -m mega2560
src/Marlin.pde
Searching for Arduino lib version file (version.txt) ... /usr/share/arduino/lib/version.txt
Detecting Arduino software version ...  1.0.5 (1.0.5)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of Robot_Control
Scanning dependencies of LiquidCrystal
Scanning dependencies of SD
src/...
src/Marlin.cpp
.build/mega2560/src/Marlin.cpp:5:35: fatal error: LiquidCrystal_I2C.h: No such file or directory
     #include <LiquidCrystal_I2C.h>
                                   ^
compilation terminated.
make: *** [.build/mega2560/src/Marlin.o] Error 1

Also note that Robot_Control is in the output, yet not needed by anything in the code.

Is this an ino or arduino-core issue? Thanks for help

beckdac commented 10 years ago

I have experienced the same problem. I believe this is a duplicate of: https://github.com/amperka/ino/issues/175