compiling error with attiny45

Just as a hypothesis ...

The Attiny45 has 4 Kb of program memory. Asking it to print a float is probably loading in more libraries than will fit.

Maybe the file is too big?

Yes, maybe you asked too much of a processor with 4096 bytes of program space.

This doesn't totally prove it, but if you set the board to Uno, the space needed is:

Binary sketch size: 5528 bytes (of a 32256 byte maximum)

That's more than 4 Kb.