Compiling and Installing SNAP
Procedure
- Run the following command to decompress the installation package:
tar zxvf snap-2013-11-29.tar.gz
- Run the following command to go to the directory generated after the decompression:
cd snap
- Run the following commands to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to enter the insert mode and delete the -Werror option from line 97 to line 101.
Before the modification:
make $(APP) CC="gcc" CFLAGS="-O2 –Wall -Werror" make $(APP2) CC="gcc" CFLAGS="-O2 –Wall -Werror " make $(APP3) CC="gcc" CFLAGS="-O2 –Wall -Werror " make $(APP4) CC="gcc" CFLAGS="-O2 –Wall -Werror " make $(APP5) CC="gcc" CFLAGS="-O2 –Wall -Werror "
After the modification:
make $(APP) CC="gcc" CFLAGS="-O2 –Wall" make $(APP2) CC="gcc" CFLAGS="-O2 –Wall" make $(APP3) CC="gcc" CFLAGS="-O2 –Wall" make $(APP4) CC="gcc" CFLAGS="-O2 –Wall" make $(APP5) CC="gcc" CFLAGS="-O2 –Wall"
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Run the following command to go to the Zoe directory:
cd Zoe
- Run the following commands to modify the Makefile file:
- Open Makefile.
vi Makefile
- Press i to enter the insert mode and delete the -Werror option from line 94 to line 102.
Before the modification:
gcc: make $(APP) CC="gcc" CFLAGS="-O2 -Wall -Werror" all: make $(APP) CC="gcc" CFLAGS="-O2 –Wall -Werror " make $(APP2) CC="gcc" CFLAGS="-O2 –Wall -Werror " make $(APP3) CC="gcc" CFLAGS="-O2 –Wall -Werror " make $(APP4) CC="gcc" CFLAGS="-O2 –Wall -Werror " make $(APP5) CC="gcc" CFLAGS="-O2 –Wall -Werror "After the modification:
gcc: make $(APP) CC="gcc" CFLAGS="-O2 -Wall" all: make $(APP) CC="gcc" CFLAGS="-O2 –Wall" make $(APP2) CC="gcc" CFLAGS="-O2 –Wall" make $(APP3) CC="gcc" CFLAGS="-O2 –Wall" make $(APP4) CC="gcc" CFLAGS="-O2 –Wall" make $(APP5) CC="gcc" CFLAGS="-O2 –Wall" - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Run the following commands to perform the installation and compilation:
cd /path/to/SNAP/snap make
- Run the following command to add the environment variable:
export PATH=/path/to/SNAP/snap:$PATH
Parent topic: SNAP 2013-11-29 Porting Guide (CentOS 7.6)