A new route for the preparation of four new indolizidines, (1R,2S,6S,7S,8aS)- and (1R,2S,6R,7R,8aS)-1,2,6,7-tetrahydroxyindolizidine (30 and 32) and (1S,2R,7S,8S,8a-R)- and (1S,2R,7R,8R,8a-R)1,2,7,8-tetrahydroxyindolizidine (44 and 46), is reported. The synthesis is based on Knoevenagel homologation of the readily available enantiomerically pure pyrrolidin-carbaldehydes 13 and 37 followed by asymmetric dihydroxylation of the subsequent alkenyl pyrrolidines and cyclization of the corresponding imino-octitols. The new indolizidines and their precursors (imino-octitols 20, 25, 26) and indolizidinones 28a and 28b have been tested for inhibitory activities toward 26 glycosidases. The enzymatic inhibition of trans-7-hydroxy-D-(-)-swainsonine (44) toward alpha-mannosidases is similar to that described for trans-7-hydroxy-L-(+)-swainsonine (11b) toward naringinase (alpha-L-rhamnosidase from Penicillium decumbens).