Speech:Spring 2017 G++ Install Documentation

G++ Install Documentation

Author: Jeffrey Gancarz

This is the documentation for the installation of G++ on Obelix on 3/22/17.

Steps 1: Sign into Caesar as root login as: root root@caesar.unh.edu's password: Last login: Wed Mar 22 14:57:17 2017 from jeffrey.ra.unh.edu / __ \ \____/\__,_|\___||___/\__,_|_|                  Welcomes you!
 * / \/ __ _  ___  ___  __ _ _ __
 * |   / _` |/ _ \/ __|/ _` | '__|
 * \__/\ (_| | __/\__ \ (_| | |

[root@caesar ~]#

Step 2: ssh into Obelix ssh obelix

Step 3: Take snapshots of Obelix's files in the following directories. These were saved to /g++/pre-g++, using the ls -al command (i.e. ls -al /usr/sbin > snapshot/pre-g++/usr-sbin.txt /bin /lib /usr/bin /usr/sbin /usr/lib /usr/share/libgnomekbd /usr/share/libgweather /usr/share/libhangul /usr/share/librarian /usr/share/libthai /usr/share/libtool /usr/share/libwacom /var/lib /var/local /sys

Step 4: unmount /mnt/main on Obelix from Caesar umount -a

Step 5: Check to see if /mnt/main/ has been unmounted by trying to list the directories in /mnt/main/ on Obelix. If no directories are shown, then you know you have successfully unmounted /mnt/main/ dir /mnt/main

Step 6: Now that you have unmounted /mnt/main/ you can go ahead and type the command to install G++. The output of this will let the user know if the installation has been completed and what packages were updated or installed. yum install g++

At first we were getting an error here stating that no package g++ available

We quickly realized that we were not connected to the internet. Once we were able to connect Obelix to the internet, we tried to figure out the version of GCC that we had installed last week. We checked by using the following command gcc --version

We realized that we did not have a version of GCC installed on Obelix. This troubled us because we were certain that we installed GCC last week because during the install process it notified us that we installed the GCC package. After looking online and at some research, we found that the 'yum install gcc-c++' command actually installs G++ and not GCC. And that it just installs the GCC package to configure GCC. Therefore we had to go back and install GCC and this time make sure we had a version that we could check to make sure we definitely successfully installed GCC. We ran the yum install of GCC yum install gcc

The output of running the yum install of GCC was

=
=================================================================== Package        Arch       Version              Repository                Size

=
=================================================================== Installing: gcc            i686       4.4.7-17.el6         rhel-6-server-rpms       8.2 M Installing for dependencies: cloog-ppl      i686       0.15.7-1.2.el6       rhel-6-server-rpms        93 k cpp             i686       4.4.7-17.el6         rhel-6-server-rpms       3.4 M mpfr            i686       2.4.1-6.el6          rhel-6-server-rpms       153 k ppl             i686       0.10.2-11.el6        rhel-6-server-rpms       1.3 M

Transaction Summary

=
=================================================================== Install      5 Package(s)

Total download size: 13 M Installed size: 29 M Is this ok [y/N]: y Downloading Packages: (1/5): cloog-ppl-0.15.7-1.2.el6.i686.rpm                |  93 kB     00:00 (2/5): cpp-4.4.7-17.el6.i686.rpm                        | 3.4 MB     00:01 (3/5): gcc-4.4.7-17.el6.i686.rpm                        | 8.2 MB     00:02 (4/5): mpfr-2.4.1-6.el6.i686.rpm                        | 153 kB     00:00 (5/5): ppl-0.10.2-11.el6.i686.rpm                       | 1.3 MB     00:00

Total                                          2.2 MB/s |  13 MB     00:05 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : ppl-0.10.2-11.el6.i686                                      1/5 Installing : cloog-ppl-0.15.7-1.2.el6.i686                               2/5 Installing : mpfr-2.4.1-6.el6.i686                                       3/5 Installing : cpp-4.4.7-17.el6.i686                                       4/5 Installing : gcc-4.4.7-17.el6.i686                                       5/5 Verifying : mpfr-2.4.1-6.el6.i686                                        1/5 Verifying : cpp-4.4.7-17.el6.i686                                        2/5 Verifying : cloog-ppl-0.15.7-1.2.el6.i686                                3/5 Verifying : gcc-4.4.7-17.el6.i686                                        4/5 Verifying : ppl-0.10.2-11.el6.i686                                       5/5

Installed: gcc.i686 0:4.4.7-17.el6

Dependency Installed: cloog-ppl.i686 0:0.15.7-1.2.el6           cpp.i686 0:4.4.7-17.el6 mpfr.i686 0:2.4.1-6.el6                   ppl.i686 0:0.10.2-11.el6

Complete!

We then check the version number of GCC on Obelix to make sure that we could definitely find a version and double check to make sure if we installed in successfully. gcc --version

We received an output identifying a version after. gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Now that we knew we had definitely installed GCC, we decided to go ahead and reinstall G++. We thought that if we reinstalled it, it may just overwrite files that may have been installed prior without doing any damage to the system. yum install gcc-c++

The output of running the yum install was the following

=
=================================================================== Package             Arch      Version           Repository               Size

=
=================================================================== Installing: gcc-c++             i686      4.4.7-17.el6      rhel-6-server-rpms      4.3 M Installing for dependencies: libstdc++-devel     i686      4.4.7-17.el6      rhel-6-server-rpms      1.6 M

Transaction Summary

=
=================================================================== Install      2 Package(s)

Total download size: 5.9 M Installed size: 18 M Is this ok [y/N]: y Downloading Packages: (1/2): gcc-c++-4.4.7-17.el6.i686.rpm                    | 4.3 MB     00:01 (2/2): libstdc++-devel-4.4.7-17.el6.i686.rpm            | 1.6 MB     00:00

Total                                          3.1 MB/s | 5.9 MB     00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : libstdc++-devel-4.4.7-17.el6.i686                           1/2 Installing : gcc-c++-4.4.7-17.el6.i686                                   2/2 Verifying : libstdc++-devel-4.4.7-17.el6.i686                            1/2 Verifying : gcc-c++-4.4.7-17.el6.i686                                    2/2

Installed: gcc-c++.i686 0:4.4.7-17.el6

Dependency Installed: libstdc++-devel.i686 0:4.4.7-17.el6

Complete!

We decided to double check the version of G++ on Obelix as well, hoping that we would get an output of a version and solitify the fact that we had successfully installed G++ on to Obelix g++ --version

The output of checking the version came back with a version number of G++ and allowed us to identify the fact that we now had definitely installed both GCC and G++ onto Obelix. g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

After the installation was completed, we took another set of snapshots of the same directories listed in Step 3, this time to /g++/post-g++.

The diff command was used to check with directories were affected by the installation. Of the directories snapshot before and after the installation, only four were affected (/lib, /usr-bin, /usr-lib, and /var-lib). The output of these are below. [root@obelix g++]# diff pre-g++/lib.txt post-g++/lib.txt 2c2 < dr-xr-xr-x. 18 root root  12288 Mar  8 16:48. --- > dr-xr-xr-x. 18 root root  12288 Mar 22 15:20. 4a5 > lrwxrwxrwx. 1 root root     14 Mar 22 15:20 cpp -> ../usr/bin/cpp

[root@obelix g++]# diff pre-g++/usr-bin.txt post-g++/usr-bin.txt 1,2c1,2 < total 163276 < dr-xr-xr-x. 2 root root     40960 Mar  8 16:48. --- > total 165148 > dr-xr-xr-x. 2 root root     40960 Mar 22 15:24. 110a111 > -rwxr-xr-x. 4 root root    236308 Dec 16  2015 c++ 113a115,116 > -rwxr-xr-x. 1 root root       224 Dec 16  2015 c89 > -rwxr-xr-x. 1 root root       215 Dec 16  2015 c99 125a129 > lrwxrwxrwx. 1 root root         3 Mar 22 15:20 cc -> gcc 166a171 > -rwxr-xr-x. 1 root root      5908 Mar  1  2010 cloog 183a189 > -rwxr-xr-x. 1 root root    235780 Dec 16  2015 cpp 364a371 > -rwxr-xr-x. 4 root root    236308 Dec 16  2015 g++ 366a374 > -rwxr-xr-x. 2 root root    233796 Dec 16  2015 gcc 369a378 > -rwxr-xr-x. 1 root root     35368 Dec 16  2015 gcov 576a586,588 > -rwxr-xr-x. 4 root root    236308 Dec 16  2015 i686-redhat-linux-c++ > -rwxr-xr-x. 4 root root    236308 Dec 16  2015 i686-redhat-linux-g++ > -rwxr-xr-x. 2 root root    233796 Dec 16  2015 i686-redhat-linux-gcc 1000a1013 > -rwxr-xr-x. 1 root root     85204 Jun 23  2010 ppl-config 1007a1021 > -rwxr-xr-x. 1 root root     59600 Dec 16  2015 protoize 1365a1380 > -rwxr-xr-x. 1 root root     51080 Dec 16  2015 unprotoize

[root@obelix g++]# diff pre-g++/usr-lib.txt post-g++/usr-lib.txt 1,2c1,2 < total 241252 < dr-xr-xr-x. 136 root root   61440 Mar  8 16:48. --- > total 245920 > dr-xr-xr-x. 138 root root   61440 Mar 22 15:20. 37a38 > drwxr-xr-x. 3 root root    4096 Dec 16  2015 gcc 190a192,193 > lrwxrwxrwx. 1 root root      17 Mar 22 15:20 libcloog.so.0 -> libcloog.so.0.0.0 > -rwxr-xr-x. 1 root root  129916 Mar  1  2010 libcloog.so.0.0.0 699a703,704 > lrwxrwxrwx. 1 root root      16 Mar 22 15:20 libmpfr.so.1 -> libmpfr.so.1.2.0 > -rwxr-xr-x. 1 root root  315296 Jun 23  2010 libmpfr.so.1.2.0 870a876,879 > lrwxrwxrwx. 1 root root      17 Mar 22 15:20 libppl_c.so.2 -> libppl_c.so.2.1.0 > -rwxr-xr-x. 1 root root 3582016 Jun 23  2010 libppl_c.so.2.1.0 > lrwxrwxrwx. 1 root root      15 Mar 22 15:20 libppl.so.7 -> libppl.so.7.1.0 > -rwxr-xr-x. 1 root root  738880 Jun 23  2010 libppl.so.7.1.0 1336a1346 > drwxr-xr-x. 2 root root    4096 Jun 23  2010 ppl

[root@obelix g++]# diff pre-g++/var-lib.txt post-g++/var-lib.txt               22c22 < drwxr-xr-x. 2 root   root    4096 Mar 16 17:02 NetworkManager --- > drwxr-xr-x. 2 root   root    4096 Mar 22 15:27 NetworkManager 25c25 < drwxr-xr-x. 2 root   root    4096 Mar  8 16:36 PackageKit --- > drwxr-xr-x. 2 root   root    4096 Mar 22 15:25 PackageKit 44c44 < drwxr-xr-x. 6 root   root    4096 Mar  8 16:35 yum --- > drwxr-xr-x. 6 root   root    4096 Mar 22 15:24 yum