DECAF Compilation Error

86 views
Skip to first unread message

Fan Sang

unread,
Nov 3, 2017, 1:36:39 AM11/3/17
to decaf-platform-discuss
I had this compile error when I run make to compile DECAF:

block/iscsi.c:227:17: error: too few arguments to function ‘iscsi_write10_task’
     acb->task = iscsi_write10_task(iscsi, iscsilun->lun, acb->buf, size,
                 ^
In file included from block/iscsi.c:33:0

The declaration of iscsi_write10_task is:
EXTERN struct scsi_task *
iscsi_write10_task(struct iscsi_context *iscsi, int lun, uint32_t lba,
                   unsigned char *data, uint32_t datalen, int blocksize,
                   int wrprotect, int dpo, int fua, int fua_nv, int group_number,
                   iscsi_command_cb cb, void *private_data);

And the call of the function in block/iscsi.c is:
acb->task = iscsi_write10_task(iscsi, iscsilun->lun, acb->buf, size,
                              sector_qemu2lun(sector_num, iscsilun),
                              fua, 0, iscsilun->block_size,
                              iscsi_aio_write10_cb, acb);


So in block/iscsi.c the function iscsi_write10_task is provided with only 10 arguments while the defined signature of the function requires 13 arguments.

The other error is a similar one in the function call of iscsi_read10_task.

Because the compiler has located the errors in the source file, I assume there are inconsistency of the calling of those functions in the source files. I just wonder how to properly fix the function signatures or those two function calls so that I can compile DECAF. 

Heng Yin

unread,
Nov 3, 2017, 12:40:00 PM11/3/17
to decaf-platf...@googlegroups.com
Can you elaborate which Linux version and compiler version you are using?

Heng

--
You received this message because you are subscribed to the Google Groups "decaf-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to decaf-platform-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fan Sang

unread,
Nov 3, 2017, 12:53:10 PM11/3/17
to decaf-platform-discuss
I'm using Ubuntu 16.04 LTS and the compiler is the build in one. It shows as 5.4.0 when I run gcc --version.

Fan
To unsubscribe from this group and stop receiving emails from it, send an email to decaf-platform-discuss+unsub...@googlegroups.com.

Heng Yin

unread,
Nov 3, 2017, 1:02:34 PM11/3/17
to decaf-platf...@googlegroups.com
We haven't tested DECAF on this GCC version. So very likely, this GCC version performs more strict checking. You may download an older version of GCC to compile DECAF, or find way to fix this error by yourself. If you do manage to fix it, please kindly share with us. 

Heng

To unsubscribe from this group and stop receiving emails from it, send an email to decaf-platform-di...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "decaf-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to decaf-platform-di...@googlegroups.com.

Fan Sang

unread,
Nov 3, 2017, 1:24:24 PM11/3/17
to decaf-platform-discuss
But I was just wondering why the calling of the function in the source code doesn't match the function's declaration? Is that a case that should be compiled successfully?

Fan
To unsubscribe from this group and stop receiving emails from it, send an email to decaf-platform-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "decaf-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to decaf-platform-discuss+unsub...@googlegroups.com.

zach.tu...@gmail.com

unread,
Dec 18, 2018, 9:29:07 PM12/18/18
to decaf-platform-discuss
How do you solve this problem in the end?

在 2017年11月3日星期五 UTC+8下午1:36:39,Fan Sang写道:
Reply all
Reply to author
Forward
0 new messages