T4.1 will compile on one computer not a different one

Status
Not open for further replies.
I purchased a new laptop, loaded the latest Arduino IDE (1.8.12) then loaded the latest teensyduino ( 1.52) and then I load from the examples Cardinfo and when I attempt to compile it, it reports that it cannot find the correct library. This is the errors listed in the debug:

In file included from C:\Users\13196\AppData\Local\Temp\arduino_modified_sketch_278225\CardInfo.ino:23:0:
C:\Users\13196\Documents\Arduino\libraries\SPI\src/SPI.h: In static member function 'static void SPIClass::beginTransaction(SPISettings)':
C:\Users\13196\Documents\Arduino\libraries\SPI\src/SPI.h:180:22: error: 'SREG' was not declared in this scope
uint8_t sreg = SREG;
^
C:\Users\13196\Documents\Arduino\libraries\SPI\src/SPI.h: In static member function 'static void SPIClass::endTransaction()':
C:\Users\13196\Documents\Arduino\libraries\SPI\src/SPI.h:336:9: error: 'SREG' was not declared in this scope
Multiple libraries were found for "SPI.h"
SREG = interruptSave;
Used: C:\Users\13196\Documents\Arduino\libraries\SPI
^
Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI[/B]
C:\Users\13196\AppData\Local\Temp\arduino_modified_sketch_278225\CardInfo.ino: At global scope:
Multiple libraries were found for "SD.h"
CardInfo:36: error: 'BUILTIN_SDCARD' was not declared in this scope
Used: C:\Users\13196\Documents\Arduino\libraries\SD
const int chipSelect = BUILTIN_SDCARD;
Not used: C:\Program Files (x86)\Arduino\libraries\SD
^
Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
'BUILTIN_SDCARD' was not declared in this scope

====

if I switch to the T3.6, and remove the "BUILTIN_SDCARD" (change it to 4) it compiles without errors

If I leave the "BUILTIN_SDCARD" in I get these errors when compiling to the T3.6:

CardInfo:36: error: 'BUILTIN_SDCARD' was not declared in this scope
const int chipSelect = BUILTIN_SDCARD;
^
Multiple libraries were found for "SPI.h"
Used: C:\Users\13196\Documents\Arduino\libraries\SPI
Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI
Multiple libraries were found for "SD.h"
Used: C:\Users\13196\Documents\Arduino\libraries\SD
Not used: C:\Program Files (x86)\Arduino\libraries\SD
Not used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
'BUILTIN_SDCARD' was not declared in this scope

====
on the older (Win8) machine I do not have any errors on compile on either the T3.6 or the T4.1
It appears that when Teensyduino is installed it is suppose to change what "SD.h" file is pointed to and for some reason it did not in this case?
I uninstalled both the Arduino IDE and Teensyduino and rebooted and reinstalled - no joy - same results

Can anybody make a suggestion?
Thank you

Charley
 
This is the problem:

Used: C:\Users\13196\Documents\Arduino\libraries\SPI

Used: C:\Users\13196\Documents\Arduino\libraries\SD

For reasons I can't know, you have copies of these libraries in your Documents\Arduino\libraries folder on that computer. Arduino is designed so anything you put in your Documents\Arduino\libraries overrides other copies. It's meant to allow you to customize and to experiment with your own edits to libraries.

But what often happens is some sort of problem which is "solved" by putting a copy of libraries in that location. Then months or years later, when you try to use some other board, copies of libs you installed for some specific reason aren't the right ones to work with other hardware.

Delete or move those libraries out of Documents\Arduino\libraries, so Arduino can find the ones which are meant to work with Teensy.
 
Hello,
When I switch to an Arduino board I get a bunch of lines of this error (true, there is no longer an SD.h file in there) - it still seems to compile correctly - will it hurt anything? Can I just ignore them?

Preparing boards...
Invalid library found in C:\Users\13196\Documents\Arduino\libraries\SD: no headers files (.h) found in C:\Users\13196\Documents\Arduino\libraries\SD
Invalid library found in C:\Users\13196\Documents\Arduino\libraries\SD: no headers files (.h) found in C:\Users\13196\Documents\Arduino\libraries\SD
Invalid library found in C:\Users\13196\Documents\Arduino\libraries\SD: no headers files (.h) found in C:\Users\13196\Documents\Arduino\libraries\SD
Invalid library found in C:\Users\13196\Documents\Arduino\libraries\SD: no headers files (.h) found in C:\Users\13196\Documents\Arduino\libraries\SD
 
Hello,
When I switch to an Arduino board I get a bunch of lines of this error (true, there is no longer an SD.h file in there) - it still seems to compile correctly - will it hurt anything? Can I just ignore them?

Preparing boards...
Invalid library found in C:\Users\13196\Documents\Arduino\libraries\SD: no headers files (.h) found in C:\Users\13196\Documents\Arduino\libraries\SD
...

It is building - Recognized as invalid it won't be used - especially without the header it can't be - but to avoid confusion removing that folder would be better since it can't be used.
 
I must have done something that brought it back... but I deleted it (again) and that fixed it
Will it come back when I upgrade to the next version of Arduino IDE? (I can just delete it again!)


Thank you!
 
Maybe I should make future versions of the installer check whether these sorts of library conflicts exist? Automatically deleting the files probably isn't a good idea, but at least the installer could show a strongly worded warning with advice about how to fix the problem.
 
Yes, that would be great for use new guys!

another problem:
Also, I figured out the fix (again by deleting files) but everytime I install a new version of Teensydunio it hangs with a warning that it can't write to the tools directory. I tried to change the protection, etc - no joy
When I figured out what files it was trying to overwrite I just deleted them and everything went well after that.
the files it was having problems with:

teensy.exe
teensy_ports.exe

this was a new computer so I didn't expect problems from something I had done in the past. I did not understand how I could delete the files but the installer could not...
Should I open the installer by "Run as administrator"?
 
You should close (quit) Arduino and Teensy Loader before running the installer. Windows will not allow writing to those files if the programs are still open and running.

No idea why your deleted libs came back. Nothing about Teensyduino would do that.

I try to focus most of my dev time on the software which actually runs on Teensy. But occasionally I do add stuff to the installer as we discover recurring usability issues. Version 1.53, which was released today after a couple weeks in beta testing, got a new feature in the Linux installer to check whether the proper udev rules are installed. Several months ago Ubuntu changed ModemManager's default filter policy setting, which exposed a bug where it mistakes Teensy for a modem and interferes with Arduino's serial monitor. We updated the udev rules file to work around that ModemManager problem, but nearly all previous Linux users have the old udev rules and no way to know the file we're publishing has been updated.

This conflicting libs problem is pretty rare, but it has come up occasionally....
 
Yes, both were closed when I update - but apparently others don't have the problem - I just need to delete the files if needed.

Thank you again for all you do for the 'Teensy world!' (and your patience!)
 
Before you start deleting files, try rebooting. That usually solves Windows problems where something was keeping a file locked.
 
Status
Not open for further replies.
Back
Top