IDE 1.6.10: compilation of sketches wich time library fails

I downloaded the new 1.6.10 IDE and since then have huge problems compiling sketches using then time library. For example, using the (Adafruit) DS3231 library and sketch TimeRTC I get the error (condensed):

In file included from /Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/examples/TimeRTC/TimeRTC.ino:8:0:
/Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/DS3232RTC.h:136:26: error: 'tmElements_t' has not been declared
static byte read(tmElements_t &tm);
^
/Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/DS3232RTC.h:137:20: error: 'tmElements_t' has not been declared
byte write(tmElements_t &tm);
^
/Users/kurtbierbaum/Documents/Arduino/libraries/DS3232RTC/examples/TimeRTC/TimeRTC.ino: In function 'void setup()':
TimeRTC:15: error: 'setSyncProvider' was not declared in this scope
setSyncProvider(RTC.get); // the function to get the time from the RTC

This also affects a big sketch that I compiled a few hundred times with IDE 1.6.9. Even going back from 1.6.10 to 1.6.9 did not remove the compile error.

I also got a strange error that a "spurious .githib folder" was found in the library folder. Removing it in the terminal did remove the associated error, but not the compile error described above.

What happens here?

Workaround:

I removed the Library/Arduino15 folder and the cc.arduino.Arduino.plist file in the Preferences folder.

After this, the sketches did compile as expected with no compile error.

Isn't this something to take into account when releasing a new IDE version?

I'm having the same problem right now. I managed to get the one up and running again by uninstall and reinstall. But the other PC is not taking it. I'll try the work around and let you know.

Anyone know why this is happening?

Okay so I cant find those folders you mentioned, and mine is just stopping dead in its tracks and its really aggravating. Is there a board component that got updated in the 1.6.10 like the AVR that I can revert back to the old?

topdancer:
time library. For example, using the (Adafruit) DS3231 library and sketch TimeRTC

Please post links to where you downloaded the time library and the DS3231 libraries and state what you had selected in the Tools > Board menu. I just tested with GitHub - PaulStoffregen/Time: Time library for Arduino and GitHub - PaulStoffregen/DS1307RTC: Use a DS1307 Real Time Clock chip with the Time library(I couldn't find an Adafruit library named DS3213) on Arduino IDE 1.6.10 compiling for Uno had no error.

topdancer:
I also got a strange error that a "spurious .githib folder" was found in the library folder.

That's actually a warning, not an error and can be safely ignored. Was it actually spelled ".githib" or was that a typo and you meant ".github". If it was .githib then that warning is expected. If it was .github then that is incorrect behavior on 1.6.10 because they were supposed to have whitelisted that folder name. I tried .github with 1.6.10 and didn't get any warning.

epillar86:
Okay so I cant find those folders you mentioned,

Arduino15 folder locations:
You can find it by checking File > Preferences > More preferences can be edited directly in the file

On Mac OS X:
/Users/(username)/Library/Arduino15

On Windows:
Arduino IDE 1.6.5r5 and previous:
C:\Users(username)\AppData\Roaming\Arduino15
Arduino IDE 1.6.6 and later:
C:\Users(username)\AppData\Local\Arduino15

On Linux:
/home/(username)/.arduino15 (a.k.a. ~/.arduino15)

epillar86:
and mine is just stopping dead in its tracks and its really aggravating.

Please post the full error output using code tags(</> button on the toolbar).

epillar86:
Is there a board component that got updated in the 1.6.10 like the AVR that I can revert back to the old?

Yes, Arduino AVR Boards v1.6.12 is included with Arduino IDE 1.6.10. The problem might be caused by an older version installed at Arduino15/packages/arduino/hardware/avr, which would explain why topdance was able to fix it by deleting that folder, but the IDE is supposed to warn you about this when you first start 1.6.10 and remove the previous version.

The culprit is AVR core 1.6.12, or more specifically avr-libc 2.0.0, which now has <time.h> that gets picked up instead of <Time.h> on case-insensitive filesystems which are typical on Mac and Windows.

The fix is simple: change

#include <Time.h>

to
#include <TimeLib.h>.

<time.h> was actually added in avr-libc 1.8.1, but earlier AVR cores used 1.8.0.
Non-AVR targets have already had it earlier.

@ pert:
I apologize for the typos in my post. I can confirm that the warning concerned a "spurious .github folder".

@ oqibidipo:
I can confirm that the sketches did compile correctly after changing "Time.h" into "TimeLib.h", thanks for this hint.

topdancer:
@ pert:
I apologize for the typos in my post. I can confirm that the warning concerned a "spurious .github folder".

Do you remember which library caused that warning? Are you sure you got that error on Arduino IDE 1.6.10 and not Arduino IDE 1.6.9? If so I'll look into it and notify the developers if the IDE isn't correctly handling those folders. Also, which operating system are you using, that could be related.

i have problem on how to verify

Which DS3232RTC library was used?

I found at least two with the same name:

Of those two, only the JChristensen version has an example called TimeRTC.

I submitted a pull request to Jack Christensen's library to fix this issue.

@pert:

I am working mostly on a MacBook Pro under Yosemite (10.10.5). And I am using Paul Stoffregen’s time library, downloaded from GitHub - PaulStoffregen/Time: Time library for Arduino.

To replicate my issue take Paul’s „TimeRTC“ sketch from the examples folder. This sketch references also „DS1307RTC.h“. My sketch is based on a DS3231 RTC, so I used „DS3231RTC.h“, downloaded from GitHub - JChristensen/DS3232RTC: Arduino Library for Maxim Integrated DS3232 and DS3231 Real-Time Clocks.

Compiling the sketch with „Time.h“ & „DS3231RTC.h“ under IDE 1.6.9 works fine. If compiled under 1.6.10 the IDE throws the error which can be resolved by changing „Time.h“ —> „TimeLib.h“.

Does this help? If not let me know.

Thanks for the help. I appreciate it.

Kurt

Hello

This is all very confusing.

DS1307RTC.h was causing big problems with IDE 1.6.10 - would not complie - 1.6.11 seems OK
Removed the original problem-causing DS1307RTC library and downloaded GitHub - PaulStoffregen/DS1307RTC: Use a DS1307 Real Time Clock chip with the Time library affresh and tried again - seems OK now.

The original library was missing the Read example (Set was there) - the new library includes both examples.

Changing Time.h in the problem DS1307RTC to TimeLib.h worked OK.
The new download above seems to be OK and uses TimeLib.h from the start.

Taken a lot of time to sort this, but thanks to this thread, all is at peace, for now.
I have to say, that the number of RTC libraries can muddy the waters and I have to agree with comments elsewhere, that with a relatively simple device like the DS1307, it might be better not to use the libraries (other than Wire) and do your own thing, plus learn something into the bargin.
I shall be having a look at http://bildr.org/2011/03/ds1307-arduino/ - thank you Mr Pyner.

All I was originally trying to do was to reset the minutes and seconds to zero upon receiving a time signal at 00:00 from a radio controlled clock - the long term aim was to synchronise all the DS1307 and DS3232 systems at least once a day to maintain "accuracy" - the Maxim claim for the 3232 as "extremely accurate" was a bit wide of the mark as far as I'm concerned.

Thanks to all the contributors