I know in the wiki is mentioned that i should copy it from an old image.
But that couldn't be the solution.
Which library provides -lpi?
/usr/bin/ld: cannot find -lpi collect2: error: ld returned 1 exit status make: *** [Makefile:40: pi_marlin] Error 1
Hi, sorry for replay late. the source for libpi.so is released here: https://gitee.com/markyue/libpi it depends on wiringPi, so you may need to change the wiringpi path in the driver_api.cpp.
Ok after flashing every image to a Pi 3 and 4 and searching for the sources it turned out that the source for libpi.so was never released.
Depending on binary blobs is meh'
I wanted to build a an actual image with octoprint 1.7.0 and python3 with picustopizer. But "Depending on binary blobs is meh'" so i will use the 2 boards i have as long as they work and if something blows up i switch to an open source hw/sw combination.