Ubuntu with Adafruit_GFX.h -> ft2build.h: No such file or directory

Could anyone help me with this error.
I can build this project wit Arduino IDE on the same systemOS with no error.

  1. Please use Adafruit-GFX from PlatformIO Library Registry: PlatformIO Registry
  2. If you want to use master version, please remove fontconvert folder.
1 Like

Thank you, It’s work!

I think the GFX library 13 is broken in PlatformIO 2.11.2. The build process is building the fontconvert directory and should not (according to Arduino IDE 1.5: Library specification). I think this behavior has changed from earlier PlatformIO versions.

My understanding from the Arduino spec is that if a library puts its source files in the root directory, then it does not recurse into child directories. If a library puts its source files into the src directory, then it should recurse.

Blakes-MacBook:Motobuddy blake$ platformio --version
PlatformIO, version 2.11.2
Blakes-MacBook:Motobuddy blake$ platformio run
[Thu Aug 18 17:25:24 2016] Processing adafruit_feather_m0_usb (platform: atmelsam, board: adafruit_feather_m0_usb, framework: arduino)
...
arm-none-eabi-gcc -o .pioenvs/adafruit_feather_m0_usb/Adafruit_GFX_Library_ID13/fontconvert/fontconvert.o -c -std=gnu11 -g -Os -ffunction-sections -fdata-sections -Wall -mthumb -mcpu=cortex-m0plus -nostdlib --param max-inline-insns-single=500 -MMD -DF_CPU=48000000L -DUSBCON -DPLATFORMIO=021102 -DARDUINO_SAMD_FEATHER_M0 -DARDUINO_ARCH_SAMD -D__SAMD21G18A__ -DUSB_VID=0x239A -DUSB_PID=0x800B "-DUSB_PRODUCT=\"Adafruit Feather M0\"" -DUSB_MANUFACTURER=\"Adafruit\" -DARDUINO=10608 -I.pioenvs/adafruit_feather_m0_usb/FrameworkArduino -I.pioenvs/adafruit_feather_m0_usb/FrameworkCMSISInc -I.pioenvs/adafruit_feather_m0_usb/FrameworkLibSam -I.pioenvs/adafruit_feather_m0_usb/FrameworkLibSam/include -I.pioenvs/adafruit_feather_m0_usb/FrameworkDeviceInc -I.pioenvs/adafruit_feather_m0_usb/FrameworkDeviceInc/d21g18a/include -I.pioenvs/adafruit_feather_m0_usb/FrameworkArduinoVariant -I.pioenvs/adafruit_feather_m0_usb/Wire -I.pioenvs/adafruit_feather_m0_usb/Adafruit_GFX_Library_ID13 -I.pioenvs/adafruit_feather_m0_usb/SPI -I.pioenvs/adafruit_feather_m0_usb/Adafruit_SSD1306_ID135 -I.pioenvs/adafruit_feather_m0_usb/Fonts -I.pioenvs/adafruit_feather_m0_usb/Adafruit_Unified_Sensor_ID31 -I.pioenvs/adafruit_feather_m0_usb/DHT_sensor_library_ID19 -I.pioenvs/adafruit_feather_m0_usb/Adafruit_DHT_Unified_ID18 -I.pioenvs/adafruit_feather_m0_usb/Adafruit_GPS_Library_ID20 -I.pioenvs/adafruit_feather_m0_usb/Adafruit_NeoPixel_ID28 .pioenvs/adafruit_feather_m0_usb/Adafruit_GFX_Library_ID13/fontconvert/fontconvert.c
.pioenvs/adafruit_feather_m0_usb/Adafruit_GFX_Library_ID13/fontconvert/fontconvert.c:23:22: fatal error: ft2build.h: No such file or directory
#include <ft2build.h>
^
compilation terminated.

I have hooked up Travis to my project, this may be more objective than my personal environment. The log to my current failing build shows the problem.

Please switch to Redirecting....

PlatformIO 3.0 is planned for release this month.

Thanks for the suggestion. Current build fails in a new way (can’t find library in registry) that I presume is a -devel bug, so I can’t tell if the original issue is fixed. I’ll mess with it some more.

[Fri Aug 19 17:00:22 2016] Processing adafruit_feather_m0_usb (platform: atmelsam, lib_install: 13,18,135,19,20,28, board: adafruit_feather_m0_usb, framework: arduino)
--------------------------------------------------------------------------------
LibraryManager: Installing id=13
Downloading...
Unpacking...
Adafruit GFX Library @ 1.1.5 has been successfully installed!
LibraryManager: Installing id=18
Downloading...
Unpacking...
Adafruit-DHT-Unified @ e43d7a44bd has been successfully installed!
LibraryManager: Installing id=31
Downloading...
Unpacking...
Adafruit-Unified-Sensor @ f2af6f4efc has been successfully installed!
Error: Library `{u'frameworks': [u'arduino'], u'name': u'Adafruit-DHT -unified'}` has not been found in the registry

Thanks, fixed all libs

P.S: Sorry for the troubles. We have added to our registry ~500 new libraries. A lot of libraries were switched to Arduino library.properties manifests.

Don’t forget to remove .piolibdeps directory from the project and run it again.

Excellent. Build log shows success.

text	   data	    bss	    dec	    hex	filename
49432	    860	   2640	  52932	   cec4	.pioenvs/adafruit_feather_m0_usb/firmware.elf
========================= [SUCCESS] Took 10.31 seconds =========================

One other thing, I see this in the build output:

********************************************************************************
There are the new updates for libraries (Adafruit-DHT-Unified, Adafruit GPS Library, Adafruit-SSD1306, Adafruit-Unified-Sensor, DHT sensor library)
Please update them via `platformio lib --global update` command.
If you want to manually check for the new versions without updating, please use `platformio lib --global update --only-check` command.
********************************************************************************

Is this the .piolibdeps you mentioned? This build is being done in a Travis CI environment, so shouldn’t it be building everything from scratch?

Thank you so much for the quick response and help.

You enabled caching for PlatformIO on Travis.CI to save a lot of resources and time. See where cache was restored Travis CI - Test and Deploy with Confidence

You can manually remove cache

There are multiple ways how to manage libraries

  1. Using lib_deps and specify semantic rules
  2. Force library updating before build operation. Add this line to .travis.yml after PlatformIO isntall
platformio lib update

Removing the cache via the Travis GUI caused a different error. This may just be another registry manifest issue, but it could be a library lookup issue.

Looking for dependencies...
Error: Could not find `DHT sensor library` dependency for `Adafruit DHT Unified` library

Please remove cache again and restart job. I found and fixed specific issue with Arduino libs

GitHub - bcr/Motobuddy: Motobuddy is a companion environmental information device well suited for motorcycles, snowmobiles and ATVs. You know, a handlebar-mounted computer.
This is built using the PlatformIO system. When I set up the system initially I did the following:

platformio init --board adafruit_feather_m0_usb
platformio lib install 18
platformio lib install 135
platformio lib install 19
platformio lib install 20
platformio lib install 28

You don’t need to do that. PlatformIO will install dependent libraries automatically.

Users can download your project and “Build/Upload” without additional steps.

Perfect! Thanks for all the help!

text	   data	    bss	    dec	    hex	filename
49432	    860	   2640	  52932	   cec4	.pioenvs/adafruit_feather_m0_usb/firmware.elf
========================= [SUCCESS] Took 25.41 seconds =========================

Thank you too, that reported!

Happy coding with PlatformIO! :blush:

I need to update the README. The concept I was missing when I started was that platform lib install installs a library globally, and then if your code happens to use it it will find the includes and libraries and all is well. And that is a separate concept from the lib_install directive from my platformio.ini. I am still fuzzy on the difference, but I agree that lib_install should cover it. I just added lib_install just yesterday when I started the Travis CI work.

Thanks again for all the help, you guys are doing a great job!

Hi, I am getting the same error on my project:

.pioenvs/reader/Adafruit_GFX_Library_ID13/fontconvert/fontconvert.c:23:22: fatal error: ft2build.h: No such file or directory

any ideas ?

@Endre_Tk see answer here