I'm using arduino-mk to compile my sketch, but i noticed it is a bit more strict then the IDE compiler. I managed to get some problems fixed, but now I stumble upon a message from the Time.h library. The error I get:
/usr/bin/avr-gcc -MMD -c -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=105 -I. -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/mega -I/usr/share/arduino/libraries/Time -I/usr/share/arduino/libraries/Ethernet -I/usr/share/arduino/libraries/SPI -I/usr/share/arduino/libraries/Ethernet/utility -Wall -ffunction-sections -fdata-sections -Os -fno-exceptions /usr/share/arduino/libraries/Time/DateStrings.cpp -o build-mega2560/libs/Time/DateStrings.o
In file included from /usr/share/arduino/libraries/Time/DateStrings.cpp:11:0:
/usr/share/arduino/libraries/Time/DateStrings.cpp:41:22: error: variable ‘monthNames_P’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
PGM_P monthNames_P[] PROGMEM =
^
/usr/share/arduino/libraries/Time/DateStrings.cpp:58:20: error: variable ‘dayNames_P’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
PGM_P dayNames_P[] PROGMEM = { dayStr0,dayStr1,dayStr2,dayStr3,dayStr4,dayStr5,dayStr6,dayStr7};
^
/usr/share/arduino/libraries/Time/DateStrings.cpp:59:24: error: variable ‘dayShortNames_P’ must be const in order to be put into read-only section by means of ‘__attribute__((progmem))’
char dayShortNames_P[] PROGMEM = "ErrSunMonTueWedThrFriSat";
^
make: *** [build-mega2560/libs/Time/DateStrings.o] Error 1
I check all the variables, and I think they already are defined as constants. So I don't really know what the problem is.
I found somthing with avrgcc 4.7.1 being different, so my version is 4.8.2 (RaspBian Jessie)
Strange, I have two computers running Lubuntu, the pc desktop installed the library and works normal, but the notebook recently upgraded to 13, the error of the variable.
I copied the files that works and even then the error in notebook
I can not recreate the process. I tried various versions and does not work