# Unable to build (unPhone 9 with Platformio)

**URL:** <https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72>\
**Category:** unPhone programming\
**Created:** [11 April 2025 10:54 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72 "2025-04-11T10:54:49Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hegdeatri](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hegdeatri](https://forum.unphone.net/u/hegdeatri)\
**Post date:** [11 April 2025 10:54 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/1 "2025-04-11T10:54:49Z")

</div>

Hi,  
I am trying to build the everything example given in the unphone library([examples/everything · main · Hamish Cunningham / unPhoneLibrary · GitLab](https://gitlab.com/hamishcunningham/unphonelibrary/-/tree/main/examples/everything)). I first ran into the issue where I could not download the dependency - `me-no-dev/AsyncWebServer`. I tried using the git url instead but that also failed. To fix this I used the following libraries instead:

```auto
  ESP32Async/ESPAsyncTCP
  ESP32Async/ESPAsyncWebServer

```

which replaced the two libraries from `me-no-dev`. This got platformio to initialise successfully. I could now see the build option available in the platformio tasks section in VSCode.

When I try to build it however, I get an error saying `In file included from .pio/libdeps/unphone9/Adafruit SPIFlash/src/Adafruit_SPIFlash.cpp:25: .pio/libdeps/unphone9/Adafruit SPIFlash/src/Adafruit_SPIFlash.h:32:10: fatal error: SdFat_Adafruit_Fork.h: No such file or directory`

Here is the build logs: [unphone build errors - Pastebin.com](https://pastebin.com/23zdQwwy)

I have tried this on macos, windows and windows-wsl - all with platformio  
+  
docker solution through `build.sh` and `build.ps1`  
For the docker logs: [Possible Spam Detected - Pastebin.com](https://pastebin.com/05ap69Q3)

Are there any steps I missed when building, or posting this issue?

---

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://forum.unphone.net/u/ben)\
**Post date:** [11 April 2025 12:24 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/2 "2025-04-11T12:24:34Z")

</div>

My solution to this problem was to download [libraries9.zip](https://gitlab.com/hamishcunningham/unphone/-/raw/master/libraries9.zip) (referenced in the unphonelibrary readme) and unzip it into “.pio/libdeps/unphone9” in the project directory.

Then after compiling the project again the dependencies were no longer missing.

Hope this helps,  
Ben

---

<div class="post-metadata">

**Author:** ![hegdeatri](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hegdeatri](https://forum.unphone.net/u/hegdeatri)\
**Post date:** [11 April 2025 12:52 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/3 "2025-04-11T12:52:03Z")

</div>

Ohh I see, completely bypassed that as it said platformio would not need it.

Upon trying this method, I now get a new error: [New build error after using libraries9 - Pastebin.com](https://pastebin.com/D200BLdj)  
A bunch of new errors in `Adafruit_ImageReader.cpp`

Do you have any hint on how I can tackle this?

Thanks a lot,  
Atri

---

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://forum.unphone.net/u/ben)\
**Post date:** [11 April 2025 13:08 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/4 "2025-04-11T13:08:53Z")

</div>

Unfortunately I have not seen that issue before so may not be much help.

Does adding `adafruit/SdFat - Adafruit Fork@^1.5.1` to the platformio.ini lib\_deps help at all?

---

<div class="post-metadata">

**Author:** ![hegdeatri](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hegdeatri](https://forum.unphone.net/u/hegdeatri)\
**Post date:** [11 April 2025 13:21 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/5 "2025-04-11T13:21:08Z")

</div>

I already have that in my `platformio.ini` - and it seems to have no effect on this error.  
thanks for the hints though!

---

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://forum.unphone.net/u/ben)\
**Post date:** [11 April 2025 17:15 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/6 "2025-04-11T17:15:56Z")

</div>

No sure if it will help but my output of running `pio pkg list` for the “everything” project is linked here: [https://pastebin.com/k5ahXiw9](https://pastebin.com/k5ahXiw9) (you can ignore the unphone7 dependencies I think)

---

<div class="post-metadata">

**Author:** ![ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@ben](https://forum.unphone.net/u/ben)\
**Post date:** [11 April 2025 17:32 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/7 "2025-04-11T17:32:00Z")

</div>

Update: just ran into your exact issue regarding `Adafruit_ImageReader.cpp` when compiling a new project.

When doing these commands in order the issues seems to be fixed, although I am not certain why.

1. Clear all download dependencies `rm -rf .pio/libdeps/unphone9/*`
2. Unzip “libraries9.zip” into libdeps `unzip libraries9.zip -d .pio/libdeps/unphone9`
3. Then upon compiling again it re-downloaded any missing dependencies and the error went away

Hope this helps and is the same for you

---

<div class="post-metadata">

**Author:** ![hegdeatri](https://avatars.discourse-cdn.com/v4/letter/h/eada6e/32.png) [@hegdeatri](https://forum.unphone.net/u/hegdeatri)\
**Post date:** [12 April 2025 09:13 UTC](https://forum.unphone.net/t/unable-to-build-unphone-9-with-platformio/72/8 "2025-04-12T09:13:45Z")

</div>

Thank you!! Finally got it to build :))
