-
Notifications
You must be signed in to change notification settings - Fork 7
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
Compilation failed on Ubuntu 18.04 #5
Comments
I am getting this error, Please if anyone of you know how to debug then do reply. make -C tools |
|
Hi I tried to compile the linux driver, but failed on ubuntu 18.04. After switching to Ubuntu 16.04, it compiles fine.
Please dind the make stdout enclosed.
ubuntu@accvm:
/driver/linux-sgx-driver$ make/driver/linux-sgx-driver$ make cleanmake -C /lib/modules/5.3.0-1020-azure/build SUBDIRS=/home/ubuntu/driver/linux-sgx-driver modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-1020-azure'
Makefile:227: ================= WARNING ================
Makefile:228: 'SUBDIRS' will be removed after Linux 5.3
Makefile:229:
Makefile:230: If you are building an individual subdirectory
Makefile:231: in the kernel tree, you can do like this:
Makefile:232: $ make path/to/dir/you/want/to/build/
Makefile:233: (Do not forget the trailing slash)
Makefile:234:
Makefile:235: If you are building an external module,
Makefile:236: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:237: ==========================================
CC [M] /home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.o
/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.c: In function ‘sgx_test_and_clear_young’:
/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.c:130:8: error: passing argument 4 of ‘apply_to_page_range’ from incompatible pointer type [-Werror=incompatible-pointer-types]
sgx_test_and_clear_young_cb, vma->vm_mm);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/highmem.h:8:0,
from /home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.c:63:
./include/linux/mm.h:2678:12: note: expected ‘pte_fn_t {aka int (*)(struct *, long unsigned int, void )}’ but argument is of type ‘int ()(pte_t *, struct page *, long unsigned int, void ) {aka int ()(struct *, struct page *, long unsigned int, void *)}’
extern int apply_to_page_range(struct mm_struct *mm, unsigned long address,
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.o' failed
make[2]: *** [/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.o] Error 1
Makefile:1656: recipe for target 'module/home/ubuntu/driver/linux-sgx-driver' failed
make[1]: *** [module/home/ubuntu/driver/linux-sgx-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-1020-azure'
Makefile:15: recipe for target 'default' failed
make: *** [default] Error 2
ubuntu@accvm:
rm -vrf *.o *.ko *.order *.symvers *.mod.c .tmp_versions .o.cmd
removed 'sgx_main.o'
removed '.sgx_main.o.cmd'
ubuntu@accvm:~/driver/linux-sgx-driver$ make
make -C /lib/modules/5.3.0-1020-azure/build SUBDIRS=/home/ubuntu/driver/linux-sgx-driver modules
make[1]: Entering directory '/usr/src/linux-headers-5.3.0-1020-azure'
Makefile:227: ================= WARNING ================
Makefile:228: 'SUBDIRS' will be removed after Linux 5.3
Makefile:229:
Makefile:230: If you are building an individual subdirectory
Makefile:231: in the kernel tree, you can do like this:
Makefile:232: $ make path/to/dir/you/want/to/build/
Makefile:233: (Do not forget the trailing slash)
Makefile:234:
Makefile:235: If you are building an external module,
Makefile:236: Please use 'M=' or 'KBUILD_EXTMOD' instead
Makefile:237: ==========================================
CC [M] /home/ubuntu/driver/linux-sgx-driver/sgx_main.o
CC [M] /home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.o
/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.c: In function ‘sgx_test_and_clear_young’:
/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.c:130:8: error: passing argument 4 of ‘apply_to_page_range’ from incompatible pointer type [-Werror=incompatible-pointer-types]
sgx_test_and_clear_young_cb, vma->vm_mm);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/highmem.h:8:0,
from /home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.c:63:
./include/linux/mm.h:2678:12: note: expected ‘pte_fn_t {aka int ()(struct *, long unsigned int, void )}’ but argument is of type ‘int ()(pte_t *, struct page *, long unsigned int, void ) {aka int ()(struct *, struct page *, long unsigned int, void *)}’
extern int apply_to_page_range(struct mm_struct *mm, unsigned long address,
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:288: recipe for target '/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.o' failed
make[2]: *** [/home/ubuntu/driver/linux-sgx-driver/sgx_page_cache.o] Error 1
Makefile:1656: recipe for target 'module/home/ubuntu/driver/linux-sgx-driver' failed
make[1]: *** [module/home/ubuntu/driver/linux-sgx-driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-1020-azure'
Makefile:15: recipe for target 'default' failed
make: *** [default] Error 2
ubuntu@accvm:
/driver/linux-sgx-driver$ lsb_release -a/driver/linux-sgx-driver$ lsb_release -aNo LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
ubuntu@accvm:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
The text was updated successfully, but these errors were encountered: