Code in lib folder does not compile properly

My project structure is a simple /src and /lib folder. I have a library in the lib folder (KeccakHash) that I’d like to compile. However, when doing “platformio run” i get this error.

Archiving .pioenvs/teensy31/lib/libKeccakHash.a
rc: .pioenvs/teensy31/lib/libKeccakHash.a: No such file or directory
*** [.pioenvs/teensy31/lib/libKeccakHash.a] Error 1

The library itself compiles fine and works if placed in the src folder instead. I’m running Debian Sid. I’ve been racking my brains for a few days on this, so any help is appreciated.

Could you provide a tree -L2 ./project to see a structure?

├── lib
│ ├── KeccakHash
│ │ └── src
│ │ *******├── KeccakHash.cpp
│ │ *******└── KeccakHash.h
│ └── readme.txt
├── platformio.ini
└── src
*******└── main.cpp

Could you provide a simple project to reproduce this issue?

Here’s an old project that just uses HID utilities to make a mouse move around it fun patterns. I can confirm that this worked and compiled before.

I’m having the exact same issue

Archiving .pioenvs/teensy31/lib/libcurves.a
rc: .pioenvs/teensy31/lib/libcurves.a: No such file or directory
*** [.pioenvs/teensy31/lib/libcurves.a] Error 1

Thank you very much for the report! Fixed in Release 2.5.1 · platformio/platform-teensy · GitHub

Please pio update.

Everything seems to be working fine now. Thanks so much for the help! It should also be worth noting that rc isn’t installed by default in Sid, so that might need to be a dependency.