Hi all,
I feel like I’m not the first with this problem, but I can’t get anything to work. Trying to switch from Arduino IDE to Sublime Text, and I run into the same thing either way. FWIW, I’m trying sublime text after failing at getting platformio to work within Emacs. So here I am. Here’s the bones of a sketch, trying to build for Teensy 3.6:
#include <TeensyStep.h>
#include <TimeLib.h>
#include <SD.h>
#include <SPI.h>
void setup() {
}
void loop() {
}
…Simple enough, right? One would think. It also doesn’t work if I #include <Arduino.h>. Here’s my platformio.ini:
[env:teensy36]
platform = teensy
board = teensy36
framework = arduino
lib_extra_dirs = /Users/sam/code/arduino/libraries
lib_deps =
luni64/TeensyStep @ ^2.1
paulstoffregen/Time @ ^1.6.1
arduino-libraries/SD @ ^1.2.4
When I try to build, I get this pile of garbage. Looks to my (experienced but non-expert c++) eye like it can’t even find a bunch of basic C++ utilities. I understand platformio has this whole philosophy about libraries, but… wouldn’t it be easier to just use the system installed libraries like the arduino / teensyduino IDE, which has no problems with this?
Summary
[ Deviot 2.2.2 ] Starting...
Processing teensy36 (platform: teensy; board: teensy36; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy36.html
PLATFORM: Teensy (4.13.1) > Teensy 3.6
HARDWARE: MK66FX1M0 180MHz, 256KB RAM, 1MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
- framework-arduinoteensy 1.154.0 (1.54)
- toolchain-gccarmnoneeabi 1.50401.190816 (5.4.1)
Converting full_build_v3.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 118 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <TeensyStep> 2.1.0
| |-- <StandardCplusplus>
|-- <Time> 1.6.1
|-- <SD> 1.2.4
| |-- <SPI> 1.0
|-- <OneWire> 2.3.5
|-- <SPI> 1.0
Building in release mode
Compiling .pio/build/teensy36/src/full_build_v3.ino.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/algorithm.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/associative_base.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/bitset.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/char_traits.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/complex.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/del_op.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/del_opnt.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/del_opv.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/del_opvnt.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/deque.cpp.o
Compiling .pio/build/teensy36/lib584/StandardCplusplus/eh_alloc.cpp.o
In file included from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45:0,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:48:76: error: 'enable_if' in namespace 'std' does not name a template type
long map(T _x, A _in_min, B _in_max, C _out_min, D _out_max, typename std::enable_if<std::is_integral<T>::value >::type* = 0)
^
/Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:48:85: error: expected ',' or '...' before '<' token
long map(T _x, A _in_min, B _in_max, C _out_min, D _out_max, typename std::enable_if<std::is_integral<T>::value >::type* = 0)
^
/Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:84:68: error: 'enable_if' in namespace 'std' does not name a template type
T map(T x, A in_min, B in_max, C out_min, D out_max, typename std::enable_if<std::is_floating_point<T>::value >::type* = 0)
^
/Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:84:77: error: expected ',' or '...' before '<' token
T map(T x, A in_min, B in_max, C out_min, D out_max, typename std::enable_if<std::is_floating_point<T>::value >::type* = 0)
^
In file included from /Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/utility:69:0,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:89,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/bits/stl_relops.h:87:7: error: redefinition of 'template<class _Tp> bool std::rel_ops::operator!=(const _Tp&, const _Tp&)'
operator!=(const _Tp& __x, const _Tp& __y)
^
**[ lines omitted for brevity ]**
In file included from /Users/sam/code/arduino/libraries/StandardCplusplus/memory:24:0,
from /Users/sam/code/arduino/libraries/StandardCplusplus/type_traits:22,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/code/arduino/libraries/StandardCplusplus/utility.h:40:33: note: 'template<class T> bool std::rel_ops::operator<=(const T&, const T&)' previously declared here
template<class T> inline bool operator<=(const T& x, const T& y){
^
In file included from /Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/utility:69:0,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:89,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/bits/stl_relops.h:126:7: error: redefinition of 'template<class _Tp> bool std::rel_ops::operator>=(const _Tp&, const _Tp&)'
operator>=(const _Tp& __x, const _Tp& __y)
^
In file included from /Users/sam/code/arduino/libraries/StandardCplusplus/memory:24:0,
from /Users/sam/code/arduino/libraries/StandardCplusplus/type_traits:22,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/code/arduino/libraries/StandardCplusplus/utility.h:44:33: note: 'template<class T> bool std::rel_ops::operator>=(const T&, const T&)' previously declared here
template<class T> inline bool operator>=(const T& x, const T& y){
^>
**[ lines omitted for brevity ]**
/Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/bits/move.h:178:55: error: expected primary-expression before ',' token
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
^
/Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/bits/move.h:178:55: error: expected ')' before ',' token
/Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/bits/move.h:178:55: error: expected ';' before ',' token
In file included from /Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/utility:70:0,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:89,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/bits/stl_pair.h:96:12: error: redefinition of 'struct std::pair<T1, T2>'
struct pair
^
In file included from /Users/sam/code/arduino/libraries/StandardCplusplus/memory:24:0,
from /Users/sam/code/arduino/libraries/StandardCplusplus/type_traits:22,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/code/arduino/libraries/StandardCplusplus/utility.h:49:51: error: previous definition of 'struct std::pair<T1, T2>'
template <class T1, class T2> struct _UCXXEXPORT pair {
^
In file included from /Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/utility:70:0,>
**[ lines omitted for brevity ]**
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/code/arduino/libraries/StandardCplusplus/utility.h:70:37: note: 'template<class T1, class T2> bool std::operator>(const std::pair<T1, T2>&, const std::pair<T1, T2>&)' previously declared here
template <class T1, class T2> bool operator> (const pair<T1,T2>& x, const pair<T1,T2>& y){
^
In file included from /Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/utility:70:0,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:89,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/bits/stl_pair.h:239:5: error: redefinition of 'template<class _T1, class _T2> constexpr bool std::operator<=(const std::pair<T1, T2>&, const std::pair<T1, T2>&)'
operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
^
In file included from /Users/sam/code/arduino/libraries/StandardCplusplus/memory:24:0,
from /Users/sam/code/arduino/libraries/StandardCplusplus/type_traits:22,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
/Users/sam/code/arduino/libraries/StandardCplusplus/utility.h:76:37: note: 'template<class T1, class T2> bool std::operator<=(const std::pair<T1, T2>&, const std::pair<T1, T2>&)' previously declared here
template <class T1, class T2> bool operator<=(const pair<T1,T2>& x, const pair<T1,T2>& y){
^
In file included from /Users/sam/.platformio/packages/toolchain-gccarmnoneeabi/arm-none-eabi/include/c++/5.4.1/utility:70:0,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:89,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,>
**[ lines omitted for brevity ]**
^
/Users/sam/code/arduino/libraries/StandardCplusplus/unwind-cxx.h:181:39: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class {aka char [8]}'
<< 8 | (_Unwind_Exception_Class) '+')
^
/Users/sam/code/arduino/libraries/StandardCplusplus/unwind-cxx.h:182:38: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class {aka char [8]}'
<< 8 | (_Unwind_Exception_Class) '+')
^
/Users/sam/code/arduino/libraries/StandardCplusplus/unwind-cxx.h:183:37: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class {aka char [8]}'
<< 8 | (_Unwind_Exception_Class) '\0');
^
*** [.pio/build/teensy36/lib584/StandardCplusplus/eh_alloc.cpp.o] Error 1
In file included from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/WProgram.h:45:0,
from /Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/Arduino.h:6,
from /var/folders/w7/h4832m4j00j3ml2f0k0761s80000gn/T/tmpxed1td61:1:
.pio/libdeps/teensy36/TeensyStep/src/Stepper.h: In static member function 'static bool TeensyStep::Stepper::cmpVmin(const TeensyStep::Stepper*, const TeensyStep::Stepper*)':
/Users/sam/.platformio/packages/framework-arduinoteensy/cores/teensy3/wiring.h:141:16: error: expected unqualified-id before '(' token
#define abs(x) ({ \
^
>
**[ abbreviated but it's more of the same ]**
========================== [FAILED] Took 1.24 seconds ==========================
[Thu Sep 16 13:27:38 2021]