Lecture3 - Modifying Programs Week 3 Laboratory How to...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Modifying Programs Week 3
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Laboratory
Background image of page 2
How to install software • Windows – Installshield – msi(Microsoft Installer) – Other Installers • Linux – rpm(Redhat Package Management) • RedHat Linux – apt(Advanced Package Tool) • Debian Linux, Ubuntu Linux – Good old build process • configure, make, make install
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Building Process configure – Check details about the machine before installation Dependency between packages – Creates ‘Makefile’ make – Requires ‘Makefile’ in order to run – Compiles all the program code and creates executables. make install – make utility searches for a label named install within the Makefile, and executes only that section of the Makefile.
Background image of page 4
Decompressing files • tar -zxvf filename.tar.gz – Option: -z, --gzip – Option: -x, --extract --get – Option: -v, --verbose – Option: -f, --file [HOSTNAME:]F • gzip -dc filename.tar.gz | tar xf – – Option: -d, decompress – Option: -c, compress
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Getting Set up • Download coreutils-7.6 to your home directory – Use ‘wget’ • Download the patch to your home directory • Untar and Unzip it – tar –xvf coreutils-7.6.tar.gz • Make a directory coreutilsInstall in your home directory (this is where you’ll be installing coreutils) – mkdir coreutilsInstall
Background image of page 6
Compiling • Go into coreutils-7.6 directory. This is what you just unzipped. • Read the INSTALL file on how to configure “make,” particularly the --prefix flag. • Run the configure script so that when everything is done, coreutils will be installed in the directory ~/coreutilsInstall • Compile it: make • Install it: make install
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Missing packages(Unbuntu users only) • Missing configure – sudo apt-get install build-essential • Missing make – sudo apt-get update – sudo apt-get install make
Background image of page 8
Applying the Patch •Download the patch Index: src/ls.c =================================================================== diff --git a/src/ls.c b/src/ls.c index 1bb6873. .4531b94 100644 --- a/src/ls.c +++ b/src/ls.c @@ -2014,7 +2014,6 @@ decode_switches (int argc, char **argv)
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 23

Lecture3 - Modifying Programs Week 3 Laboratory How to...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online