Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polycube not supported for ubuntu 22.04 or higher kernel versions #440

Open
Arishbiswas opened this issue Nov 1, 2024 · 2 comments
Open

Comments

@Arishbiswas
Copy link

Arishbiswas commented Nov 1, 2024

i tried installing polycube for ubuntu 22,04 following the installation guide, the /scripts/install.sh throws error, as it tries to install dependencies for ubuntu 18.0 so, manually i tried installing all the dependencies and followed the installation steps like:

git clone https://github.com/polycube-network/polycube
cd polycube
git submodule update --init --recursive
mkdir build && cd build

use 'ccmake ..' to change different compilation options as

enable/disable some services for example

cmake ..
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install

However while build process , i m getting this FOLOWING Errors:
89%] Building CXX object src/polycubed/src/CMakeFiles/polycubed.dir/extiface_xdp.cpp.o
In file included from /usr/include/pcap/pcap.h:133,
from /usr/include/pcap.h:43,
from /usr/local/include/tins/packet_writer.h:40,
from /usr/local/include/tins/tins.h:50,
from /home/arish/polycube/src/polycubed/src/controller.cpp:29:
/usr/include/pcap/bpf.h:245:8: error: redefinition of ‘struct bpf_insn’
245 | struct bpf_insn {
| ^~~~~~~~
In file included from /home/arish/polycube/src/libs/bcc/src/cc/bcc_syms.h:24,
from /home/arish/polycube/src/libs/bcc/src/cc/api/BPFTable.h:30,
from /home/arish/polycube/src/libs/bcc/src/cc/api/BPF.h:25,
from /home/arish/polycube/src/polycubed/src/patchpanel.h:21,
from /home/arish/polycube/src/polycubed/src/base_cube.h:21,
from /home/arish/polycube/src/polycubed/src/cube.h:19,
from /home/arish/polycube/src/polycubed/src/cube_tc.h:19,
from /home/arish/polycube/src/polycubed/src/controller.h:19,
from /home/arish/polycube/src/polycubed/src/controller.cpp:19:
/home/arish/polycube/src/libs/bcc/src/cc/libbpf/include/uapi/linux/bpf.h:71:8: note: previous definition of ‘struct bpf_insn’
71 | struct bpf_insn {
| ^~~~~~~~
[ 89%] Building CXX object src/polycubed/src/CMakeFiles/polycubed.dir/service_controller.cpp.o
/home/arish/polycube/src/polycubed/src/controller.cpp: In member function ‘void polycube::polycubed::Controller::log_msg(const polycube::service::LogMsg*)’:
/home/arish/polycube/src/polycubed/src/controller.cpp:408:68: warning: taking address of packed member of ‘polycube::service::LogMsg’ may result in an unaligned pointer value [-Waddress-of-packed-member]
408 | polycube::service::utils::format_debug_string(msg->msg, msg->args);
| ~~~~~^~~~
[ 89%] Building CXX object src/polycubed/src/CMakeFiles/polycubed.dir/patchpanel.cpp.o
[ 89%] Building CXX object src/polycubed/src/CMakeFiles/polycubed.dir/datapath_log.cpp.o
make[2]: *** [src/polycubed/src/CMakeFiles/polycubed.dir/build.make:342: src/polycubed/src/CMakeFiles/polycubed.dir/controller.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:5276: src/polycubed/src/CMakeFiles/polycubed.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

any suggestions , what changes should i make, and how to install polycube services for ubuntu 22.04?

@Arishbiswas
Copy link
Author

my kernel version
arish@arish-Swift-SF314-55G:/polycube/build$ uname -r
6.5.0-26-generic
arish@arish-Swift-SF314-55G:
/polycube/build$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
PRETTY_NAME="Ubuntu 22.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.4 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

@Arishbiswas
Copy link
Author

for ubuntu 20.04 , while manually installing , with kernel version 5.15, i get this errors :

/usr/bin/ld: /usr/lib/llvm-10/lib/libclangCodeGen.a(BackendUtil.cpp.o): in function (anonymous namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >)': (.text._ZN12_GLOBAL__N_118EmitAssemblyHelper30EmitAssemblyWithNewPassManagerEN5clang13BackendActionESt10unique_ptrIN4llvm17raw_pwrite_streamESt14default_deleteIS5_EE+0x1f15): undefined reference to getPollyPluginInfo()'
collect2: error: ld returned 1 exit status
make[2]: *** [src/polycubed/src/CMakeFiles/polycubed.dir/build.make:1407: src/polycubed/src/polycubed] Error 1
make[1]: *** [CMakeFiles/Makefile2:5633: src/polycubed/src/CMakeFiles/polycubed.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant