Build your own local development environment

[ Home ] [ Design WorkBook ] [ Back to index ]

Contents

  • Introduction
  • Seeting up the local area
  • Build gcc and from source
  • Installing RPM packages in the local area
  • ….

http://openwall.info/wiki/internal/gcc-local-build

create your own, additional, RPM database and install software in your local space.

make a full environment for programming in a home folder

build your own quasi-filesystem under ~/local

No root privileges, g might not be installed!

run the configure script with the –prefix option

Install a rpm in home directory as non-root

mkdir ~/local

create a /usr/local/-like hierarchy E poi la si prepara con una struttura analoga a quella di /usr/local,

cd ~/local
mkdir bin etc include lib lib64 libexex sbin share src tmp

La directory ~/local diventa equivalente locale della system directory /usr che contiene tutto quello che e' usato da uno standard user

Oppure posso usare direttamente la dot directory ~/.local and ~/.local/share nella home where locally installed program data are stored

See also

http://www.ubooboo.net/zimPage.php?page=Local_Install
http://blog.sanctum.geek.nz/compiling-in-home/

setenv PREFIX   $HOME/local
setenv EPREFIX  $PREFIX

LD_LIBRARY_PATH deve adesso includere anche $HOME/local/lib and $HOME/local/lib64

setenv PATH                    $PREFIX/bin:$PATH
setenv LD_LIBRARY_PATH         $HOME/lib:$HOME/local/lib64:$LD_LIBRARY_PATH
#setenv C_INCLUDE_PATH          $PREFIX/include
#setenv CPLUS_INCLUDE_PATH      $PREFIX/include
#setenv MANPATH                 $PREFIX/share/man:$PREFIX/man:$MANPATH
#setenv CFLAGS                  "-I$PREFIX/include"
#setenv LDFLAGS                 "-L$PREFIX/lib"

How to install RPM packages without root privileges or sudo.

See also

http://warrickball.blogspot.it/2011/03/installing-rpm-software-without-admin.html
http://ajaya.name/?p=6353

Setup a private RPM database Create a local database, make the folder that will store your database

cd $HOME/local
mkdir -p $HOME/local/var/lib/rpm

/var/lib/rpm/ is a usual location for the RPM database

Poi inizializzo il database locale,

rpm --initdb --root $HOME/local --dbpath $HOME/local/var/lib/rpm

e copio in esso il contenuto di /var/lib/rpm cosi' RPM sa quali pacchetti sono gia' stati installati,

cp /var/lib/rpm/*  $HOME/local/var/lib/rpm/

Poi devo vedere se e rilocabile,

rpm -qip package.rpm

e se ha dipendenze non soddisfatte,

rpm -ivh package.rpm

che non lo installa pero' mi dice se i file estratti finiscono tutti a partire da /usr/xxx

Se tutti partono da /usr posso rilocare il pacchetto dicendo di usare ~/local come /usr

--relocate /usr=$HOME/local
rpm --dbpath $HOME/local/var/lib/rpm --relocate /usr=$HOME/local --nodeps -ivh package.rpm



More details about the usage of rpm can be found at

http://www.nordugrid.org/documents/rpm_for_everybody.html

use the –prefix switch of the configure script,

./configure --prefix=$HOME/local [other options]
make 
make install
./configure --prefix=$HOME/local [other options] && make && make install

See also

http://stackoverflow.com/questions/9316118/installing-gcc-as-non-root

In modo da arrivare ad avere

/users/<username>/local/bin/gcc

or

/users/<username>/local/bin/g++

Prerequisites:

Bison,

cd ~/local/src
wget http://ftp.gnu.org/gnu/bison/bison-2.7.tar.gz
tar -xzf bison-2.7.tar.gz
./configure --help
./configure --prefix=$HOME/local && make && make install

Ok…

Read http://gcc.gnu.org/install/

http://openwall.info/wiki/internal/gcc-local-build

Premessa… per compilare gcc serve gia avere un gcc!

gcc compiler should be already installed,

which gcc
/usr/bin/gcc

but not g++

which g++
g++: Command not found.
gcc -v | grep version

Ok

You need both the packages, gcc-core and gcc-g++

Dowload the source code from one ftp mirror, http://gcc.gnu.org/mirrors.html

As an example

Packages: gcc-core-4.x.y.tar.gz, gcc-g++.4.x.y.tar.gz

cd ~/local/src
wget http://gcc-uk.internet.bs/releases/gcc-4.1.2/gcc-core-4.x.y.tar.gz
wget http://gcc-uk.internet.bs/releases/gcc-4.1.2/gcc-g++-4.x.y.tar.gz
tar -xvzf gcc-core-4.x.y.tar.gz
tar -xvzf gcc-g++-4.x.y.tar.gz

Importante! Buildare tutto in una cartella diversa da quella dei sorgenti!

mkdir build
cd build
./../src/configure --prefix=$HOME/.local --enable-languages='c c++'

compile your own version of gcc and g++

Connect via FTP to root.cern.ch

cd ~/.local/opt
wget ftp://root.cern.ch/root/root_v5.32.04.source.tar.gz
tar -xzf root_v5.32.04.source.tar.gz
cd root
./configure --help
./configure [arch] [options]
make 
make install

Go here

See also

http://www.iram.fr/~roche/linux/softwares/LocalInstallation.html

tar -xzf package.tar.gz
cd 
./INSTALL
Enter installation directory <$HOME/.local>



Last update: Luca Pacher - July 31, 2013

  • vlsi/workbook/computing/local.txt
  • Ultima modifica: 29/10/2013 11:34
  • da pacher