specpath = getCmndOutput( gccExec + " --print-file libgcc.a | sed 's|/libgcc.a||'", True) print "specpath = " + specpath rpath = "" libPath = rpathbase + "/lib" if os.path.exists(libPath): rpath = appendToRPath(rpath, libPath) lib64Path = rpathbase + "/lib64" if os.path.exists(lib64Path): rpath = appendToRPath(rpath, lib64Path) print "rpath will be: '" + rpath + "'" specsfile = specpath + "/specs" if os.path.exists(specsfile): print "Backing up the existing GCC specs file '" + specsfile + "' ..." echoRunSysCmnd("cp " + specsfile + " " + specsfile + ".backup") print "Writing to GCC specs file " + specsfile gccSpecs = getCmndOutput(gccExec + " -dumpspecs", True) #print "gccSpecs:\n", gccSpecs gccSpecsMod = addRpathToLink(gccSpecs, rpath) #print "gccSpecsMod:\n", gccSpecsMod writeStrToFile(specsfile, gccSpecsMod) # # Executable statements # gitInstaller = InstallProgramDriver(GccInstall()) gitInstaller.runDriver()
getParallelOpt(self.inOptions, "--parallel=")+\ " --prefix="+self.inOptions.installDir, extraEnv={"CXXFLAGS":"-O3", "CFLAGS":"-O3"}, ) def doBuild(self): echoChDir(self.cmakeBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") + self.inOptions.makeOptions) def doInstall(self): echoChDir(self.cmakeBuildBaseDir) echoRunSysCmnd("make " + self.inOptions.makeOptions + " install") def getFinalInstructions(self): return """ To use the installed version of cmake-""" + self.inOptions.version + """ add the path: """ + self.inOptions.installDir + """/bin to your path and that should be it! """ # # Executable statements # cmakeInstaller = InstallProgramDriver(CMakeInstall()) cmakeInstaller.runDriver()
+ self.inOptions.makeOptions) def doInstall(self): echoChDir(self.gccBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") \ + self.inOptions.makeOptions + " install") def getFinalInstructions(self): return """ To use the installed version of gcc-""" + self.inOptions.version + """ add the path: """ + self.inOptions.installDir + """/bin to your path and that should be it! Also, when you link shared libs or executables, pass in: -Wl,-rpath,""" + self.inOptions.installDir + """/lib[64] That will make it so that you don't need to add this GCC libs to your LD_LIBRARY_PATH. """ # # Executable statements # gccInstaller = InstallProgramDriver(GccInstall()) gccInstaller.runDriver()
print "rpathbase = "+rpathbase specpath = getCmndOutput(gccExec+" --print-file libgcc.a | sed 's|/libgcc.a||'", True) print "specpath = "+specpath rpath = "" libPath = rpathbase+"/lib" if os.path.exists(libPath): rpath = appendToRPath(rpath, libPath) lib64Path = rpathbase+"/lib64" if os.path.exists(lib64Path): rpath = appendToRPath(rpath, lib64Path) print "rpath will be: '"+rpath+"'" specsfile = specpath+"/specs" if os.path.exists(specsfile): print "Backing up the existing GCC specs file '"+specsfile+"' ..." echoRunSysCmnd("cp "+specsfile+" "+specsfile+".backup") print "Writing to GCC specs file "+specsfile gccSpecs = getCmndOutput(gccExec+" -dumpspecs", True) #print "gccSpecs:\n", gccSpecs gccSpecsMod = addRpathToLink(gccSpecs, rpath) #print "gccSpecsMod:\n", gccSpecsMod writeStrToFile(specsfile, gccSpecsMod) # # Executable statements # gitInstaller = InstallProgramDriver(GccInstall()) gitInstaller.runDriver()
" "+self.inOptions.extraConfigureOptions+\ getParallelOpt(self.inOptions, "--parallel=")+\ " --prefix="+self.inOptions.installDir, extraEnv={"CXXFLAGS":"-O3", "CFLAGS":"-O3"}, ) def doBuild(self): echoChDir(self.cmakeBuildBaseDir) echoRunSysCmnd("make "+getParallelOpt(self.inOptions, "-j")+self.inOptions.makeOptions) def doInstall(self): echoChDir(self.cmakeBuildBaseDir) echoRunSysCmnd("make "+self.inOptions.makeOptions+" install") def getFinalInstructions(self): return """ To use the installed version of cmake-"""+self.inOptions.version+""" add the path: """+self.inOptions.installDir+"""/bin to your path and that should be it! """ # # Executable statements # cmakeInstaller = InstallProgramDriver(CMakeInstall()) cmakeInstaller.runDriver()
def test_default(self): ipd = InstallProgramDriver(DummyInstall()) sys.argv = ["scriptName"] self.assertEqual(ipd.runDriver(), None)
"""+self.inOptions.installDir+"""/include the libraries in the directory: """+self.inOptions.installDir+"""/lib and the executables and compiler wrappers (e.g. mpicc, mpic++, mpirun, etc.) in: """+self.inOptions.installDir+"""/bin Actually, using the MPI compiler wrappers mpicc, mpic++, etc. is prefered. """ def getEnvCmnd(self): envCmnd = "env " if self.inOptions.withPath: envCmnd = "PATH="+self.inOptions.withPath+":$PATH " if self.inOptions.withLibDir: envCmnd += "LD_LIBRARY_PATH="+self.inOptions.withLibDir+":$LD_LIBRARY_PATH " envCmnd += "echo 'PATH='$PATH && echo 'LD_LIBRARY_PATH='$LD_LIBRARY_PATH && which gcc && gcc --version && " return envCmnd # # Executable statements # openmpiInstaller = InstallProgramDriver(OpenMpiInstall()) openmpiInstaller.runDriver()
""" + self.inOptions.installDir + """/include the libraries in the directory: """ + self.inOptions.installDir + """/lib and the executables and compiler wrappers (e.g. mpicc, mpic++, mpirun, etc.) in: """ + self.inOptions.installDir + """/bin Actually, using the MPI compiler wrappers mpicc, mpic++, etc. is prefered. """ def getEnvCmnd(self): envCmnd = "env " if self.inOptions.withPath: envCmnd = "PATH=" + self.inOptions.withPath + ":$PATH " if self.inOptions.withLibDir: envCmnd += "LD_LIBRARY_PATH=" + self.inOptions.withLibDir + ":$LD_LIBRARY_PATH " envCmnd += "echo 'PATH='$PATH && echo 'LD_LIBRARY_PATH='$LD_LIBRARY_PATH && which gcc && gcc --version && " return envCmnd # # Executable statements # openmpiInstaller = InstallProgramDriver(OpenMpiInstall()) openmpiInstaller.runDriver()
" --prefix="+self.inOptions.installDir, extraEnv={"CFLAGS":"-O3"}, ) def doBuild(self): echoChDir(self.autoconfBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") \ + self.inOptions.makeOptions) def doInstall(self): echoChDir(self.autoconfBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") \ + self.inOptions.makeOptions + " install") def getFinalInstructions(self): return """ To use the installed version of autoconf-""" + self.inOptions.version + """ add the path: """ + self.inOptions.installDir + """/bin to your path and that should be it! """ # # Executable statements # autoconfInstaller = InstallProgramDriver(AutoconfInstall()) autoconfInstaller.runDriver()
+ self.inOptions.makeOptions) def doInstall(self): echoChDir(self.mvapichBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") \ + self.inOptions.makeOptions + " install") def getFinalInstructions(self): return """ To use the installed version of mvapich-""" + self.inOptions.version + """ add the path: """ + self.inOptions.installDir + """/bin to your path and that should be it! Also, when you link shared libs or executables, pass in: -Wl,-rpath,""" + self.inOptions.installDir + """/lib[64] That will make it so that you don't need to add this MPICH libs to your LD_LIBRARY_PATH. """ # # Executable statements # mvapichInstaller = InstallProgramDriver(MvapichInstall()) mvapichInstaller.runDriver()
def test_default(self): ipd = InstallProgramDriver(DummyInstall()) sys.argv = ["scriptName", "--install-dir=/some/install/path"] self.assertEqual(ipd.runDriver(), None)
+ self.inOptions.makeOptions) def doInstall(self): echoChDir(self.mpichBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") \ + self.inOptions.makeOptions + " install") def getFinalInstructions(self): return """ To use the installed version of mpich-"""+self.inOptions.version+""" add the path: """+self.inOptions.installDir+"""/bin to your path and that should be it! Also, when you link shared libs or executables, pass in: -Wl,-rpath,"""+self.inOptions.installDir+"""/lib[64] That will make it so that you don't need to add this MPICH libs to your LD_LIBRARY_PATH. """ # # Executable statements # mpichInstaller = InstallProgramDriver(MpichInstall()) mpichInstaller.runDriver()
def doBuild(self): echoChDir(self.autoconfBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") + self.inOptions.makeOptions) def doInstall(self): echoChDir(self.autoconfBuildBaseDir) echoRunSysCmnd("make " + getParallelOpt(self.inOptions, "-j") + self.inOptions.makeOptions + " install") def getFinalInstructions(self): return ( """ To use the installed version of autoconf-""" + self.inOptions.version + """ add the path: """ + self.inOptions.installDir + """/bin to your path and that should be it! """ ) # # Executable statements # autoconfInstaller = InstallProgramDriver(AutoconfInstall()) autoconfInstaller.runDriver()