libdeps from all environments are stored in the same location. It leads to compilation problems. Alien for current environment libraries blocked compiling process. Look at this compiling log:
my code is here:
cfe96adc0c8770b7327dfb17624f05105b3df072
Flexible, Arduino Mega/Due/ESP8266 based SmartHome controller with DMX-512 in/out, 1-Wire, Modbus, MQTT interfaces. Openhab compatible. - GitHub - livello/lighthub at cfe96adc0c8770b7327dfb17624f0...
; PlatformIO Project Configuration File (for copy and paste)
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = lighthub
env_default =
megaatmega2560
; due
[env:due]
platform = atmelsam
framework = arduino
board = due
lib_deps =
This file has been truncated. show original
livello@lserver ~/PROG/lighthub $ rm .piolibdeps/ -R -f && pio run -e megaatmega2560
[Wed Mar 14 02:13:43 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LibraryManager: Installing Arduino-Temperature-Control-Library
git version 2.7.4
Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-d4rqwB-package»…
remote: Counting objects: 337, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 337 (delta 1), reused 0 (delta 0), pack-reused 331
Получение объектов: 100% (337/337), 151.23 KiB | 0 bytes/s, готово.
Определение изменений: 100% (174/174), готово.
Проверка соединения… готово.
HEAD сейчас на 1306c49 Update OneWire.cpp
LibraryManager: Installing DS2482_OneWire
git version 2.7.4
Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-_j6w1l-package»…
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 14 (delta 1), reused 7 (delta 0), pack-reused 0
This file has been truncated. show original
That is not a bug of PIO. People mixed multiple libs into the one and ask PlatformIO to depend on OneWire Arduino-Temperature-Control-Library/library.json at master · anklimov/Arduino-Temperature-Control-Library · GitHub
Normally, OneWire library leaves outside DallasTemperature.
Please remove “dependencies” field from Arduino-Temperature-Control-Library/library.json at master · anklimov/Arduino-Temperature-Control-Library · GitHub
Remove .piolibdeps
folder
Start build again.
Done. I’ve fixed platformio.ini and kept only two environments: megaatmega2560, due.
; PlatformIO Project Configuration File (for copy and paste)
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html
[platformio]
src_dir = lighthub
env_default =
megaatmega2560
; due
[env:due]
platform = atmelsam
framework = arduino
board = due
lib_deps =
This file has been truncated. show original
Remove .piolibdeps
folder
pio run -e megaatmega2560 SUCCESS
pio run -e due FAILED (Not a problem, it fails now)
pio run -e megaatmega2560 FAILED - There the problem is. libdeps for due brakes compilation of megaatmega2560.
you can see here:
livello@lserver ~/PROG/lighthub $ rm -Rf .piolibdeps/
livello@lserver ~/PROG/lighthub $ pio run -e megaatmega2560
[Wed Mar 14 13:46:03 2018] Processing megaatmega2560 (platform: atmelavr; board: megaatmega2560; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LibraryManager: Installing Arduino-Temperature-Control-Library
git version 2.7.4
Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-cmz44U-package»…
remote: Counting objects: 337, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 337 (delta 1), reused 0 (delta 0), pack-reused 331
Получение объектов: 100% (337/337), 151.23 KiB | 0 bytes/s, готово.
Определение изменений: 100% (174/174), готово.
Проверка соединения… готово.
HEAD сейчас на 1306c49 Update OneWire.cpp
LibraryManager: Installing DS2482_OneWire
git version 2.7.4
Клонирование в «/home/livello/PROG/lighthub/.piolibdeps/_tmp_installing-sk9FKd-package»…
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (10/10), done.
This file has been truncated. show original
clean .piolibdeps
Try to add to each env lib_ldf_mode = chain+
.
1 Like
Thanks very much! Problem is solved
Now compiltaion of an environment does not depend on libraries presence of other environments in libdeps directory.
adding this option doesn’t help. Libs for different env’s placed in same directory and it brakes compilation process. While we can successfully build every env one by one with rm -Rf .piolibdeps/ before every compilaton.
The solution would be placing piolibdeps in subfolder for every environment.