diff --git a/Dockerfile b/Dockerfile index e296c3eb..21b0f7c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN apt-get -q update && apt-get -q -y install \ libhyperscan-dev \ liblua5.3-dev -RUN cd /opt && curl -L -s https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz | tar zx +RUN cd /opt && curl -L -s https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz | tar zx RUN mkdir -p ${NFF_GO} COPY . ${NFF_GO} diff --git a/README.md b/README.md index e1dae881..9ff950c5 100644 --- a/README.md +++ b/README.md @@ -75,22 +75,6 @@ sources use the following command git clone --recurse-submodules http://github.com/intel-go/nff-go -### Working with a github fork - -If you are working on a fork, then the **go get** command will not put nff-go in -$GOPATH/src/github.com/intel-go. However, imports will continue to reference -github.com/intel-go. This is a feature of Go and not a problem in the way nff-go -is written. See [stackoverflow -article](https://stackoverflow.com/questions/14323872/using-forked-package-import-in-go) -for a discussion. A simple way to resolve the problem is to use a symlink. If -you are rscohn2 on github, and you forked nff-go into your personal account, -then do this: - - cd $GOPATH/src/github.com - mkdir intel-go - cd intel-go - ln -s ../rscohn2/nff-go . - ## Setting up the build and run environment ### DPDK @@ -115,13 +99,21 @@ $GOPATH/src/github.com/intel-go/nff-go/test/dpdk/dpdk-17.08/x86_64-native-linuxa ### Go -Use Go version 1.11 or higher. To check the version of Go, do: +Use Go version 1.11.4 or higher. To check the version of Go, do: go version ## Building NFF-GO - cd $GOPATH/src/github.com/intel-go/nff-go +When Go compiler runs for the first time it downloads all dependent +packages listed in `go.mod` file. This operation cannot be done in +parallel because otherwise Go package cache gets corrupted. Because of +that it is necessary to run command `go mod download` before first +`make` is done. Another option is to use single process `make -j1` +when it is run for the first time, but may be quite slow. + + cd nff-go + go mod download # do it once before first build make -j8 ## Building NFF-GO in debug mode @@ -183,11 +175,6 @@ in these JSON files. To clean all generated binaries, use the **make clean** command. To delete all deployed images listed in NFF_GO_HOSTS, use the **make cleanall** command. -## Changing the DPDK sources - -If you use the **make** command from NFF-GO directories, the DPDK driver is -downloaded automatically. - ## Contributing If you want to contribute to NFF-Go, check our [Contributing diff --git a/go.sum b/go.sum index 74997c9e..8848303e 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ github.com/docker/distribution v2.6.2+incompatible h1:4FI6af79dfCS/CYb+RRtkSHw3q1L/bnDjG1PcPZtQhM= github.com/docker/distribution v2.6.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.13.1 h1:5VBhsO6ckUxB0A8CE5LlUJdXzik9cbEbBTQ/ggeml7M= +github.com/docker/docker v1.13.1 h1:IkZjBSIc8hBjLpqeAbeE5mca5mNgeatLHBy3GO78BWo= github.com/docker/docker v1.13.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index 6e9118d0..0d663149 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -125,7 +125,7 @@ echo Reassigning "${syscon}" interface to system name sudo nmcli c mod "${syscon}" connection.id 'System connection' echo Unpacking Go language into /opt -(cd /opt; sudo sh -c 'curl -L -s https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz | tar zx') +(cd /opt; sudo sh -c 'curl -L -s https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz | tar zx') mkdir go chmod +x ~/scripts.sh . ~/scripts.sh