1# F-Stack Build GUide 2 3The procedures to compile f-stack in different linux releases is almost the same, but there are still some points you need to pay attention to. This document aims to help you solve some of the problems you may meet when compiling f-stack in different linux releases. 4 5```sh 6$ sudo -i 7# in centos and redhat 8$ yum install -y git gcc openssl-devel kernel-devel-$(uname -r) bc numactl-devel python 9# in ubuntu 10$ apt-get install git gcc openssl libssl-dev linux-headers-$(uname -r) bc libnuma1 libnuma-dev libpcre3 libpcre3-dev zlib1g-dev python 11 12$ mkdir /data/f-stack 13$ git clone https://github.com/F-Stack/f-stack.git /data/f-stack 14 15# compile dpdk 16$ cd /data/f-stack/dpdk 17$ meson build 18$ ninja -C build 19$ ninja -C build install 20 21# Upgrade pkg-config while version < 0.28 22$ cd /data 23$ wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz 24$ tar xzvf pkg-config-0.29.2.tar.gz 25$ cd pkg-config-0.29.2 26$ ./configure --with-internal-glib 27$ make 28$ make install 29$ mv /usr/bin/pkg-config /usr/bin/pkg-config.bak 30$ ln -s /usr/local/bin/pkg-config /usr/bin/pkg-config 31 32# Compile f-stack lib 33$ export FF_PATH=/data/f-stack 34$ export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig 35$ cd /data/f-stack/lib 36$ make 37 38# Compile Nginx 39$ cd ../app/nginx-1.16.1 40$ ./configure --prefix=/usr/local/nginx_fstack --with-ff_module 41$ make 42$ make install 43 44# Compile Redis 45$ cd ../redis-5.0.5 46$ make 47 48# Compile f-stack tools 49$ cd ../../tools 50$ make 51 52# Compile helloworld examples 53$ cd ../examples 54$ make 55``` 56 57## Compile tools in Ubuntu 58 59- remove '\\' in statement printf at f-stack/tools/netstat/Makefile line 70, now it should be: 60 61``` 62- printf("\#define\tN%s\t%s\n", toupper($$2), i++); 63+ printf("#define\tN%s\t%s\n", toupper($$2), i++); 64``` 65 66## Compile dpdk in virtual machine 67 68- f-stack/dpdk/lib/librte_eal/linuxapp/igb_uio/igb_uio.c line 279: 69``` 70 71- if (pci_intx_mask_supported(udev->pdev)) { 72+ if (true || pci_intx_mask_supported(udev->pdev)) { 73``` 74