Safeway has posted a net loss for the first quarter because of higher costs and acquisition expenses.