We study orientability issues of moduli spaces from gauge theories on Calabi-Yau manifolds. Our results generalize and strengthen those for Donaldson Thomas theory on Calabi -Yau manifolds of dimensions 3 and 4. We also prove a corresponding result in the relative situation which is relevant to the gluing formula in DT theory. (C) 2017 Elsevier Inc. All rights reserved.