On the Poincaré problem for a compressible medium