Recently I have to install apache 2.0.58 on Solaris 10, but I was facing make: Fatal error: Command failed for target `all-recursive’ error

Following is the snippets of the error

making all in expat
/bin/bash ../libtool --mode=link  gcc -version-info 1:0:1 -g -O2  -o libexpat.la -rpath /vidyadhar/apache/lib  xmlparse.lo xmltok.lo xmlrole.lo
rm -fr  .libs/libexpat.so .libs/libexpat.so.0 .libs/libexpat.so.0.1.0
gcc -shared -Wl,-h -Wl,libexpat.so.0 -o .libs/libexpat.so.0.1.0  .libs/xmlparse.o .libs/xmltok.o .libs/xmlrole.o  -lc
(cd .libs && rm -f libexpat.so.0 && ln -s libexpat.so.0.1.0 libexpat.so.0)
(cd .libs && rm -f libexpat.so && ln -s libexpat.so.0.1.0 libexpat.so)
false cru .libs/libexpat.a  xmlparse.o xmltok.o xmlrole.o
*** Error code 1
make: Fatal error: Command failed for target `libexpat.la'
Current working directory /vidyadhar/HTTP/httpd-2.0.58.tar/httpd-2.0.58/srclib/apr-util/xml/expat/lib
*** Error code 1
The following command caused the error:
list='lib'; \
for dir in $list; do \
  cd $dir; make; cd ..; \
done
make: Fatal error: Command failed for target `build-subdirs'
Current working directory /vidyadhar/HTTP/httpd-2.0.58.tar/httpd-2.0.58/srclib/apr-util/xml/expat
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive | sed s/-recursive//`; \
list='expat'; \
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 "apr_xml.lo"; 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'
Current working directory /vidyadhar/HTTP/httpd-2.0.58.tar/httpd-2.0.58/srclib/apr-util/xml
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive | sed s/-recursive//`; \
list='buckets crypto dbm encoding hooks ldap uri xml misc strmatch xlate'; \
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 "delete-lib libaprutil-0.la delete-exports aprutil.exp export_vars.h"; 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'
Current working directory /vidyadhar/HTTP/httpd-2.0.58.tar/httpd-2.0.58/srclib/apr-util
*** Error code 1
The following command caused the error:
otarget=`echo all-recursive|sed s/-recursive//`; \
list=' apr apr-util pcre'; \
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 ''; 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'
Current working directory /vidyadhar/HTTP/httpd-2.0.58.tar/httpd-2.0.58/srclib
*** 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  '; 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'

The above error is causing because of gcc. I have also tried to do make using gmake but still no luck. To solve this I have added following in my PATH
/usr/ccs/bin
/usr/sfw/bin

export PATH=/usr/ccs/bin:/usr/sfw/bin:$PATH

Also you need to declare cc=gcc, to do the same run

export CC=gcc
Error while Compiling Apache from Source Solaris
Tagged on:                                     

One thought on “Error while Compiling Apache from Source Solaris

  • February 25, 2017 at 11:45 pm
    Permalink

    Man… you are god.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google