Why do I get the following error messages when building the Linux open source Configuration via Protocol driver provided by Altera? - Why do I get the following error messages when building the Linux open source Configuration via Protocol driver provided by Altera?
Description When building the Altera® example Linux Configuration via Protocol(CvP) driver the following error messages may occur: altera_cvp.c: In function ‘altera_cvp_wait_for_bit’: altera_cvp.c:243:3: error: ‘TASK_UNINTERRUPTIBLE’ undeclared (first use in this function) altera_cvp.c:243:3: note: each undeclared identifier is reported only once for each function it appears in altera_cvp.c:243:3: error: implicit declaration of function ‘schedule_timeout’ [-Werror=implicit-function-declaration] altera_cvp.c: In function ‘altera_cvp_open’: altera_cvp.c:318:11: error: dereferencing pointer to incomplete type altera_cvp.c:318:23: error: ‘O_ACCMODE’ undeclared (first use in this function) altera_cvp.c:318:37: error: ‘O_RDONLY’ undeclared (first use in this function) altera_cvp.c: In function ‘altera_cvp_release’: altera_cvp.c:337:11: error: dereferencing pointer to incomplete type altera_cvp.c:337:23: error: ‘O_ACCMODE’ undeclared (first use in this function) altera_cvp.c:337:37: error: ‘O_RDONLY’ undeclared (first use in this function) altera_cvp.c: At top level: altera_cvp.c:413:8: error: variable ‘altera_cvp_fops’ has initializer but incomplete type altera_cvp.c:414:2: error: unknown field ‘owner’ specified in initializer altera_cvp.c:414:2: warning: excess elements in struct initializer [enabled by default] altera_cvp.c:414:2: warning: (near initialization for ‘altera_cvp_fops’) [enabled by default] altera_cvp.c:415:2: error: unknown field ‘llseek’ specified in initializer altera_cvp.c:415:13: error: ‘no_llseek’ undeclared here (not in a function) altera_cvp.c:415:2: warning: excess elements in struct initializer [enabled by default] altera_cvp.c:415:2: warning: (near initialization for ‘altera_cvp_fops’) [enabled by default] altera_cvp.c:416:2: error: unknown field ‘read’ specified in initializer altera_cvp.c:416:2: warning: excess elements in struct initializer [enabled by default] altera_cvp.c:416:2: warning: (near initialization for ‘altera_cvp_fops’) [enabled by default] altera_cvp.c:417:2: error: unknown field ‘write’ specified in initializer altera_cvp.c:417:2: warning: excess elements in struct initializer [enabled by default] altera_cvp.c:417:2: warning: (near initialization for ‘altera_cvp_fops’) [enabled by default] altera_cvp.c:418:2: error: unknown field ‘open’ specified in initializer altera_cvp.c:418:2: warning: excess elements in struct initializer [enabled by default] altera_cvp.c:418:2: warning: (near initialization for ‘altera_cvp_fops’) [enabled by default] altera_cvp.c:419:2: error: unknown field ‘release’ specified in initializer altera_cvp.c:419:2: warning: excess elements in struct initializer [enabled by default] altera_cvp.c:419:2: warning: (near initialization for ‘altera_cvp_fops’) [enabled by default] altera_cvp.c: In function ‘altera_cvp_init’: altera_cvp.c:482:2: error: implicit declaration of function ‘alloc_chrdev_region’ [-Werror=implicit-function-declaration] altera_cvp.c:496:3: error: implicit declaration of function ‘unregister_chrdev_region’ [-Werror=implicit-function-declaration] Resolution To work around this issue, ensure that the following three additional header files are included in the file altera_cvp.c contained within altera_cvp_1.0.tar.gz.gz : #include <linux/fcntl.h> /*Helps fix O_ACCMODE*/ #include <linux/sched.h> /*Helps fix TASK_UNINTERRUPTIBLE */ #include <linux/fs.h> /*Helps fix the struct intializer */
Custom Fields values:
['novalue']
Troubleshooting
novalue
False
['novalue']
['novalue']
novalue
novalue
['Arria® V GT FPGA', 'Arria® V GX FPGA', 'Arria® V GZ FPGA', 'Arria® V ST FPGA', 'Arria® V SX FPGA', 'Cyclone® V GT FPGA', 'Cyclone® V GX FPGA', 'Cyclone® V ST FPGA', 'Cyclone® V SX FPGA', 'Stratix® V GS FPGA', 'Stratix® V GT FPGA', 'Stratix® V GX FPGA']
['novalue']
['novalue']
['novalue'] - 2021-08-25
external_document