xref: /f-stack/doc/F-Stack_Build_Guide.md (revision 83438cff)
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$ make config T=x86_64-native-linuxapp-gcc
18$ make
19
20# Compile f-stack lib
21$ export FF_PATH=/data/f-stack
22$ export FF_DPDK=/data/f-stack/dpdk/build
23$ cd /data/f-stack/lib
24$ make
25
26# Compile Nginx
27$ cd ../app/nginx-1.16.1
28$ ./configure --prefix=/usr/local/nginx_fstack --with-ff_module
29$ make
30$ make install
31
32# Compile Redis
33$ cd ../redis-5.0.5
34$ make
35
36# Compile f-stack tools
37$ cd ../../tools
38$ make
39
40# Compile helloworld examples
41$ cd ../examples
42$ make
43```
44
45## Compile tools in Ubuntu
46
47- remove '\\' in statement printf at f-stack/tools/netstat/Makefile line 70, now it should be:
48
49```
50-   printf("\#define\tN%s\t%s\n", toupper($$2), i++);
51+   printf("#define\tN%s\t%s\n", toupper($$2), i++);
52```
53
54## Compile dpdk in virtual machine
55
56- f-stack/dpdk/lib/librte_eal/linuxapp/igb_uio/igb_uio.c line 279:
57```
58
59-   if (pci_intx_mask_supported(udev->pdev)) {
60+   if (true || pci_intx_mask_supported(udev->pdev)) {
61```