A compound of formula: or a pharmaceutically acceptable salt thereof, wherein: C-A-X of formula is any one of formulae (la), (Ib), (Ic) or (Id): A 1 is CR 1 or N, A 2 is CR 2 or N, A 3 is CR 3 or N, and A 4 is CR 4; R 1 is H or hydroxy; R 2 is selected from the group consisting of H, hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, halo, SO 2 C 1 -C 4 alkyl, NHSO 2 C 1 -C 4 alkyl, SO 2 C 3 -C 6 cycloalkyl, NHSO 2 C 3 -C 6 cycloalkyl, C 1 -C 5 alkyloxy and C 1 -C 5 alkylamino; R 3 and R 4 are independently selected from the group consisting of H, hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, halo, C 1 -C 5 alkyloxy and C 1 -C 5 alkylamino; with the proviso that at least one of R 1, R 2, R 3 or R 4 is hydroxy; B' is H or hydroxy; and R 5 is either H or a first substituent; each first substituent is independently selected from the group consisting of hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkylol, halo, SO 2 C 1 -C 4 alkyl, NHSO 2 C 1 -C 4 alkyl, SO 2 C 3 -C 6 cycloalkyl, NHSO 2 C 3 -C 6 cycloalkyl, SO 2 C 1 -C 4 alkylol, NHSO 2 C 1 -C 4 alkylol, C 1 -C 5 alkyloxy, C 1 -C 5 alkylamino, SO 2 NH 2, CONH 2, CONHC 1 -C 4 alkyl, NHCOC 1 -C 4 alkyl, NHSO 2 N(C 1 -C 4 alkyl) 2, C 1 -C 6 fluoroalkyl, SO 2 C 1 -C 4 fluoroalkyl, NHSO 2 C 1 -C 4 fluoroalkyl, C 1 -C 5 fluoroalkyloxy, and C 1 -C 5 fluoroalkylamino; X is selected from the group consisting of O, CR 2, NR' and S, wherein R is individually selected from the group consisting of H, C 1 -C 4 alkyl and halo, and R' is selected from the group consisting of C 1 -C 4 alkyl and H; Z is selected from the group consisting of a 5- or 6-membered aromatic or heteroaromatic ring, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, CR A R B R C, C 2 -C 5 oxacycloalkyl, C 2 -C 5 azacycloalkyl and morpholinyl, each of which is optionally substituted at one or more carbon and/or heteroatoms with a second substituent; wherein R A is a C 3 -C 5 cycloalkyl, R B is selected from the group consisting of a C 3 -C 5 cycloalkyl, methyl and ethyl, and R C is OH; and each second substituent is independently selected from the group consisting of hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, halo, C 1 -C 5 alkyloxy, C 1 -C 5 alkylamino, oxo, cyano, C 1 -C 6 fluoroalkyl, C 1 -C 5 fluoroalkyloxy, and C 1 -C 5 fluoroalkylamino. A 1 is CR 1 or N, A 2 is CR 2 or N, A 3 is CR 3 or N, and A 4 is CR 4; R 1 is H or hydroxy; R 2 is selected from the group consisting of H, hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, halo, SO 2 C 1 -C 4 alkyl, NHSO 2 C 1 -C 4 alkyl, SO 2 C 3 -C 6 cycloalkyl, NHSO 2 C 3 -C 6 cycloalkyl, C 1 -C 5 alkyloxy and C 1 -C 5 alkylamino; R 3 and R 4 are independently selected from the group consisting of H, hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, halo, C 1 -C 5 alkyloxy and C 1 -C 5 alkylamino; with the proviso that at least one of R 1, R 2, R 3 or R 4 is hydroxy; B' is H or hydroxy; and R 5 is either H or a first substituent; each first substituent is independently selected from the group consisting of hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, C 1 -C 6 alkylol, halo, SO 2 C 1 -C 4 alkyl, NHSO 2 C 1 -C 4 alkyl, SO 2 C 3 -C 6 cycloalkyl, NHSO 2 C 3 -C 6 cycloalkyl, SO 2 C 1 -C 4 alkylol, NHSO 2 C 1 -C 4 alkylol, C 1 -C 5 alkyloxy, C 1 -C 5 alkylamino, SO 2 NH 2, CONH 2, CONHC 1 -C 4 alkyl, NHCOC 1 -C 4 alkyl, NHSO 2 N(C 1 -C 4 alkyl) 2, C 1 -C 6 fluoroalkyl, SO 2 C 1 -C 4 fluoroalkyl, NHSO 2 C 1 -C 4 fluoroalkyl, C 1 -C 5 fluoroalkyloxy, and C 1 -C 5 fluoroalkylamino; X is selected from the group consisting of O, CR 2, NR' and S, wherein R is individually selected from the group consisting of H, C 1 -C 4 alkyl and halo, and R' is selected from the group consisting of C 1 -C 4 alkyl and H; Z is selected from the group consisting of a 5- or 6-membered aromatic or heteroaromatic ring, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, CR A R B R C, C 2 -C 5 oxacycloalkyl, C 2 -C 5 azacycloalkyl and morpholinyl, each of which is optionally substituted at one or more carbon and/or heteroatoms with a second substituent; wherein R A is a C 3 -C 5 cycloalkyl, R B is selected from the group consisting of a C 3 -C 5 cycloalkyl, methyl and ethyl, and R C is OH; and each second substituent is independently selected from the group consisting of hydroxy, C 1 -C 6 alkyl, C 3 -C 6 cycloalkyl, halo, C 1 -C 5 alkyloxy, C 1 -C 5 alkylamino, oxo, cyano, C 1 -C 6 fluoroalkyl, C 1 -C 5 fluoroalkyloxy, and C 1 -C 5 fluoroalkylamino.