【问题标题】:Compiling pcre 8.32 on AIX 6.1 64 bit在 AIX 6.1 64 位上编译 pcre 8.32
【发布时间】:2012-12-21 05:15:40
【问题描述】:

我正在尝试使用以下命令配置和制作 pcre

./configure CC="gcc" CFLAGS="-maix64" CXX="gcc" CXXFLAGS="-maix64" LDFLAGS="-L/usr/ccs/bin -maix64" --disable-cpp --prefix=/usr/local/share/bld/pcre

配置工作正常: pcre-8.32 配置总结:

Install prefix .................. : /usr/local/share/bld/pcre
C preprocessor .................. : gcc -maix64 -E
C compiler ...................... : gcc -maix64
C++ preprocessor ................ : gcc -maix64 -E
C++ compiler .................... : gcc -maix64
Linker .......................... : /usr/bin/ld
C preprocessor flags ............ :
C compiler flags ................ : -O2
C++ compiler flags .............. : -maix64
Linker flags .................... :
Extra libraries ................. :

Build 8 bit pcre library ........ : yes
Build 16 bit pcre library ....... : no
Build 32 bit pcre library ....... : no
Build C++ library ............... : no
Enable JIT compiling support .... : no
Enable UTF-8/16/32 support ...... : no
Unicode properties .............. : no
Newline char/sequence ........... : lf
\R matches only ANYCRLF ......... : no
EBCDIC coding ................... : no
EBCDIC code for NL .............. : n/a
Rebuild char tables ............. : no
Use stack recursion ............. : yes
POSIX mem threshold ............. : 10
Internal link size .............. : 2
Match limit ..................... : 10000000
Match limit recursion ........... : MATCH_LIMIT
Build shared libs ............... : yes
Build static libs ............... : no
Use JIT in pcregrep ............. : no
Buffer size for pcregrep ........ : 20480
Link pcregrep with libz ......... : no
Link pcregrep with libbz2 ....... : no
Link pcretest with libedit ...... : no
Link pcretest with libreadline .. : no
Valgrind support ................ : no
Code coverage ................... : no

在做 make 时出现以下错误:

bash-3.00# make
        rm -f pcre_chartables.c    
        ln -s ./pcre_chartables.c.dist pcre_chartables.c
     make  all-am
  CC     libpcre_la-pcre_byte_order.lo
  CC     libpcre_la-pcre_compile.lo
  CC     libpcre_la-pcre_config.lo
  CC     libpcre_la-pcre_dfa_exec.lo
  CC     libpcre_la-pcre_exec.lo
  CC     libpcre_la-pcre_fullinfo.lo
  CC     libpcre_la-pcre_get.lo
  CC     libpcre_la-pcre_globals.lo
  CC     libpcre_la-pcre_jit_compile.lo
  CC     libpcre_la-pcre_maketables.lo
  CC     libpcre_la-pcre_newline.lo
  CC     libpcre_la-pcre_ord2utf8.lo
  CC     libpcre_la-pcre_refcount.lo
  CC     libpcre_la-pcre_string_utils.lo
  CC     libpcre_la-pcre_study.lo
  CC     libpcre_la-pcre_tables.lo
  CC     libpcre_la-pcre_ucd.lo
  CC     libpcre_la-pcre_valid_utf8.lo
  CC     libpcre_la-pcre_version.lo
  CC     libpcre_la-pcre_xclass.lo
  CC     libpcre_la-pcre_chartables.lo
  CCLD   libpcre.la

0654-210 .libs/libpcre_la-pcre_byte_order.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_compile.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_config.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_dfa_exec.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_exec.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_fullinfo.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_get.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_globals.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_jit_compile.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_maketables.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_newline.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_ord2utf8.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_refcount.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_string_utils.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_study.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_tables.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_ucd.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_valid_utf8.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_version.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_xclass.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

0654-210 .libs/libpcre_la-pcre_chartables.o is not valid in the current object file mode.

        Use the -X option to specify the desired object mode.

ar: 0707-126 .libs/libpcre.so.1 is not valid with the current object file mode.

        Use the -X option to specify the desired object mode.

make: 1254-004 The error code from the last command is 1.

Stop.

make: 1254-004 The error code from the last command is 2

我尝试过:使用OBJECT_MODE=64q64,但在这种情况下,即使配置失败。 任何建议都可以接受。

【问题讨论】:

    标签: pcre aix


    【解决方案1】:

    使用以下命令解决:

    ./configure CC="gcc" CFLAGS="-maix64"  CXX="g++" CXXFLAGS="-maix64" NM="nm -X64" \
        AR="ar -X64" --disable-cpp --prefix=/usr/local/share/bld/pcre
    

    【讨论】:

    • 只是一个观察,但使用 Autotools 您可能可以简化为 CPPFLAGS=-maix64,因为 CPPFLAGSCFLAGSCXXFLAGS 一起使用。
    猜你喜欢
    • 2014-11-08
    • 1970-01-01
    • 2014-02-23
    • 2011-10-14
    • 1970-01-01
    • 2011-12-10
    • 2017-01-21
    • 2016-02-17
    • 2015-09-02
    相关资源
    最近更新 更多