okramer
Occasional Contributor
6 years agoaocl install fails with compile error
I am trying to install an a10GX dev board on my Ubuntu 16.04 box, but when I get to the point of running `aocl install`, I get the following output with error:
$ aocl install
Do you want to setup the FCD at directory /opt/Intel/OpenCL/Boards [Y/n]
aocl install: Setting up the FPGA Client Driver (FCD) to the system. This process may require admin privilege
Install the FCD file to /opt/Intel/OpenCL/Boards
aocl install: Adding the board package /home/okramer/intelFPGA_pro/19.3/hld/board/a10_ref to the list of installed packages
Installing the board package driver to the system.
aocl install: Running install from /home/okramer/intelFPGA_pro/19.3/hld/board/a10_ref/linux64/libexec
Looking for kernel source files in /lib/modules/4.4.0-164-generic/build
Using kernel source files from /lib/modules/4.4.0-164-generic/build
Building driver for BSP with name a10_ref
make: Entering directory '/usr/src/linux-headers-4.4.0-164-generic'
CC [M] /tmp/opencl_driver_r6J2oV/aclpci_queue.o
CC [M] /tmp/opencl_driver_r6J2oV/aclpci.o
CC [M] /tmp/opencl_driver_r6J2oV/aclpci_fileio.o
CC [M] /tmp/opencl_driver_r6J2oV/aclpci_dma.o
CC [M] /tmp/opencl_driver_r6J2oV/aclpci_pr.o
/tmp/opencl_driver_r6J2oV/aclpci_pr.c: In function ‘aclpci_pr_s10’:
/tmp/opencl_driver_r6J2oV/aclpci_pr.c:340:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
dma_mode_t dma_mode = 0;
^
CC [M] /tmp/opencl_driver_r6J2oV/aclpci_cmd.o
/tmp/opencl_driver_r6J2oV/aclpci_cmd.c: In function ‘__aclpci_get_user_pages’:
/tmp/opencl_driver_r6J2oV/aclpci_cmd.c:312:30: warning: passing argument 6 of ‘get_user_pages’ makes pointer from integer without a cast [-Wint-conversion]
num_pages - got, 1, 1,
^
In file included from /tmp/opencl_driver_r6J2oV/aclpci_cmd.c:50:0:
include/linux/mm.h:1243:6: note: expected ‘struct page **’ but argument is of type ‘int’
long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
/tmp/opencl_driver_r6J2oV/aclpci_cmd.c:313:10: warning: passing argument 7 of ‘get_user_pages’ from incompatible pointer type [-Wincompatible-pointer-types]
p + got, vma);
^
In file included from /tmp/opencl_driver_r6J2oV/aclpci_cmd.c:50:0:
include/linux/mm.h:1243:6: note: expected ‘struct vm_area_struct **’ but argument is of type ‘struct page **’
long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
/tmp/opencl_driver_r6J2oV/aclpci_cmd.c:309:10: error: too many arguments to function ‘get_user_pages’
ret = get_user_pages(target_task, target_task->mm,
^
In file included from /tmp/opencl_driver_r6J2oV/aclpci_cmd.c:50:0:
include/linux/mm.h:1243:6: note: declared here
long get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
^
scripts/Makefile.build:285: recipe for target '/tmp/opencl_driver_r6J2oV/aclpci_cmd.o' failed
make[1]: *** [/tmp/opencl_driver_r6J2oV/aclpci_cmd.o] Error 1
Makefile:1454: recipe for target '_module_/tmp/opencl_driver_r6J2oV' failed
make: *** [_module_/tmp/opencl_driver_r6J2oV] Error 2
make: Leaving directory '/usr/src/linux-headers-4.4.0-164-generic'
aocl install: failed.
aocl install: Removing FCD
aocl install: Removing the board package /home/okramer/intelFPGA_pro/19.3/hld/board/a10_ref from the list of installed packagesI got similar errors when building on Ubuntu 18.04, but managed to fix them following the recommendations by user Tyurin here. However, those fixes don't work on 16.04. But, more to the point, why am I getting any errors when 16.04 shows as compatible? What is the fix?