diff options
-rw-r--r-- | var/spack/repos/builtin/packages/qt/package.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 447af5f1af..dfe83888e5 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -226,8 +226,14 @@ class Qt(Package): @when('@3') def configure(self): - # A user reported that this was necessary to link Qt3 on ubuntu - os.environ['LD_LIBRARY_PATH'] += os.pathsep + os.getcwd() + '/lib' + # A user reported that this was necessary to link Qt3 on ubuntu. + # However, if LD_LIBRARY_PATH is not set the qt build fails, check + # and set LD_LIBRARY_PATH if not set, update if it is set. + if os.environ.get('LD_LIBRARY_PATH'): + os.environ['LD_LIBRARY_PATH'] += os.pathsep + os.getcwd() + '/lib' + else: + os.environ['LD_LIBRARY_PATH'] = os.pathsep + os.getcwd() + '/lib' + configure('-prefix', self.prefix, '-v', '-thread', |