[openib-general] RE: [iSER]making error of the new drop of iSER - syntax error

Dan Bar Dov danb at voltaire.com
Thu Aug 25 03:10:49 PDT 2005


Please update to svn 3128 (latest). The makfile was heavily modified.
The code uses the kdat.h by default.

Please note that you must upgrade your Linux to a 2.6 based distribution and install a 
2.6.12 or better kernel. The ISER initiator does not work, does not even compile on a 2.4 kernel.

Dan 

> -----Original Message-----
> From: Ian Jiang [mailto:ianjiang91 at hotmail.com] 
> Sent: Thursday, August 25, 2005 12:08 PM
> To: openib-general at openib.org
> Cc: Dan Bar Dov
> Subject: [iSER]making error of the new drop of iSER - syntax error
> 
> I am using the redhat AS3, kernel 2.4.21-20.EL. I failed to 
> make the iSER/initiator (r3174). I got the source codes at 
> https://openib.org/svn/gen2/trunk/src/linux-kernel/infiniband/
> ulp/iser/
> and write the Makefile and make.conf according the old ones 
> of the previous iSER/initiator.
> I made a little modification to use the header file of kdat.h 
> of InfiniBand Any suggestion is appriciated!
> 
> ===================================================
> 
> Makefile
> 
> ==========
> 
> # Makefile for iSER r3174
> 
> MAKE_CONF_PATH=.
> 
> MODNAME := iser_dm.o
> 
> #INCLUDES = -I./include
> 
> SOURCES = iser_conn.c \
>   iser_dto.c \
>   iser_initiator.c \
>   iser_lkdapl.c \
>   iser_memory.c \
>   iser_mod.c \
>   iser_pdu.c \
>   iser_task.c \
>   iser_utils.c
> 
> include $(MAKE_CONF_PATH)/make.conf
> 
> ================================================================
> 
> make.conf
> 
> ==========
> 
> # target platform
> # ---------------
> TARGET          = x86_64
> 
> # linux kernel version
> # --------------------
> KERNEL := $(shell uname -r | cut -d'.' -f1,2) KMAJOR=$(shell 
> echo $(KERNEL) | cut -d. -f1) KMINOR=$(shell echo $(KERNEL) | 
> cut -d. -f2) KMINIMINOR=$(shell echo $(KERNEL) | cut -d. -f3)
> KMAJOR_MINOR=$(KMAJOR).$(KMINOR)
> 
> DAT_PATH=$(KERNEL_SRC)/drivers/infiniband/ib_dapl/dat/include/dat
> 
> INCLUDES += -I$(KERNEL_SRC)/include -I$(KERNEL_SRC)/asm 
> INCLUDES += -I$(DAT_PATH) OBJECTS = $(SOURCES:.c=.o) KOBJECTS 
> = $(SOURCES:.c=.ko) OBJECTSCMD = $(SOURCES:.c=.o*)
> 
> INSTDIR = modules
> 
> # platform-specific
> # -----------------
> ifeq ($(TARGET),x86_64)
> CC=gcc
> LD=ld
> LDFLAGS = -m elf_$(ARCH)
> ARCH=x86_64
> FLAVOR=default
> endif
> 
> ifeq ($(TARGET),i386)
> CC=gcc
> LD=ld
> LDFLAGS = -m elf_$(ARCH)
> ARCH=i386
> FLAVOR=default
> endif
> 
> # kernel-specific
> # ---------------
> ifeq ($(KERNEL),2.4)
> KERNEL_EXT =  .21-20.EL
> endif
> 
> ifeq ($(KERNEL),2.6)
> KERNEL_EXT = .4-52
> endif
> 
> KERNEL_VER = $(KERNEL)$(KERNEL_EXT)
> KERNEL_SRC = /usr/src/linux-$(KERNEL_VER)
> 
> 
> .PHONY: modules clean help
> 
> 
> # all rules
> # ---------
> all: modules
> 
> # install rules
> # -------------
> #install: $(MODULES_DIR) $(MODULES_DIR)/$(MODNAME) #
> #$(MODULES_DIR):
> # -mkdir -p $(MODULES_DIR)
> #
> #$(MODULES_DIR)/$(MODNAME): $(MODNAME)
> # @echo "cp $(MODNAME) $(MODULES_DIR)/$(MODNAME)"
> # @cp --remove-destination $(MODNAME) $(MODULES_DIR)
> 
> 
> # clean rules
> # -----------
> clean:
>  rm -f $(OBJECTS) $(KOBJECTS) $(OBJECTSCMD) $(MODNAME)  -rm 
> -f ./$(INSTDIR)/$(MODNAME:.o=.ko)  -rm -f 
> ./$(INSTDIR)/$(MODNAME)  rm -f *.mod.c *.mod.o .*.o.cmd 
> .*.ko.cmd  rm -rf .tmp_versions
> 
> # help rules
> # ----------
> help:
>  @echo "This makefile is controlled by two variable:"
>  @echo "KERNEL=(2.4 | 2.6) - automatically computed based 
> kernel sources"
>  @echo "TARGET=(i386 | x86_64) - default is x86_64"
>  @echo "common targets:"
>  @echo " make modules       - to generate a module"
> # @echo " make kernel-links - fixes kernel links"
>  @echo " make clean - cleanses"
> # @echo " make doc - creates a doxygen documentation"
> 
> # make rule for 2.4 kernels
> # -------------------------
> ifeq ($(KMAJOR_MINOR),2.4)
> CFLAGS += $(INCLUDES) $(MODCFLAGS)
> #CFLAGS += $(INCLUDES) $(MODCFLAGS) -O2 -Wall -Werror
> 
> LDFAGS += -r
> 
> # modules rules
> # -------------
> modules: $(MODNAME)
> $(MODNAME): $(OBJECTS)
>  @echo -e "\n>>> Linking module [$(MODNAME)]"
>  $(LD) $(LDFLAGS) -o $(MODNAME) $(OBJECTS)
> 
> 
> endif
> 
> =====================================================================
> 
> errors
> 
> ========
> 
> 
> 
> 
> In file included from 
> /usr/src/linux-2.4.21-20.EL/include/asm/smp.h:14,
>                  from 
> /usr/src/linux-2.4.21-20.EL/include/linux/smp.h:16,
>                  from 
> /usr/src/linux-2.4.21-20.EL/include/linux/sched.h:24,
>                  from iser.h:38,
>                  from iser_conn.c:34:
> /usr/src/linux-2.4.21-20.EL/include/asm/fixmap.h:53: syntax 
> error before "pgprot_t"
> In file included from 
> /usr/src/linux-2.4.21-20.EL/include/asm/smp.h:16,
>                  from 
> /usr/src/linux-2.4.21-20.EL/include/linux/smp.h:16,
>                  from 
> /usr/src/linux-2.4.21-20.EL/include/linux/sched.h:24,
>                  from iser.h:38,
>                  from iser_conn.c:34:
> /usr/src/linux-2.4.21-20.EL/include/asm/mpspec.h:190: syntax 
> error before "id"
> /usr/src/linux-2.4.21-20.EL/include/asm/mpspec.h:191: syntax 
> error before "address"
> /usr/src/linux-2.4.21-20.EL/include/asm/mpspec.h:194: syntax 
> error before "id"
> /usr/src/linux-2.4.21-20.EL/include/asm/mpspec.h:195: syntax 
> error before "bus_irq"
> In file included from 
> /usr/src/linux-2.4.21-20.EL/include/asm/smp.h:20,
>                  from 
> /usr/src/linux-2.4.21-20.EL/include/linux/smp.h:16,
>                  from 
> /usr/src/linux-2.4.21-20.EL/include/linux/sched.h:24,
>                  from iser.h:38,
>                  from iser_conn.c:34:
> /usr/src/linux-2.4.21-20.EL/include/asm/apic.h:86: syntax 
> error before "unsigned"
> In file included from 
> /usr/src/linux-2.4.21-20.EL/include/linux/sched.h:24,
>                  from iser.h:38,
>                  from iser_conn.c:34:
> /usr/src/linux-2.4.21-20.EL/include/linux/smp.h:31: syntax 
> error before '(' 
> token
> In file included from 
> /usr/src/linux-2.4.21-20.EL/include/linux/sched.h:30,
>                  from iser.h:38,
>                  from iser_conn.c:34:
> /usr/src/linux-2.4.21-20.EL/include/linux/pid.h:18: field 
> `task_list' has incomplete type
> /usr/src/linux-2.4.21-20.EL/include/linux/pid.h:19: field 
> `hash_chain' has incomplete type
> /usr/src/linux-2.4.21-20.EL/include/linux/pid.h:24: field 
> `pid_chain' has incomplete type
> /usr/src/linux-2.4.21-20.EL/include/linux/pid.h:36: syntax 
> error before '(' 
> token
> /usr/src/linux-2.4.21-20.EL/include/linux/pid.h:38: syntax 
> error before '(' 
> token
> 
> ...
> 
> ....
> 
> Ian Jiang 
> 
> ianjiang91 at hotmail.com
> ----
> Computer Architecture Laboratory
> Institute of Computing Technology
> Chinese Academy of Sciences
> Beijing,P.R.China
> Zip code: 100080
> Tel: +86-10-62564394(office)
> 
> _________________________________________________________________
> 免费下载 MSN Explorer:   http://explorer.msn.com/lccn/  
> 
> 



More information about the general mailing list