.piolibdeps mess when having several env sections in platformio.ini

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:

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.

  1. Please remove “dependencies” field from Arduino-Temperature-Control-Library/library.json at master · anklimov/Arduino-Temperature-Control-Library · GitHub
  2. Remove .piolibdeps folder
  3. Start build again.

Done. I’ve fixed platformio.ini and kept only two environments: megaatmega2560, due.

  • 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:

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.

We have issue for that