Compounds of alkaline earth metals or magnesium