Hi,
These days, GCC stands for the GNU Compiler Collection, but here we're only interested in the C and maybe C++ compilers.
These instructions show how to build the prerequisite libraries separately from gcc, although another valid approach would be to place their source code in properly-named subdirectories under the gcc build tree and let everything get built along with gcc itself (this is mentioned and the directory names are given on the gcc prerequisites web page).
Download gmp-4.3.2.tar.bz2, mpfr-2.4.2.tar.bz2, and mpc-0.8.1.tar.gz from ftp://gcc.gnu.org/pub/gcc/infrastructure/. Download gcc-core-4.5.0.tar.bz2 and optionally gcc-g++-4.5.0.tar.bz2 from ftp://gcc.gnu.org/pub/gcc/releases/ (there are also newer development snapshots in a nearby directory, perhaps the same approach will work for them as well).
Build gmp:
mkdir ~/gmp-4.3.2 ~/build
cd ~/build
tar xjf gmp-4.3.2.tar.bz2
cd gmp-4.3.2
./configure --prefix=/home/user/gmp-4.3.2 --enable-cxx
nice -n 19 time make -j8
make install
# Optionally, test our build of gmp:
make check
echo $?
The –enable-cxx option is needed in case we intend to possibly build ppl, which will use this build of gmp. ppl is in turn needed for building gcc with Graphite (which we're not doing yet).
Build mpfr:
mkdir ~/mpfr-2.4.2
cd ~/build
tar xjf mpfr-2.4.2.tar.bz2
cd mpfr-2.4.2
./configure --prefix=/home/user/mpfr-2.4.2 --with-gmp=/home/user/gmp-4.3.2
nice -n 19 time make -j8
make install
Build mpc:
mkdir ~/mpc-0.8.1
cd ~/build
tar xzf mpc-0.8.1.tar.gz
cd mpc-0.8.1
LD_LIBRARY_PATH=/home/user/gmp-4.3.2/lib:/home/user/mpfr-2.4.2/lib ./configure --prefix=/home/user/mpc-0.8.1 --with-gmp=/home/user/gmp-4.3.2 --with-mpfr=/home/user/mpfr-2.4.2
LD_LIBRARY_PATH=/home/user/gmp-4.3.2/lib:/home/user/mpfr-2.4.2/lib nice -n 19 time make -j8
make install
Build gcc:
mkdir ~/gcc-4.5.0
cd ~/build
tar xjf gcc-core-4.5.0.tar.bz2
tar xjf gcc-g++-4.5.0.tar.bz2 # optional
cd gcc-4.5.0
LD_LIBRARY_PATH=/home/user/gmp-4.3.2/lib:/home/user/mpfr-2.4.2/lib:/home/user/mpc-0.8.1/lib ./configure --prefix=/home/user/gcc-4.5.0 --with-gmp=/home/user/gmp-4.3.2 --with-mpfr=/home/user/mpfr-2.4.2 --with-mpc=/home/user/mpc-0.8.1 --disable-multilib
LD_LIBRARY_PATH=/home/user/gmp-4.3.2/lib:/home/user/mpfr-2.4.2/lib:/home/user/mpc-0.8.1/lib nice -n 19 time make -j8
make install
Beware: if you happen to omit or mistype the LD_LIBRARY_PATH setting (or if it needs to be revised for newer versions of the software components involved) or/and omit the –disable-multilib option (yet you're on an x86_64 or a “similar” 64-bit system without 32-bit compatibility compiler and libraries installed), then the build will likely fail with an error message that would not indicate the root cause of the failure. The error message will not provide any hint about LD_LIBRARY_PATH and –disable-multilib.
How to build GCC with the Graphite loop optimizations
Additionally download ppl-0.10.2.tar.gz and cloog-ppl-0.15.9.tar.gz from ftp://gcc.gnu.org/pub/gcc/infrastructure/.
ppl fails to build with gcc 3.4.5 that we have in Owl, triggering an internal compiler error. So we will be using our brand new builds of gcc and g++ from this point on. Also, we'll assume that our LD_LIBRARY_PATH already has gmp, mpfr, and mpc.
Build ppl:
mkdir ~/ppl-0.10.2
cd ~/build
tar xzf ppl-0.10.2.tar.gz
cd ppl-0.10.2
CXXFLAGS=-I/home/user/gmp-4.3.2/include LDFLAGS=-L/home/user/gmp-4.3.2/lib ./configure --prefix=/home/user/ppl-0.10.2 --with-libgmp-prefix=~/gmp-4.3.2
nice -n 19 time make -j8
make install
The explicit specification of include and library paths via CXXFLAGS and LDFLAGS is a workaround for incomplete implementation of –with-libgmp-prefix in the configure script.
Build cloog-ppl:
mkdir ~/cloog-ppl-0.15.9
cd ~/build
tar xzf cloog-ppl-0.15.9.tar.gz
cd cloog-ppl-0.15.9
CFLAGS='-I/home/user/gmp-4.3.2/include -I/home/user/ppl-0.10.2/include' LDFLAGS=-L/home/user/gmp-4.3.2/lib ./configure --prefix=/home/user/cloog-ppl-0.15.9 --with-gmp=/home/user/gmp-4.3.2 --with-ppl=/home/user/ppl-0.10.2
nice -n 19 time make -j8
make install
The explicit include and library paths specified via CFLAGS and LDFLAGS are for the same reason as above - bad configure script.
Now let's rebuild gcc:
mkdir ~/gcc-4.5.0-g
cd ~/build/gcc-4.5.0
make distclean
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/ppl-0.10.2/lib:/home/user/cloog-ppl-0.15.9/lib ./configure --prefix=/home/user/gcc-4.5.0-g --with-gmp=/home/user/gmp-4.3.2 --with-mpfr=/home/user/mpfr-2.4.2 --with-mpc=/home/user/mpc-0.8.1 --with-ppl=/home/user/ppl-0.10.2 --with-cloog=/home/user/cloog-ppl-0.15.9 --disable-multilib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/ppl-0.10.2/lib:/home/user/cloog-ppl-0.15.9/lib nice -n 19 time make -j8
make install
Citation
How to create a user-local build of recent GCC. (2010, June 26) In Openwall.info wiki. Retrieved July 19, 2010, from http://openwall.info/wiki/internal/gcc-local-build
Techblog
Monday, July 19, 2010
No sound in Dell Studio with Ubuntu
If there is no sound in your dell studio, when you install Ubuntu in it then you have to make a small change and I hope that the problem will be solved. Do as following
On terminal type the following :
sudo vi /etc/modprobe.d/alsa-base.conf
And add this line to the file-
options snd-hda-intel model=dell-m6
Happy listening
On terminal type the following :
sudo vi /etc/modprobe.d/alsa-base.conf
And add this line to the file-
options snd-hda-intel model=dell-m6
Happy listening
Saturday, July 17, 2010
Change name in terminal
when we open a terminal we se something like this
abc@xyz:~$
to change this xyz do the following
sudo su
then enter the password
now move to etc/
now type vi hostname
here a name will be written so you can change that name to the desired name and restart your system.
Now when u will open the terminal u will find
abc@
N-joy
abc@xyz:~$
to change this xyz do the following
sudo su
then enter the password
now move to etc/
now type vi hostname
here a name will be written so you can change that name to the desired name and restart your system.
Now when u will open the terminal u will find
abc@
N-joy
Subscribe to:
Comments (Atom)