[packages] lsm: fix compilation with ccache (#8539)