sqfmi / Watchy

Watchy - An Open Source E-Ink Smartwatch
http://www.sqfmi.com
MIT License
2.06k stars 335 forks source link

Dependency Compilation Error #105

Closed dboitnot closed 2 years ago

dboitnot commented 3 years ago

Something seems to have changed in the last week or so in one of the dependencies. I cleared my .pio directory and found I suddenly couldn't compile anymore. This appears to be separate from #104. To confirm and demonstrate the problem, I tried recreating the issue following the Getting Started guide which had worked for me about two weeks ago:

$ mkdir watchy
$ cd watchy
$ pio project init --board esp32dev
...

# Modify platformio.ini

$ cat platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
    https://github.com/sqfmi/Watchy
lib_ldf_mode = deep+
board_build.partitions = min_spiffs.csv

$ pio run
...
# Downloads dependencies then fails as expected

$ cp .pio/libdeps/esp32dev/Watchy/examples/WatchFaces/7_SEG/*.{ino,cpp,h} src/
$ pio run
Processing esp32dev (platform: espressif32; board: esp32dev; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (3.4.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 3.10006.210326 (1.0.6)
 - tool-esptoolpy 1.30100.210531 (3.1.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
Converting 7_SEG.ino
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep+, Compatibility ~ soft
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Watchy> 1.2.7+sha.3e69aad
|   |-- <Adafruit GFX Library> 1.10.12
|   |   |-- <Adafruit BusIO> 1.9.7
|   |   |   |-- <Wire> 1.0.1
|   |   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0.1
|   |   |-- <SPI> 1.0
|   |-- <Arduino_JSON> 0.1.0
|   |-- <DS3232RTC> 0.0.0-alpha+sha.261ca7d0e6
|   |   |-- <Time> 1.6.1
|   |   |-- <Wire> 1.0.1
|   |-- <GxEPD2> 1.3.9
|   |   |-- <SPI> 1.0
|   |   |-- <Adafruit GFX Library> 1.10.12
|   |   |   |-- <Adafruit BusIO> 1.9.7
|   |   |   |   |-- <Wire> 1.0.1
|   |   |   |   |-- <SPI> 1.0
|   |   |   |-- <Wire> 1.0.1
|   |   |   |-- <SPI> 1.0
|   |-- <ESP32 BLE Arduino> 1.0.1
|   |-- <WifiManager> 2.0.3-alpha+sha.9af7253
|   |   |-- <WiFi> 1.0
|   |   |-- <WebServer> 1.0
|   |   |   |-- <WiFi> 1.0
|   |   |   |-- <FS> 1.0
|   |   |-- <DNSServer> 1.1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <WiFi> 1.0
|   |-- <WebServer> 1.0
|   |   |-- <WiFi> 1.0
|   |   |-- <FS> 1.0
|   |-- <DNSServer> 1.1.0
|   |   |-- <WiFi> 1.0
|   |-- <HTTPClient> 1.2
|   |   |-- <WiFi> 1.0
|   |   |-- <WiFiClientSecure> 1.0
|   |   |   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
|   |-- <Time> 1.6.1
|   |-- <SPI> 1.0
|   |-- <Wire> 1.0.1
|-- <WifiManager> 2.0.3-alpha+sha.9af7253
|   |-- <WiFi> 1.0
|   |-- <WebServer> 1.0
|   |   |-- <WiFi> 1.0
|   |   |-- <FS> 1.0
|   |-- <DNSServer> 1.1.0
|   |   |-- <WiFi> 1.0
|-- <WiFi> 1.0
|-- <WebServer> 1.0
|   |-- <WiFi> 1.0
|   |-- <FS> 1.0
|-- <DNSServer> 1.1.0
|   |-- <WiFi> 1.0
|-- <HTTPClient> 1.2
|   |-- <WiFi> 1.0
|   |-- <WiFiClientSecure> 1.0
|   |   |-- <WiFi> 1.0
|-- <WiFiClientSecure> 1.0
|   |-- <WiFi> 1.0
|-- <Arduino_JSON> 0.1.0
|-- <DS3232RTC> 0.0.0-alpha+sha.261ca7d0e6
|   |-- <Time> 1.6.1
|   |-- <Wire> 1.0.1
|-- <Time> 1.6.1
|-- <GxEPD2> 1.3.9
|   |-- <SPI> 1.0
|   |-- <Adafruit GFX Library> 1.10.12
|   |   |-- <Adafruit BusIO> 1.9.7
|   |   |   |-- <Wire> 1.0.1
|   |   |   |-- <SPI> 1.0
|   |   |-- <Wire> 1.0.1
|   |   |-- <SPI> 1.0
|-- <Adafruit GFX Library> 1.10.12
|   |-- <Adafruit BusIO> 1.9.7
|   |   |-- <Wire> 1.0.1
|   |   |-- <SPI> 1.0
|   |-- <Wire> 1.0.1
|   |-- <SPI> 1.0
|-- <SPI> 1.0
|-- <Wire> 1.0.1
|-- <ESP32 BLE Arduino> 1.0.1
Building in release mode
Compiling .pio/build/esp32dev/src/7_SEG.ino.cpp.o
Compiling .pio/build/esp32dev/src/Watchy_7_SEG.cpp.o
Generating partitions .pio/build/esp32dev/partitions.bin
Compiling .pio/build/esp32dev/liba35/Wire/Wire.cpp.o
Compiling .pio/build/esp32dev/lib3ab/SPI/SPI.cpp.o
Compiling .pio/build/esp32dev/lib043/Adafruit BusIO/Adafruit_BusIO_Register.cpp.o
Compiling .pio/build/esp32dev/lib043/Adafruit BusIO/Adafruit_I2CDevice.cpp.o
Compiling .pio/build/esp32dev/lib043/Adafruit BusIO/Adafruit_SPIDevice.cpp.o
Compiling .pio/build/esp32dev/lib6a2/Adafruit GFX Library/Adafruit_GFX.cpp.o
Compiling .pio/build/esp32dev/lib6a2/Adafruit GFX Library/Adafruit_GrayOLED.cpp.o
Compiling .pio/build/esp32dev/lib6a2/Adafruit GFX Library/Adafruit_SPITFT.cpp.o
Compiling .pio/build/esp32dev/lib6a2/Adafruit GFX Library/glcdfont.c.o
Archiving .pio/build/esp32dev/lib3ab/libSPI.a
Indexing .pio/build/esp32dev/lib3ab/libSPI.a
Compiling .pio/build/esp32dev/lib046/Arduino_JSON/JSON.cpp.o
Compiling .pio/build/esp32dev/lib046/Arduino_JSON/JSONVar.cpp.o
Compiling .pio/build/esp32dev/lib046/Arduino_JSON/cjson/cJSON.c.o
.pio/libdeps/esp32dev/Adafruit BusIO/Adafruit_I2CDevice.cpp: In member function 'void Adafruit_I2CDevice::end()':
.pio/libdeps/esp32dev/Adafruit BusIO/Adafruit_I2CDevice.cpp:44:10: error: 'class TwoWire' has no member named 'end'
   _wire->end();
          ^
*** [.pio/build/esp32dev/lib043/Adafruit BusIO/Adafruit_I2CDevice.cpp.o] Error 1
==================================================== [FAILED] Took 5.55 seconds ====================================================

I've not yet found a version-pinned set of lib_deps that does not throw this error. I'm wondering if:

  1. Somebody who's using PlatformIO and is still able to compile could post their output showing the versioned dependency graph; and
  2. If the Watchy project could version-pin it's dependencies to prevent this sort of thing.

Thanks!

dboitnot commented 3 years ago

After some more digging around I found that the error seems to be introduced with Adafruit BusIO 1.9.7.

Workaround

Version-pin BusIO to 1.9.6 by modifying platformio.ini:

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps =
    adafruit/Adafruit BusIO @ 1.9.6
    https://github.com/sqfmi/Watchy
lib_ldf_mode = deep+
board_build.partitions = min_spiffs.csv