[Stgt-devel] STGT build fails on FC4

Ming Zhang mingz at ele.uri.edu
Fri Nov 11 14:34:44 CET 2005


--=-zE46TmjpjuwXXJQTIy3L
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

i do not know the 2.6.14.x kernel from fc4. i can compile it with
vanilla 2.6.14 kernel. tried both gcc3.4.x and gcc 4.x

ming


On Fri, 2005-11-11 at 13:03 +0100, Rehmann Oliver wrote:
> Dear Colleagues
> 
> I tried to compile STGT Build 164 under Fedora Core 4 but it fails.
> I know this is still early Beta or even Alpha but I discussed it with
> Ming Zhang
> and he told me that it should compile on Kernel 2.6.14
> 
> Kernel Version: Official FC4 Kernel (2.6.14-1.1637_FC4)
> See the output from the make command:
> 
> make -C istgt
> make[1]: Entering directory `/user1/software/STGT/trunk/istgt'
> make -C usr
> make[2]: Entering directory `/user1/software/STGT/trunk/istgt/usr'
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o istgt.o istgt.c
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o conn.o conn.c
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o param.o param.c
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o iscsid.o iscsid.c
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o session.o session.c
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o target.o target.c
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o chap.o chap.c
> cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include
> -I../../include -I../../usr   -c -o ctldev.o ctldev.c
> In file included from ctldev.c:21:
> /usr/include/linux/netlink.h:22: error: syntax error before '__u32'
> /usr/include/linux/netlink.h:28: error: syntax error before '__u32'
> /usr/include/linux/netlink.h:30: error: syntax error before
> 'nlmsg_flags'
> /usr/include/linux/netlink.h:31: error: syntax error before
> 'nlmsg_seq'
> /usr/include/linux/netlink.h:32: error: syntax error before
> 'nlmsg_pid'
> /usr/include/linux/netlink.h:82: error: field 'msg' has incomplete
> type
> ctldev.c: In function 'ipc_cmnd_execute':
> ctldev.c:40: error: dereferencing pointer to incomplete type
> ctldev.c:44: error: invalid application of 'sizeof' to incomplete type
> 'struct nlmsghdr' 
> ctldev.c:45: error: dereferencing pointer to incomplete type
> ctldev.c: In function 'nlmsg_init':
> ctldev.c:85: error: dereferencing pointer to incomplete type
> ctldev.c:86: error: dereferencing pointer to incomplete type
> ctldev.c:87: error: dereferencing pointer to incomplete type
> ctldev.c:88: error: dereferencing pointer to incomplete type
> ctldev.c:89: error: dereferencing pointer to incomplete type
> ctldev.c: In function 'get_iet_msg':
> ctldev.c:101: error: invalid application of 'sizeof' to incomplete
> type 'struct nlmsghdr' 
> ctldev.c:107: error: invalid application of 'sizeof' to incomplete
> type 'struct nlmsghdr' 
> ctldev.c: In function 'iscsi_conn_destroy':
> ctldev.c:133: error: dereferencing pointer to incomplete type
> ctldev.c: In function 'iscsi_param_get':
> ctldev.c:155: error: dereferencing pointer to incomplete type
> ctldev.c:161: error: invalid application of 'sizeof' to incomplete
> type 'struct nlmsghdr' 
> ctldev.c: In function 'iscsi_param_set':
> ctldev.c:199: error: dereferencing pointer to incomplete type
> ctldev.c: In function 'iscsi_session_create':
> ctldev.c:294: error: dereferencing pointer to incomplete type
> ctldev.c: In function 'iscsi_session_destroy':
> ctldev.c:315: error: dereferencing pointer to incomplete type
> ctldev.c: In function 'iscsi_conn_create':
> ctldev.c:344: error: dereferencing pointer to incomplete type
> ctldev.c: In function 'ipc_mgmt':
> ctldev.c:451: error: invalid application of 'sizeof' to incomplete
> type 'struct nlmsghdr' 
> ctldev.c:454: error: dereferencing pointer to incomplete type
> ctldev.c:480: error: dereferencing pointer to incomplete type
> ctldev.c:480: error: invalid application of 'sizeof' to incomplete
> type 'struct nlmsghdr' 
> ctldev.c:481: error: invalid application of 'sizeof' to incomplete
> type 'struct nlmsghdr' 
> make[2]: *** [ctldev.o] Error 1
> make[2]: Leaving directory `/user1/software/STGT/trunk/istgt/usr'
> make[1]: *** [libs] Error 2
> make[1]: Leaving directory `/user1/software/STGT/trunk/istgt'
> make: *** [all] Error 2
> 
> 
> Any idea why compilation fails ? I mean, I can't think of a syntax
> error in /usr/include/linux/netlink.h
> This would affect building KERNELs.
> 
> And as far as I can see the file seems to be OK in syntax. I have
> attached it to the EMail together
> with the MAKE output as well.
> 
> Regards
> Oliver
>  
>  

--=-zE46TmjpjuwXXJQTIy3L
Content-Disposition: attachment; filename=build.log
Content-Type: text/x-log; name=build.log; charset=utf-8
Content-Transfer-Encoding: 7bit

make -C istgt
make[1]: Entering directory `/home/mingz/work/currentwork/stgt/istgt'
make -C usr
make[2]: Entering directory `/home/mingz/work/currentwork/stgt/istgt/usr'
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o istgt.o istgt.c
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o conn.o conn.c
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o param.o param.c
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o iscsid.o iscsid.c
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o session.o session.c
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o target.o target.c
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o chap.o chap.c
cc -O2 -fno-inline -Wall -fPIC -Wstrict-prototypes -I../include -I../../include -I../../usr   -c -o ctldev.o ctldev.c
cc -shared -o istgt.so istgt.o conn.o param.o iscsid.o session.o target.o chap.o ctldev.o
make[2]: Leaving directory `/home/mingz/work/currentwork/stgt/istgt/usr'
make -C /home/mingz/tmpwork/linux-2.6.14 SUBDIRS=/home/mingz/work/currentwork/stgt/istgt/kernel modules
make[2]: Entering directory `/home/mingz/tmpwork/linux-2.6.14'
  CC [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/iscsi.o
  CC [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/nthread.o
  CC [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/config.o
  CC [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/digest.o
  CC [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/conn.o
  CC [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/session.o
  CC [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/param.o
  LD [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/istgt.o
  Building modules, stage 2.
  MODPOST
*** Warning: "tgt_msg_send" [/home/mingz/work/currentwork/stgt/istgt/kernel/istgt.ko] undefined!
*** Warning: "tgt_target_template_unregister" [/home/mingz/work/currentwork/stgt/istgt/kernel/istgt.ko] undefined!
*** Warning: "tgt_session_destroy" [/home/mingz/work/currentwork/stgt/istgt/kernel/istgt.ko] undefined!
*** Warning: "tgt_target_template_register" [/home/mingz/work/currentwork/stgt/istgt/kernel/istgt.ko] undefined!
*** Warning: "tgt_session_create" [/home/mingz/work/currentwork/stgt/istgt/kernel/istgt.ko] undefined!
  CC      /home/mingz/work/currentwork/stgt/istgt/kernel/istgt.mod.o
  LD [M]  /home/mingz/work/currentwork/stgt/istgt/kernel/istgt.ko
make[2]: Leaving directory `/home/mingz/tmpwork/linux-2.6.14'
make[1]: Leaving directory `/home/mingz/work/currentwork/stgt/istgt'
make -C usr
make[1]: Entering directory `/home/mingz/work/currentwork/stgt/usr'
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o tgtd.o tgtd.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o netlink.o netlink.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o ipc.o ipc.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o dl.o dl.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o mgmt.o mgmt.c
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o log.o log.c
cc -rdynamic -ldl tgtd.o netlink.o ipc.o dl.o mgmt.o log.o -o tgtd
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o tgtadm.o tgtadm.c
cc -rdynamic -ldl tgtadm.o -o tgtadm
cc -O2 -fno-inline -Wall -Wstrict-prototypes -fPIC -I../include -DNETLINK_TGT=20   -c -o scsi.o scsi.c
cc -shared -o scsi.so scsi.o
make[1]: Leaving directory `/home/mingz/work/currentwork/stgt/usr'
make -C kernel
make[1]: Entering directory `/home/mingz/work/currentwork/stgt/kernel'
make -C /home/mingz/tmpwork/linux-2.6.14 SUBDIRS=/home/mingz/work/currentwork/stgt/kernel modules
make[2]: Entering directory `/home/mingz/tmpwork/linux-2.6.14'
  CC [M]  /home/mingz/work/currentwork/stgt/kernel/tgt.o
  CC [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_sysfs.o
  CC [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_protocol.o
  LD [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_core.o
  CC [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_vsd.o
  CC [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_scsi.o
  Building modules, stage 2.
  MODPOST
  CC      /home/mingz/work/currentwork/stgt/kernel/tgt_core.mod.o
  LD [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_core.ko
  CC      /home/mingz/work/currentwork/stgt/kernel/tgt_scsi.mod.o
  LD [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_scsi.ko
  CC      /home/mingz/work/currentwork/stgt/kernel/tgt_vsd.mod.o
  LD [M]  /home/mingz/work/currentwork/stgt/kernel/tgt_vsd.ko
make[2]: Leaving directory `/home/mingz/tmpwork/linux-2.6.14'
make[1]: Leaving directory `/home/mingz/work/currentwork/stgt/kernel'

--=-zE46TmjpjuwXXJQTIy3L--




More information about the stgt mailing list