Compiler errors make-编译modowa(apache模块)时发生致命错误

Compiler errors make-编译modowa(apache模块)时发生致命错误,compiler-errors,makefile,apache2,Compiler Errors,Makefile,Apache2,我从来没有真正习惯在linux上编译东西,现在我不得不这样做。 我想编译一个名为[modowa][1]的旧apache模块。 我在运行make-lf modowa.mk时遇到一些问题。多次出现相同错误: cc -DAPACHE22 -DLINUX -D_ISOC99_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -fPIC -Wall -O -fPIC -I. -I/rdbms/public -I/network/publ

我从来没有真正习惯在linux上编译东西,现在我不得不这样做。
我想编译一个名为[modowa][1]的旧apache模块。
我在运行
make-lf modowa.mk
时遇到一些问题。多次出现相同错误:

    cc -DAPACHE22 -DLINUX -D_ISOC99_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -fPIC -Wall -O -fPIC -I. -I/rdbms/public -I/network/public -I/xdk/include -I/home/myuser/tmp/apache22/include -I/usr/include/apr-1 -I/usr/include/apache2 -c owasql.c
    In file included from owasql.c:60:0:
    ./modowa.h:179:22: fatal error: oratypes.h: No such file or directory
    compilation terminated.
    make: *** [owasql.o] Error 1
第60行的owasql.c包括modowa.h,第179行的modowa.h包括oratypes.h。文件
oratypes.h
确实存在于
$ORACLE\u HOME/rdbms/public
上:

    # ls $ORACLE_HOME/rdbms/public/oratypes*
    $ORACLE_HOME/rdbms/public/oratypes.h
    #
环境变量:在运行make命令之前设置ORACLE\u HOME、NLS\u LANG、LD\u LIBRARY\u路径。
我的makefile如下所示:

    # Makefile for mod_owa.so
    .SUFFIXES:
    .SUFFIXES:              .lc .oc .lpc .opc .pc .c .o .cpp .oln

    # It's assumed that you have ORACLE_HOME set in your build environment;
    # if not, add a definition here to support the make process.
    ORA_LIB         = $(ORACLE_HOME)/lib

    # Change this to point to wherever you've installed Apache.
    APACHE_TOP      = /home/myuser/tmp/apache22

    ORAINC          = -I$(ORACLE_HOME)/rdbms/public \
                      -I$(ORACLE_HOME)/network/public \
                      -I$(ORACLE_HOME)/xdk/include
    INCLUDES        = -I. $(ORAINC) -I$(APACHE_TOP)/include -I/usr/include/apr-1 -I/usr/include/apache2

    # CC = cc almost everywhere, but change as necessary for your platform
    # (e.g. CC = gcc, or CC = /path/to/yourcc).
    #
    # You might need to define LD = ld on some platforms.  Mainly this matters
    # in cases where the flag to build a shared library isn't understood by cc.
    # Actually ld is probably correct on most platforms; it would work on
    # Linux, too, except that Oracle built the OCI library in such a way that
    # you will have unresolved symbols unless you use cc to link.
    CC              = cc
    LD              = cc

    # This consists of -D<platform>, plus whatever other flags may be required
    # on your platform.  In general, -O (optimization) is a good idea.  Other
    # flags may be needed to improve the code, for example special flags to
    # force string literals into the code segment (e.g. "-xstrconst" on Solaris).
    # Some platforms require that loadable libraries be build with "position-
    # independent code", and a special flag is needed here to generate such
    # code (e.g. "-Z" on HP/UX).  Finally, the OCI may require certain other
    # compilation flags, particularly flags that govern how structures and
    # structure members are aligned and ordered, and flags that govern
    # misaligned read/write operations (in general, the compiler defaults
    # will be correct).
    # On Linux x86_64, you may need -m64 and you definitely need -fPIC.
    DEFS            = -D_ISOC99_SOURCE -D_GNU_SOURCE -D_LARGEFILE64_SOURCE \
                      -D_REENTRANT
    CFLAGS          = -DAPACHE22 -DLINUX $(DEFS) -fPIC -Wall -O -fPIC

    # Mainly, LDFLAGS needs to contain whatever flag is required to cause the
    # linker to generate a shared/dynamic library instead of a normal executable.
    # This is different on every platform.
    LDFLAGS         = -shared

    # Other libraries may be needed on other platforms (e.g. "-lcl" on HP/UX).
    CLIBS           = -L/usr/lib -ldl -lpthread -lc

    ORALINK         = -L$(ORACLE_HOME)/lib -lclntsh

    # Build the target stubs against this library, which forces older glibc
    # dependencies to be built into the binary and ensures compatibility with
    # older versions of Linux.
    ORASTUBS        = $(ORACLE_HOME)/lib/stubs/libc-2.3.4-stub.so

    OBJS            = owautil.o owafile.o owanls.o owasql.o owalog.o \
                      owadoc.o owahand.o owaplsql.o owacache.o modowa.o

    mod_owa.so: $(OBJS)
            $(LD) $(LDFLAGS) -o $@ $(OBJS) $(ORALINK) $(CLIBS)

    stubs: $(OBJS)
            $(LD) $(LDFLAGS) -o mod_owa.so $(OBJS) $(ORALINK) $(ORASTUBS) $(CLIBS)

    .c.o:
            $(CC) $(CFLAGS) $(INCLUDES) -c $<

更新1:很抱歉,我必须将引用部分放入代码标记中,否则我会收到一条消息,我的帖子似乎包含未格式化的代码…

,因此似乎makefile格式错误。我查看了原始makefile,我刚刚看到这个部分在换行符上少了4个空格

ORAINC          = -I$(ORACLE_HOME)/rdbms/public \
                  -I$(ORACLE_HOME)/network/public \
                  -I$(ORACLE_HOME)/xdk/include


make.kf modowa.mk
在没有任何警告或错误的情况下处理。

因此,makefile的格式似乎是错误的。我查看了原始makefile,我刚刚看到这个部分在换行符上少了4个空格

ORAINC          = -I$(ORACLE_HOME)/rdbms/public \
                  -I$(ORACLE_HOME)/network/public \
                  -I$(ORACLE_HOME)/xdk/include

make.kf modowa.mk
处理时没有任何警告或错误

ORAINC          = -I$(ORACLE_HOME)/rdbms/public \
              -I$(ORACLE_HOME)/network/public \
              -I$(ORACLE_HOME)/xdk/include