Library Dependency Finder Could not find the packages and Found 0 compatible libraries

Hi all. I am sharing a project across four different Win10 machines using Github. Everything works perfectly on all systems except for the best one! On this one, LDF finds 0 compatible libraries and is unable to find (any) packages.

Here’s my platformio.ini

[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
lib_deps = FlexCAN_t4

On compile, I get this and a flurry of other errors, as no libraries are loaded.

PLATFORM: Teensy (4.12.0) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
 - framework-arduinoteensy 1.153.0 (1.53)
 - toolchain-gccarmnoneeabi 1.50401.190816 (5.4.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing FlexCAN_t4
Warning! Could not find the package with 'FlexCAN_t4' requirements for your system 'windows_amd64'
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode

In file included from src\Display.cpp:1:0:
C:\Users\justi\.platformio\packages\framework-arduinoteensy\cores\teensy4/Arduino.h:6:22: fatal error: WProgram.h: No such file or directory

Here is the start of display.h, which normally triggers the LDF.

#include <Arduino.h>
#include <ST7735_t3.h> // Hardware-specific library
#include <ST7789_t3.h> // Hardware-specific library
#include <ST7735_t3_font_Arial.h> 

All internet features of this PC seem to be otherwise working fine. I’ve tried removing Platform.IO plugin and re-installing. I’ve tried removing VSC and re-installing. I’ve tried making a blank Teensy41 project, but it won’t load any libraries and fails to compile.

I’m sure this is forehead slapper, so please hit me with it! Many thanks.

Hi daedal0s

I have a Teensy 4 at the the office that I have not tried yet on PlatformIO, will try it this morning on PlatformIO.

In passing I had a look at PlatformIO collection of libraries for ‘FlexCAN_T4’, I don’t find the the original release of FlexCAN_T4 by tonton81 that is mentioned in the ‘pjrc’ forums.

I had similar problem with a custom lib on my STM32 platform, I brought it in to PlatformIO directly from github.

Try this in you platform.ini file…

env:teensy41]
platform = teensy
board = teensy41
framework = arduino
lib_deps =
    ;FlexCAN_t4
    https://github.com/tonton81/FlexCAN_T4

You been on a windows machine it might still suggest that a assistant github program be installed in windows, I don’t remember its name. Look closely at the error messages, that’s where it was suggested to me.

After installing assistant program restart VScode / PlantformIO, compile your code and it will now clone FlexCAN_T4 by tonton81 to your PlatformIO workspace…

Will try the same in an hour or two’s time, still busy waking up this early morning and need a second cupper… :slight_smile:

1 Like

This library just isn’t registered in PlatformIO’s library registry (PlatformIO Registry), thus as @fek9 suggest, you must include it via the git link (or put a copy in the lib/ folder).

If that error still appears after the library declaration is fixed, you have a broken Arduino core package, since that file should be in there. Please remove the folder C:\Users\justi\.platformio\packages\framework-arduinoteensy\ and retry compilation.

Thanks for lending a hand, @fek9 and @maxgerhardt!

Here is my updated platformio.ini

[env:teensy41]

platform = teensy
board = teensy41
framework = arduino
lib_deps =
    ;FlexCAN_t4
    https://github.com/tonton81/FlexCAN_T4

On execution, it fails differently, so that’s progress.

Processing teensy41 (platform: teensy; board: teensy41; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: (removed because it's a link)
PLATFORM: Teensy (4.12.0) > Teensy 4.1
HARDWARE: IMXRT1062 600MHz, 512KB RAM, 7.75MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
 - framework-arduinoteensy 1.153.0 (1.53)
 - toolchain-gccarmnoneeabi 1.50401.190816 (5.4.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Library Manager: Installing git+https://github.com/tonton81/FlexCAN_T4
FileNotFoundError: [WinError 2] The system cannot find the file specified:

I did try removing my \framework-arduinoteensy\ subfolder, but I don’t think compilation got that far. I’m going to try copying the CAN library to /lib/, and I may try another board type, just to see if the LDF works.

Thanks again for your time!

Hi daedal0s

Did U see in your long complete terminal output an error message like this…

If so you need to down load git assistant program from here Git - Downloads
then install then restart VScode/PlatformIO. Then compile your source, you should see it clone FlexCAN_14 to workspace and then continue compilation…

Hopefully your framework-arduinoteensy core is not damage, like maxgerhardt is thinking…

Well, I did not see that UserSideException in my output, but I went ahead and installed Git from the link you provided, and now everything works! Maybe Git was installed but damaged? Anyway, it works great now. Thanks again.

git is not installed by default with PlatformIO – if a developer uses it during development, it’s expected to be preinstalled, but an error messages is thrown in any case.

Just as a fun side info: One can bypass the git protocol by referencing the download link to the .zip archive too, which only needs a HTTPS client (which is always usable)

lib_deps = 
   https://github.com/tonton81/FlexCAN_T4/archive/master.zip
3 Likes