From 4da66d71b0c8522905d5647c68a5caca60eec008 Mon Sep 17 00:00:00 2001 From: Jim Galarowicz Date: Sat, 18 Feb 2017 13:56:40 -0800 Subject: Fix for qt3 specific qt build (#3063) * Update the krell institute products to use the latest features of spack for building on cluster platforms. * Address travis error messages and resubmit the pull request. * Update the contents of openspeedshop package.py so it passes the flake8 tests. * Fix flake8 error-whitespack issue in mrnet package.py file. * Add updates based on spack reviewer feedback. * More fixes based on comments from reviewers. Switch using extend to using append, remove additional setting of PATH and LD_LIBRARY_PATH that should not be required due to RPATH. * More review related changes. Update MPIOption.append lines and take out xercesc references. * Create a base options function for common openspeedshop base cmake options to reduce redundencies. * Add libxml2+python depends on to get around issues with the libxml2 package file. * Using boost over 1.60.0 causes compile errors. This is a known boost bug. Also, dyninst-9.2.0 is set to be the vesrion of dyninst to use with OSS, as of now. The newer version fails to build. * Fix bad syntax in specifying the boost version range. * Update the version numbers for the krell institute components and tools: cbtf and openspeedshop. * Do not build glib for qt3, it is not needed and causes build problems at this time anyway. * A fix was added for setting LD_LIBRARY_PATH in the qt3 build, but if LD_LIBRARY_PATH is not set the qt build fails. So so check and set LD_LIBRARY_PATH if not set, update if it is set. * Update the fix for qt3 build by setting LD_LIBRARY_PATH instead of checking for whether it is set or not per Adams comment that spack clears LD_LIBRARY_PATH. * A fix was added for setting LD_LIBRARY_PATH in the qt3 build, but if LD_LIBRARY_PATH is not set the qt build fails. So so check and set LD_LIBRARY_PATH if not set, update if it is set. * Trim comments to fit more concisely. * Fix tabs versus spaces and swap if and else clause check from a negative to a positive check. --- var/spack/repos/builtin/packages/qt/package.py | 10 ++++++++-- 1 file 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', -- cgit v1.2.3-70-g09d2