ipdk-io / ipdk

Infrastructure Programmer Development Kit (IPDK) is an open source, vendor agnostic framework of drivers and APIs for infrastructure offload and management that runs on a CPU, IPU, DPU or switch.
Apache License 2.0
185 stars 68 forks source link

networking_ebpf build: Numerous build errors #297

Open chrispsommers opened 2 years ago

chrispsommers commented 2 years ago

Follow-up to https://github.com/ipdk-io/ipdk/issues/295. I tried building this recipe and saw errors throughout the build process. I've attached a detailed transcript. Below is a summary. Briefly, errors appeared on the console during vagrant up, host_install.sh and make start-demo. My system is an x86 tower running Ubuntu 20.04 natively, 64G RAM, 500G SSD.

Repo version:

chris@chris-z4:~/ipdk/build/networking_ebpf/vagrant$ git log |head -6
commit 326a50e365f51cc08cffff14bac83857eb8bf94c
Merge: 58b4936 9532a14
Author: Namrata-intel <namrata.limaye@intel.com>
Date:   Tue Nov 15 07:42:48 2022 -0800

    Merge pull request #293 from ipdk-io/pv_ubuntu1804_build_fix

BUILD ATTEMPT

I followed instructions on https://github.com/ipdk-io/ipdk/blob/main/build/networking_ebpf/README_DOCKER.md

ON HOST

 1986  cd ipdk/build/networking_ebpf/
...
 1995  vagrant up
 1997  vagrant ssh

INSIDE VM:

vagrant@bullseye:/git/ipdk/build$ history 
    1  /git/ipdk/build/networking_ebpf/scripts/host_install.sh *
    2  cd /git/ipdk/build
    3  ./ipdk install ebpf-ubuntu2004
    4  ./ipdk build
    5  make start-demo

*Note: Step 1 above is not listed in the instructions in README_DOCKER.md. When I first followed the instructions, this caused problems further on ("No docker") etc. I read https://github.com/ipdk-io/ipdk/tree/main/build/networking_ebpf#vagrant and figured I should do "host_install.sh" See https://github.com/ipdk-io/ipdk/issues/295/

SOME PARTICULARLY SUSPICIOUS SNIPPETS:

 1995  vagrant up
 ...
    default: /tmp/vagrant-shell: line 101: go: command not found
    default: /tmp/vagrant-shell: line 102: go: command not found

vagrant@bullseye:~$ /git/ipdk/build/networking_ebpf/scripts/host_install.sh
...
[100%] Built target libprotobuf-lite
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libprotobuf-lite.a
CMake Error at cmake_install.cmake:46 (file):
  file INSTALL cannot copy file
  "/home/vagrant/ipdk-ebpf/protobuf/build/libprotobuf-lite.a" to
  "/usr/local/lib/libprotobuf-lite.a": Permission denied.

make: *** [Makefile:105: install] Error 1
+ ldconfig
/git/ipdk/build/networking_ebpf/scripts/host_install.sh: line 53: ldconfig: command not found

...
-- Installing: /usr/local/lib/libnikss.so
CMake Error at cmake_install.cmake:52 (file):
  file INSTALL cannot copy file
  "/home/vagrant/ipdk-ebpf/psabpf/build/libnikss.so" to
  "/usr/local/lib/libnikss.so": Permission denied.
...
/git/ipdk/build/networking_ebpf/scripts/host_install.sh: line 100: /etc/ld.so.conf.d/ipdk.conf: Permission denied
+ echo /root/ipdk-ebpf/psabpf/libbpf/build
/git/ipdk/build/networking_ebpf/scripts/host_instal
...

vagrant@bullseye:/git/ipdk/build$ make start-demo
make: *** No rule to make target 'start-demo'.  Stop.

Detailed transcript: ipdk-ebpf-build.txt

vsureshkumarp commented 2 years ago

Looks like there is a permission issue. Can you please try with sudo? Ex: _sudo /git/ipdk/build/networking_ebpf/scripts/host_install.sh_

Verified the build procedure vagrant native mentioned here https://github.com/ipdk-io/ipdk/tree/main/build/networking_ebpf everything went well after adding "sudo". I will update the READEME to add the _"sudo /git/ipdk/build/networking_ebpf/scripts/hostinstall.sh".

chrispsommers commented 1 year ago

Thanks, I confirmed sudo solves it.

chrispsommers commented 1 year ago

Hi @vsureshkumarp, is there a workaround for remaining problems? I tried the following but it didn't help:

vagrant@bullseye:~$ sudo cp -r /root/go .
vagrant@bullseye:~$ make start-demo
make: *** No rule to make target 'start-demo'.  Stop.