The present invention relates to a process for the preparation of the racemic or optically active compounds of general formula (VI):wherein the meaning of X is a halogen atom, or their salts, characterized in that, a racemic or optically active new compound of general formula (VII):wherein the meaning of X is a halogen atom, is transformed into the racemic or optically active compound of general formula (VIII):