kmesh-net / kmesh

High Performance ServiceMesh Data Plane Based on Programmable Kernel
https://kmesh.net
Apache License 2.0
362 stars 46 forks source link

How to fix make build errors #335

Closed Okabe-Rintarou-0 closed 1 month ago

Okabe-Rintarou-0 commented 1 month ago

Please provide an in-depth description of the question you have:

I tried to build kmesh locally, but met some errors:

$ make build
./kmesh_compile.sh
latest: Pulling from kmesh-net/kmesh-build-x86
Digest: sha256:0274dfb7dee34054bc3ca15c6842dc2d34dbec57252823043ffd9709020a8052
Status: Image is up to date for ghcr.io/kmesh-net/kmesh-build-x86:latest
ghcr.io/kmesh-net/kmesh-build-x86:latest
OS                                              9.0 kB/s | 2.1 kB     00:00    
everything                                       12 kB/s | 2.1 kB     00:00    
EPOL                                             13 kB/s | 2.1 kB     00:00    
debuginfo                                        12 kB/s | 2.1 kB     00:00    
source                                           12 kB/s | 2.0 kB     00:00    
update                                           13 kB/s | 2.1 kB     00:00    
update-source                                    13 kB/s | 2.1 kB     00:00    
Package git-2.41.0-1.oe2309.x86_64 is already installed.
Package make-1:4.4.1-1.oe2309.x86_64 is already installed.
Package clang-15.0.7-7.oe2309.x86_64 is already installed.
Package llvm-15.0.7-6.oe2309.x86_64 is already installed.
Package libboundscheck-v1.1.11-6.oe2309.x86_64 is already installed.
Package protobuf-3.19.6-1.oe2309.x86_64 is already installed.
Package protobuf-c-1.4.1-1.oe2309.x86_64 is already installed.
Package protobuf-c-devel-1.4.1-1.oe2309.x86_64 is already installed.
Package bpftool-6.4.0-10.1.0.20.oe2309.x86_64 is already installed.
Package libbpf-2:0.8.1-11.oe2309.x86_64 is already installed.
Package libbpf-devel-2:0.8.1-11.oe2309.x86_64 is already installed.
Package cmake-3.24.3-1.oe2309.x86_64 is already installed.
Package pkgconf-1.9.5-1.oe2309.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
fatal: detected dubious ownership in repository at '/kmesh'
To add an exception for this directory, call:

    git config --global --add safe.directory /kmesh
Makefile:61: *** "TAG cannot be empty".  Stop.
fatal: detected dubious ownership in repository at '/kmesh'
To add an exception for this directory, call:

    git config --global --add safe.directory /kmesh
Makefile:61: *** "TAG cannot be empty".  Stop.
cp: cannot stat '/usr/lib64/libkmesh_api_v2_c.so': No such file or directory
cp: cannot stat '/usr/lib64/libkmesh_deserial.so': No such file or directory
cp: cannot stat '/usr/bin/kmesh-daemon': No such file or directory
cp: cannot stat '/usr/bin/kmesh-cni': No such file or directory
cp: cannot stat '/usr/bin/mdacore': No such file or directory
a7b81b3e900467c7488b39647294a034c805d373b7456259d7b8f8d2d913ca07

I don't know whether it is related to my environment or not, can someone help me to fix it?

What do you think about this question?:

Environment:

LiZhenCheng9527 commented 1 month ago

Did you run make build in root?

Okabe-Rintarou-0 commented 1 month ago

Did you run make build in root?

Fixed by cloning the repo in root user, and then make build(also in root user).

Close the issue, thank u!