apache - 在 Solaris 11.3 中编译 httpd-2.4.20 make 失败

标签 apache gcc makefile solaris

我正在尝试在 Solaris 11.3 框中编译 httpd-2.4.20。 ./configure 没有给出任何错误。但是 make 报错,我不知道如何解决。在 stackoverflow 或谷歌搜索中没有找到类似的问题。我的命令如下。

root@LDOM01-test:/data/software/httpd-2.4.20# uname -ar
SunOS LDOM01-test 5.11 11.3 sun4v sparc sun4v

root@LDOM01-test:/data/software/httpd-2.4.20# gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root@LDOM01-test:/data/software/httpd-2.4.20# ./configure --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr
....
....
....

root@LDOM01-test:/data/software/httpd-2.4.20# make
.....
.....
.....

/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99  -g -O2      -DSOLARIS2=11 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE     -I. -I/data/software/httpd-2.4.20/os/unix -I/data/software/httpd-2.4.20/include -I/usr/local/apr/include/apr-1 -I/usr/include/pcre -I/data/software/httpd-2.4.20/modules/aaa -I/data/software/httpd-2.4.20/modules/cache -I/data/software/httpd-2.4.20/modules/core -I/data/software/httpd-2.4.20/modules/database -I/data/software/httpd-2.4.20/modules/filters -I/data/software/httpd-2.4.20/modules/ldap -I/data/software/httpd-2.4.20/modules/loggers -I/data/software/httpd-2.4.20/modules/lua -I/data/software/httpd-2.4.20/modules/proxy -I/data/software/httpd-2.4.20/modules/session -I/data/software/httpd-2.4.20/modules/ssl -I/data/software/httpd-2.4.20/modules/test -I/data/software/httpd-2.4.20/server -I/data/software/httpd-2.4.20/modules/arch/unix -I/data/software/httpd-2.4.20/modules/dav/main -I/data/software/httpd-2.4.20/modules/generators -I/data/software/httpd-2.4.20/modules/mappers -prefer-pic -c regexp.c && touch regexp.slo
/usr/local/apr/build-1/libtool --silent --mode=link gcc -std=gnu99  -g -O2           -o mod_sed.la -rpath /usr/local/apache2/modules -module -avoid-version  mod_sed.lo sed0.lo sed1.lo regexp.lo -export-symbols-regex sed_module
/usr/local/apr/build-1/libtool[1086]: eval: syntax error at line 1: `|' unexpected
*** Error code 3
make: Fatal error: Command failed for target `mod_sed.la'
Current working directory /data/software/httpd-2.4.20/modules/filters
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
    echo "" ; \
fi; \
list=''; for i in $list; do \
    target="shared-build"; \
    if test "$i" = "."; then \
        made_local=yes; \
        target="local-shared-build"; \
    fi; \
    if test "$i" != "srclib"; then \
        (cd $i && make $target) || exit 1; \
    fi; \
done; \
if test -f 'modules.mk'; then \
    if test -n 'mod_buffer.la mod_ratelimit.la mod_reqtimeout.la mod_ext_filter.la mod_request.la mod_include.la mod_filter.la mod_substitute.la mod_sed.la mod_deflate.la'; then \
        echo "Building shared: mod_buffer.la mod_ratelimit.la mod_reqtimeout.la mod_ext_filter.la mod_request.la mod_include.la mod_filter.la mod_substitute.la mod_sed.la mod_deflate.la"; \
        if test "$made_local" != "yes"; then \
                make "local-shared-build" || exit 1; \
        fi; \
    fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
        echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20/modules/filters
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
    echo "" ; \
fi; \
list='aaa cache core database debugging filters http loggers metadata proxy session slotmem ssl proxy/balancers arch/unix dav/main generators dav/fs mappers'; for i in $list; do \
    target="shared-build"; \
    if test "$i" = "."; then \
        made_local=yes; \
        target="local-shared-build"; \
    fi; \
    if test "$i" != "srclib"; then \
        (cd $i && make $target) || exit 1; \
    fi; \
done; \
if test -f 'modules.mk'; then \
    if test -n ''; then \
        echo "Building shared: "; \
        if test "$made_local" != "yes"; then \
                make "local-shared-build" || exit 1; \
        fi; \
    fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
        echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20/modules
*** Error code 1
The following command caused the error:
if test `pwd` = "/data/software/httpd-2.4.20"; then \
    echo "" ; \
fi; \
list='srclib os server modules support'; for i in $list; do \
    target="shared-build"; \
    if test "$i" = "."; then \
        made_local=yes; \
        target="local-shared-build"; \
    fi; \
    if test "$i" != "srclib"; then \
        (cd $i && make $target) || exit 1; \
    fi; \
done; \
if test -f 'modules.mk'; then \
    if test -n ''; then \
        echo "Building shared: "; \
        if test "$made_local" != "yes"; then \
                make "local-shared-build" || exit 1; \
        fi; \
    fi; \
fi; \
if test `pwd` = "/data/software/httpd-2.4.20"; then \
        echo "" ; \
fi
make: Fatal error: Command failed for target `shared-build-recursive'
Current working directory /data/software/httpd-2.4.20
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list='  srclib os server modules support'; \
for i in $list; do \
    if test -d "$i"; then \
        target="$otarget"; \
        echo "Making $target in $i"; \
        if test "$i" = "."; then \
                made_local=yes; \
                target="local-$target"; \
        fi; \
        (cd $i && make $target) || exit 1; \
    fi; \
done; \
if test "$otarget" = "all" && test -z 'httpd shared-build '; then \
    made_local=yes; \
fi; \
if test "$made_local" != "yes"; then \
    make "local-$otarget" || exit 1; \
fi
make: Fatal error: Command failed for target `all-recursive'

最佳答案

在 ./configure .... 编辑 apr libtool srclib/apr/libtool 并删除\$global_symbol_pipe |来自以下行

# The commands to list exported symbols.
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
>>>>>
export_symbols_cmds="\$NM \$libobjs \$convenience |  \$SED 's/.* //' | sort | uniq > \$export_symbols"

然后gmake。 (感谢安德鲁·亨利)

关于apache - 在 Solaris 11.3 中编译 httpd-2.4.20 make 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37497069/

相关文章:

c++ - Qt Creator 使用位于另一个地方的另一个 GCC 版本

c++ - gcc 与 clang : expanding a captured parameter pack twice

makefile - Makefile每次都会重建所有内容,为什么?

apache - 如何仅通过子域进行子文件夹独占访问

php - codeigniter - 升级 php 和 apache 后未找到 fatal error 类 'CI_Controller'

java - Excel单元格值精度

PHP代码没有被执行,但是代码显示在浏览器源代码中

c - 访问库中可执行文件中定义的全局变量时重定义错误

makefile - Makefile 中的别名目标名称

makefile - $<(美元符号+左三角括号)在makefile中是什么意思?