error when making core-iscsi

10 views
Skip to first unread message

is...@digitaltadpole.com

unread,
Jun 28, 2006, 1:03:20 PM6/28/06
to Core-iSCSI
Hello,

This is Robert with digital tadpole. I tried installing the new
version of core-iscsi and this is the error that I get. Any
suggestions??

Thanks!

%make clean
%make initiator KERNEL_DIR=/usr/src/linux
make -C /usr/src/linux SUBDIRS=/home/core-iscsi-v1.6.2.8 modules
make[1]: Entering directory `/usr/src/linux-2.6.16.13-4'
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_debug_opcodes.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_crc.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_parameters.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_seq_and_pdu_list.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_serial.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_thread_queue.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_chanattrib.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_channel.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_discovery.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_erl0.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_erl1.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_info.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_ioctl.o
CC [M] /home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.o
/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:740: error: unknown
field 'eh_strategy_handler' specified in initializer
/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:740: warning: missing
braces around initializer
/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:740: warning: (near
initialization for 'core_iscsi_transport_template.host_attrs')
/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:740: warning:
initialization from incompatible pointer type
make[2]: *** [/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.o] Error
1
make[1]: *** [_module_/home/core-iscsi-v1.6.2.8] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.16.13-4'
make: *** [initiator] Error 2

is...@digitaltadpole.com

unread,
Jun 28, 2006, 3:10:24 PM6/28/06
to Core-iSCSI
Hi Robert!! I'd advise the following (while waiting for Nicholas to
get back with us):

1. Corral Mic and make him show you how to load this up in the KDE
debug environment. That way you can single step, get error messages,
set break points, and generally see what's going on. (I know this may
be hard to do.. he's in the "push handle, get pellet" mode and if he
doesn't get paid for the projects he's trying to finish, he won't be
able to help you anyway).

2. Read thru the recent threads
http://groups.google.com/group/Core-iSCSI/browse_thread/thread/b8dfe44247f61f52/?hl=en#

about the change that was made yesterday in the MakeFile that is
supposed to select either scsi_host_template or scsi_transport
depending on where it lives. Check to see if 'eh_strategy_handler' is
in one of these locations. The main developer Nicholas Bellinger had
said yesterday:
"Ok, I replaced the usage of LINUX_VERSION_CODE with a
USE_SCSI_TRANSPORT_H define that Makefile sets when the eh_timed_out
structure member is present in struct scsi_transport.
I just replaced this in v1.6.2.8 and reuploaded. It should be online
shortly."

You may have uncovered the need for additional logic for elements
beyond "eh_timed_out".

If you find out anything about this, please post it here. There is
little chance that Nicholas will have a chance to set up a Suse 10.1
environment to test and debug with. Your reporting and logical
conclusions are key (it's the "open source" way of doing business).

3. Be aware that there has been some previous discussion about the
need for a repository as a minimum because the linux kernel is changing
quite often. (see
http://groups.google.com/group/Core-iSCSI/browse_thread/thread/f07e46ff24547aa1/82514e5bc2624903?hl=en#82514e5bc2624903.
What you are trying to accomplish is a "virtual environment" for iSCSI
that may also include a "Bugzilla" virtual machine for Core-iSCSI,
aTest env for various Distros/kernels, as well as a Subversion
repository. If Core-iSCSI had a bug tracker, this type of thing would
be more suited to a bug report than a mailing list posting (because
mailing list posting roll off into the bit bucket without priority).
Mailing lists are good for "casual/new user" types of questions that
most people can help with who've been thru it already. Unfortunately,
this doesn't fall into the "simple" category.

For now, what you have done by posting this is the BEST WAY (actually
the only way) to get something different to happen.

4. You are the perfect target audience for this software. If a
rising Jr/Sr in Comp Science at NCSU can't figure this out, then there
is no chance that "mere mortals" will get this working. Thanks for
trying to make it work!!

Regards, and Good Luck!!

Maz

n...@kernel.org

unread,
Jun 29, 2006, 4:03:09 AM6/29/06
to Core-iSCSI
Hi Robert,

Feel free to attach include/scsi/scsi_host.h and
include/scsi_transport.h.. The breakage could be that both function
pointers 'eh_strategy_handler' had not been moved to struct
scsi_transport..

--nab

is...@digitaltadpole.com

unread,
Jun 29, 2006, 10:56:22 AM6/29/06
to Core-iSCSI
Hi Nab,

Thanks for the help! I'm not too sure how to attach things using
google groups, so I just put them in my webspace. Here are the links:
http://www4.ncsu.edu/~rchernan/scsi_transport.h and
http://www4.ncsu.edu/~rchernan/scsi_host.h.

Robert

n...@kernel.org

unread,
Jun 29, 2006, 9:37:35 PM6/29/06
to Core-iSCSI
Hi Robert,

This patch that checks for the presence of both function pointers in
scsi_transport.h should resolve the build failure.

Thanks,

--nab

Index: Makefile
===================================================================
--- Makefile (revision 4112)
+++ Makefile (working copy)
@@ -48,7 +48,8 @@
EXTRA_CFLAGS += -DCONFIG_ISCSI_DEBUG
endif

-EXTRA_CFLAGS += $(shell grep -c "eh_timed_out"
$(KERNEL_DIR)/include/scsi/scsi_transport.h | awk '{ if ($$0 != "0")
print "-DUSE_SCSI_TRANSPORT_H"}')
+EXTRA_CFLAGS += $(shell grep -c "eh_timed_out"
$(KERNEL_DIR)/include/scsi/scsi_transport.h | awk '{ if ($$0 != "0")
print "-DUSE_SCSI_TRANSPORT_H -DUSE_EHTIMEDOUT_SCSI_TRANSPORT_H"}')
+EXTRA_CFLAGS += $(shell grep -c "eh_strategy_handler"
$(KERNEL_DIR)/include/scsi/scsi_transport.h | awk '{ if ($$0 != "0")
print "-DUSE_SCSI_TRANSPORT_H -DUSE_EHSTRATEGY_SCSI_TRANSPORT_H"}')

ifeq ($(USEGDB), 1)
EXTRA_CFLAGS += -g
Index: iscsi_initiator_linux_scsi_defs.h
===================================================================
--- iscsi_initiator_linux_scsi_defs.h (revision 4112)
+++ iscsi_initiator_linux_scsi_defs.h (working copy)
@@ -21,7 +21,7 @@
static const char *iscsi_linux_info (struct Scsi_Host *);
static inline int iscsi_linux_queuecommand (struct scsi_cmnd *, void
(* done)(struct scsi_cmnd *));
extern enum scsi_eh_timer_return iscsi_linux_eh_scsi_timeout (struct
scsi_cmnd *);
-#ifdef USE_SCSI_TRANSPORT_H
+#ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H
static void iscsi_linux_eh_strategy_handler (struct Scsi_Host *);
#else
static int iscsi_linux_eh_strategy_handler (struct Scsi_Host *);
@@ -58,8 +58,10 @@
proc_info: iscsi_linux_proc_info,
info: iscsi_linux_info,
queuecommand: iscsi_linux_queuecommand,
-#ifndef USE_SCSI_TRANSPORT_H
+#ifndef USE_EHTIMEDOUT_SCSI_TRANSPORT_H
eh_timed_out: iscsi_linux_eh_scsi_timeout,
+#endif
+#ifndef USE_EHSTRATEGY_SCSI_TRANSPORT_H
eh_strategy_handler:
iscsi_linux_eh_strategy_handler,
#endif
bios_param: iscsi_linux_biosparam,
Index: iscsi_initiator_linux.c
===================================================================
--- iscsi_initiator_linux.c (revision 4112)
+++ iscsi_initiator_linux.c (working copy)
@@ -737,8 +737,12 @@

#ifdef USE_SCSI_TRANSPORT_H
struct scsi_transport_template core_iscsi_transport_template = {
+# ifdef USE_EHTIMEDOUT_SCSI_TRANSPORT_H
.eh_strategy_handler = iscsi_linux_eh_strategy_handler,
+# endif
+# ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H
.eh_timed_out = iscsi_linux_eh_scsi_timeout,
+# endif
};
#endif

is...@digitaltadpole.com

unread,
Jun 30, 2006, 10:47:44 AM6/30/06
to Core-iSCSI
Hi Nab,

The patch didn't seem to work on our system. I get the error:


/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:741: error: unknown


field 'eh_strategy_handler' specified in initializer

/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:741: warning: missing
braces around initializer
/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:741: warning: (near
initialization for 'core_iscsi_transport_template.host_attrs')
/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:741: warning:


initialization from incompatible pointer type

/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.c:1137: error:
conflicting types for 'iscsi_linux_eh_strategy_handler'
/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux_scsi_defs.h:27: error:
previous declaration of 'iscsi_linux_eh_strategy_handler' was here


make[2]: *** [/home/core-iscsi-v1.6.2.8/iscsi_initiator_linux.o] Error
1
make[1]: *** [_module_/home/core-iscsi-v1.6.2.8] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.16.13-4'

This comes after I made the changes and did a clean build. All the
files in my webspace again for you to see. Thanks for all your help!

http://www4.ncsu.edu/~rchernan/iscsi_initiator_linux_scsi_defs.h
http://www4.ncsu.edu/~rchernan/iscsi_initiator_linux.c
http://www4.ncsu.edu/~rchernan/Makefile

Thanks

Robert

is...@digitaltadpole.com

unread,
Jun 30, 2006, 1:59:06 PM6/30/06
to Core-iSCSI
Robert, if you get a chance, please run "md5" or "md5sum" on these
files and put the result in a "filename.md5" in the same place for a
quick confirmation that you and Nicholas are looking with the same
thing. You may also want to do a "diff" between the two file versions
and see if you get the same exact patch as a result. It would be a
shame to spend a lot of time on this only to discover later that you
are dealing with a "dos2unix/"unix2dos" type issue or a different
method of applying the patches.

Regards,

Maz

PS - the phone's not working, I can't call to say this trivial thought

Nicholas A. Bellinger

unread,
Jun 30, 2006, 2:52:33 PM6/30/06
to Core-...@googlegroups.com
Greetings Robert,

Ok, one last thing here:

Index: iscsi_initiator_linux.c
===================================================================
--- iscsi_initiator_linux.c (revision 4112)
+++ iscsi_initiator_linux.c (working copy)

@@ -1128,7 +1132,7 @@
* recovery ourselves. We need this present in our
Scsi_Host_Template to
* prevent the SCSI stack in 2.6 from complaining.
*/
-#ifdef USE_SCSI_TRANSPORT_H
+#ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H
static void iscsi_linux_eh_strategy_handler (struct Scsi_Host *sh)
{
return;


Sorry for the delay! :-)

--nab

--
Nicholas A. Bellinger <n...@kernel.org>

is...@digitaltadpole.com

unread,
Jun 30, 2006, 9:31:13 PM6/30/06
to Core-iSCSI
Thanks, Nicholas!! We REALLY appreciate your help. Robert went home
for the holiday weekend and we'll try to include this patch and compile
it Saturday nite/Sunday (Mic's got to "push button/get pellet" on Sat
AM.

We'll post a note on the results as soon as we have some.

Regards,

Maz

is...@digitaltadpole.com

unread,
Jul 1, 2006, 11:39:22 PM7/1/06
to Core-iSCSI
Hey this is Mickey, thanks for all the help! I think we got it working!
We did have to change your first patch a bit:, the Ifdef lines had to
be reversed.
It had:

# ifdef USE_EHTIMEDOUT_SCSI_TRANSPORT_H
.eh_strategy_handler = iscsi_linux_eh_strategy_handler,

# endif


# ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H
.eh_timed_out = iscsi_linux_eh_scsi_timeout,

# endif

We changed it to:

# ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H
.eh_strategy_handler = iscsi_linux_eh_strategy_handler,
# endif
# ifdef USE_EHTIMEDOUT_SCSI_TRANSPORT_H
.eh_timed_out = iscsi_linux_eh_scsi_timeout,
# endif

For the benefit of anyone else tring to get this compiled on suse as we
did here's the complete patch (*Note you will need to change the
locations as I don't really know how to make patches)


diff -u'rNF^function' core-iscsi-v1.6.2.8.orig/Makefile
core-iscsi-v1.6.2.8/Makefile
--- core-iscsi-v1.6.2.8.orig/Makefile 2006-06-27 19:37:36.000000000
-0400
+++ core-iscsi-v1.6.2.8/Makefile 2006-07-01 22:39:56.000000000 -0400


@@ -48,7 +48,8 @@
EXTRA_CFLAGS += -DCONFIG_ISCSI_DEBUG
endif

-EXTRA_CFLAGS += $(shell grep -c "eh_timed_out"
$(KERNEL_DIR)/include/scsi/scsi_transport.h | awk '{ if ($$0 != "0")
print "-DUSE_SCSI_TRANSPORT_H"}')
+EXTRA_CFLAGS += $(shell grep -c "eh_timed_out"
$(KERNEL_DIR)/include/scsi/scsi_transport.h | awk '{ if ($$0 != "0")
print "-DUSE_SCSI_TRANSPORT_H -DUSE_EHTIMEDOUT_SCSI_TRANSPORT_H"}')
+EXTRA_CFLAGS += $(shell grep -c "eh_strategy_handler"
$(KERNEL_DIR)/include/scsi/scsi_transport.h | awk '{ if ($$0 != "0")
print "-DUSE_SCSI_TRANSPORT_H -DUSE_EHSTRATEGY_SCSI_TRANSPORT_H"}')

ifeq ($(USEGDB), 1)
EXTRA_CFLAGS += -g

diff -u'rNF^function' core-iscsi-v1.6.2.8.orig/iscsi_initiator_linux.c
core-iscsi-v1.6.2.8/iscsi_initiator_linux.c
--- core-iscsi-v1.6.2.8.orig/iscsi_initiator_linux.c 2006-06-27
19:38:06.000000000 -0400
+++ core-iscsi-v1.6.2.8/iscsi_initiator_linux.c 2006-07-01
23:12:37.000000000 -0400
@@ -737,8 +737,12 @@

#ifdef USE_SCSI_TRANSPORT_H
struct scsi_transport_template core_iscsi_transport_template = {

- .eh_strategy_handler = iscsi_linux_eh_strategy_handler,
- .eh_timed_out = iscsi_linux_eh_scsi_timeout,
+# ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H
+ .eh_strategy_handler = iscsi_linux_eh_strategy_handler,
+# endif
+# ifdef USE_EHTIMEDOUT_SCSI_TRANSPORT_H
+ .eh_timed_out = iscsi_linux_eh_scsi_timeout,
+# endif
};
#endif

@@ -1128,7 +1132,7 @@


* recovery ourselves. We need this present in our Scsi_Host_Template
to
* prevent the SCSI stack in 2.6 from complaining.
*/
-#ifdef USE_SCSI_TRANSPORT_H
+#ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H
static void iscsi_linux_eh_strategy_handler (struct Scsi_Host *sh)
{
return;

diff -u'rNF^function'
core-iscsi-v1.6.2.8.orig/iscsi_initiator_linux_scsi_defs.h
core-iscsi-v1.6.2.8/iscsi_initiator_linux_scsi_defs.h
---
core-iscsi-v1.6.2.8.orig/iscsi_initiator_linux_scsi_defs.h 2006-06-27
19:38:06.000000000 -0400
+++ core-iscsi-v1.6.2.8/iscsi_initiator_linux_scsi_defs.h 2006-07-01
22:44:07.000000000 -0400


@@ -21,7 +21,7 @@
static const char *iscsi_linux_info (struct Scsi_Host *);
static inline int iscsi_linux_queuecommand (struct scsi_cmnd *, void
(* done)(struct scsi_cmnd *));
extern enum scsi_eh_timer_return iscsi_linux_eh_scsi_timeout (struct
scsi_cmnd *);

-#ifdef USE_SCSI_TRANSPORT_H
+#ifdef USE_EHSTRATEGY_SCSI_TRANSPORT_H


static void iscsi_linux_eh_strategy_handler (struct Scsi_Host *);
#else
static int iscsi_linux_eh_strategy_handler (struct Scsi_Host *);

@@ -58,9 +58,11 @@


proc_info: iscsi_linux_proc_info,
info: iscsi_linux_info,
queuecommand: iscsi_linux_queuecommand,
-#ifndef USE_SCSI_TRANSPORT_H

- eh_timed_out: iscsi_linux_eh_scsi_timeout,
- eh_strategy_handler: iscsi_linux_eh_strategy_handler,
+#ifndef USE_EHTIMEDOUT_SCSI_TRANSPORT_H
+ eh_timed_out: iscsi_linux_eh_scsi_timeout,
+#endif
+#ifndef USE_EHSTRATEGY_SCSI_TRANSPORT_H
+ eh_strategy_handler:
iscsi_linux_eh_strategy_handler,
#endif
bios_param: iscsi_linux_biosparam,
can_queue: SCSI_DEFAULT_CAN_QUEUE,

-Mic

Reply all
Reply to author
Forward
0 new messages