containers / libkrun

A dynamic library providing Virtualization-based process isolation capabilities

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build examples failed

snailset opened this issue · comments

When build examples, I got this failure:
gcc -o chroot_vm chroot_vm.c -O2 -g -lkrun
//usr/local/lib64/libkrun.so: undefined reference to `copy_file_range'
collect2: error: ld returned 1 exit status
Makefile:22: recipe for target 'chroot_vm' failed
make: *** [chroot_vm] Error 1

My build steps:

  1. Build libkrunfw
git clone https://github.com/containers/libkrunfw.git
cd libkrunfw
make -j8
sudo make install
  1. Build libkrun
git clone https://github.com/containers/libkrun.git
cd libkrun
make -j8
sudo make install
  1. Build this examples
cd examples
export LD_LIBRARY_PATH=/usr/local/lib64
make

My kernel version problem

Thanks for coming back to clarify the issue. I guess you were running with a kernel/glibc combination what didn't provide copy_file_range.