When I compile Quartz on Ubuntu 16.04 with kernel 4.15.0.29, I get three errors:
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
/home/hadi/code/quartz/build/src/dev/pmc.c: In function ‘pmc_ioctl_setcounter’:
/home/hadi/code/quartz/build/src/dev/pmc.c:171:9: error: implicit declaration of function ‘copy_from_user’ [-Werror=implicit-function-declaration]
if (copy_from_user(&q, (ioctl_query_setcounter_t*) arg, sizeof(ioctlquery
/home/hadi/code/quartz/build/src/dev/pmc.c: In function ‘pmc_ioctl_getpci’:
/home/hadi/code/quartz/build/src/dev/pmc.c:224:17: error: implicit declaration of function ‘copy_to_user’ [-Werror=implicit-function-declaration]
if (copy_to_user((ioctl_query_setgetpci_t*) arg, &q, sizeof(ioctl_q
I resolved the first error by installing libelf-dev. Note that this library is not included in the script scripts/install.sh. I resolved the other two errors by modifying pmc.c so that it includes linux/uaccess.h instead of asm/uaccess.h.
After making these changes, the build completes successfully.
When I compile Quartz on Ubuntu 16.04 with kernel 4.15.0.29, I get three errors:
I resolved the first error by installing
libelf-dev
. Note that this library is not included in the scriptscripts/install.sh
. I resolved the other two errors by modifyingpmc.c
so that it includeslinux/uaccess.h
instead ofasm/uaccess.h
.After making these changes, the build completes successfully.