Mantis - Resin
Viewing Issue Advanced Details
425 minor always 10-19-05 00:00 01-21-06 13:59
tokyoturnip  
ferg  
high  
closed  
3.0.13 fixed  
none    
none 3.0.18  
0000425: Compliling Apache2 module on Solaris 10
RSN-471
I am attempting to compile and install the apache2 module.
Configure was having difficulty finding openssl so I gave it a helping hand using --with-openssl-include=/usr/sfw/include. Actually do not need ssl and have attempted to configure and make using --disable-ssl with same results.

Please see the output of the configure command. I am also attaching the relevent makefiles.

Please give any advice you may have.

Thank you in advance.

Ron

# ./configure --with-openssl-include=/usr/sfw/include --with-apxs=/usr/apache2/bin/apxs; make; make install
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking target system type... i386-pc-solaris2.10
checking for a BSD-compatible install... automake/install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for ld used by GCC... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking how to run the C preprocessor... gcc -E
checking for egrep... egrep
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking for a sed that does not truncate output... /usr/bin/sed
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/ccs/bin/nm -p output... ok
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking whether the linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking dynamic linker characteristics... solaris2.10 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
creating libtool
Using shared library flags from /usr/apache2/bin/apxs
checking for JAVA_HOME... /usr/j2se
checking if Java is 64-bit... no
Using Apache 2.0 configuration /etc/apache2/httpd.conf
Using Apache CFLAGS: -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -DSSL_EXPERIMENTAL -DSSL_ENGINE
checking for JNI in /usr/j2se/include/solaris ... found
Using openssl include in ... /usr/sfw/include
Using openssl lib in ... /usr/lib
Using openssl libraries in ... -lcrypt -lssl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bin/wrapper.pl
config.status: creating modules/c/src/Makefile
config.status: creating modules/c/src/common/Makefile
config.status: creating modules/c/src/apache1/Makefile
config.status: creating modules/c/src/apache2/Makefile
config.status: creating modules/c/src/resin_os/Makefile
config.status: creating contrib/init.resin
config.status: executing depfiles commands
(cd modules/c/src; make)
for dir in common apache2 resin_os; do (cd $dir; make); done
gcc -c -I/usr/sfw/include -g -O2 -DPOLL -D__SOLARIS__ stream.c
gcc -c -I/usr/sfw/include -g -O2 -DPOLL -D__SOLARIS__ config.c
config.c: In function `read_config':
config.c:409: warning: assignment makes pointer from integer without a cast
config.c: In function `read_all_config':
config.c:678: warning: assignment makes pointer from integer without a cast
config.c: In function `cse_update_host':
config.c:853: warning: assignment makes pointer from integer without a cast
config.c: At top level:
config.c:864: error: conflicting types for 'cse_match_host_impl'
config.c:409: error: previous implicit declaration of 'cse_match_host_impl' was here
*** Error code 1
make: Fatal error: Command failed for target `config.o'
Current working directory /usr/resin-3.0.13/modules/c/src/common
/usr/resin-3.0.13/libtool --silent --mode=compile gcc -o mod_caucho.lo -c -I/usr/apache2/include -I/usr/apache2/include -DRESIN_HOME=\"/usr/resin-3.0.13\" -I../common -g -O2 -DPOLL -D__SOLARIS__ -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -DSSL_EXPERIMENTAL -DSSL_ENGINE mod_caucho.c
gcc: unrecognized option `-Xa'
gcc: language ildoff not recognized
gcc: mod_caucho.c: linker input file unused because linking not done
/usr/resin-3.0.13/libtool --silent --mode=compile gcc -o ../common/stream.lo -c -I/usr/apache2/include -I/usr/apache2/include -DRESIN_HOME=\"/usr/resin-3.0.13\" -I../common -g -O2 -DPOLL -D__SOLARIS__ -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -DSSL_EXPERIMENTAL -DSSL_ENGINE ../common/stream.c
gcc: unrecognized option `-Xa'
gcc: language ildoff not recognized
gcc: ../common/stream.c: linker input file unused because linking not done
/usr/resin-3.0.13/libtool --silent --mode=compile gcc -o ../common/config.lo -c -I/usr/apache2/include -I/usr/apache2/include -DRESIN_HOME=\"/usr/resin-3.0.13\" -I../common -g -O2 -DPOLL -D__SOLARIS__ -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -DSSL_EXPERIMENTAL -DSSL_ENGINE ../common/config.c
gcc: unrecognized option `-Xa'
gcc: language ildoff not recognized
gcc: ../common/config.c: linker input file unused because linking not done
/usr/resin-3.0.13/libtool --silent --mode=compile gcc -o ../common/memory.lo -c -I/usr/apache2/include -I/usr/apache2/include -DRESIN_HOME=\"/usr/resin-3.0.13\" -I../common -g -O2 -DPOLL -D__SOLARIS__ -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -DSSL_EXPERIMENTAL -DSSL_ENGINE ../common/memory.c
gcc: unrecognized option `-Xa'
gcc: language ildoff not recognized
gcc: ../common/memory.c: linker input file unused because linking not done
/usr/resin-3.0.13/libtool --silent --mode=link /usr/ccs/bin/ld -module -o mod_caucho.la -avoid-version -rpath /usr/apache2/libexec mod_caucho.lo ../common/stream.lo ../common/config.lo ../common/memory.lo
ld: fatal: file .libs/mod_caucho.o: open failed: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `mod_caucho.la'
Current working directory /usr/resin-3.0.13/modules/c/src/apache2
gcc -g -O2 -DPOLL -D__SOLARIS__ -DRESIN_HOME=\"/usr/resin-3.0.13\" -I/usr/sfw/include -I/usr/j2se/include -I/usr/j2se/include/solaris -I../common -DCPU=\"i386\" -DOS= -c jni_os.c
/usr/ccs/bin/ld -G -L/usr/lib -o libresin_os.so jni_os.o -lnsl -lsocket -lthread
(cd modules/c/src; make install)
for dir in common apache2 resin_os; do (cd $dir; make install); done
/usr/resin-3.0.13/libtool --silent --mode=link /usr/ccs/bin/ld -module -o mod_caucho.la -avoid-version -rpath /usr/apache2/libexec mod_caucho.lo ../common/stream.lo ../common/config.lo ../common/memory.lo
ld: fatal: file .libs/mod_caucho.o: open failed: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `mod_caucho.la'
Current working directory /usr/resin-3.0.13/modules/c/src/apache2
mkdir /usr/resin-3.0.13/libexec
cp libresin_os.so /usr/resin-3.0.13/libexec
if test /usr/resin-3.0.13 != `pwd`; then \
  mkdir -p /usr/resin-3.0.13/lib; \
  mkdir -p /usr/resin-3.0.13/libexec; \
  cp -r libexec/* /usr/resin-3.0.13/libexec; \
  cp lib/*.jar /usr/resin-3.0.13/lib; \
  mkdir -p /usr/resin-3.0.13/bin; \
  cp bin/* /usr/resin-3.0.13/bin; \
  mkdir -p /usr/resin-3.0.13/webapps; \
  cp webapps/* /usr/resin-3.0.13/webapps; \
  mkdir -p /usr/resin-3.0.13/conf; \
  cp conf/resin.conf /usr/resin-3.0.13/conf/resin.conf.orig; \
  cp conf/app-default.xml /usr/resin-3.0.13/conf/app-default.xml.orig; \
  if test ! -r /usr/resin-3.0.13/conf/resin.conf; then \
    cp conf/resin.conf /usr/resin-3.0.13/conf/resin.conf; \
    cp conf/app-default.xml /usr/resin-3.0.13/conf/app-default.xml; \
  fi; \
fi


PREFIX=/usr/resin-3.0.13

all :
    (cd modules/c/src; $(MAKE))

clean :
    (cd modules/c/src; $(MAKE) clean)

install :
    (cd modules/c/src; $(MAKE) install)
    if test $(PREFIX) != `pwd`; then \
      mkdir -p $(PREFIX)/lib; \
      mkdir -p $(PREFIX)/libexec; \
      cp -r libexec/* $(PREFIX)/libexec; \
      cp lib/*.jar $(PREFIX)/lib; \
      mkdir -p $(PREFIX)/bin; \
      cp bin/* $(PREFIX)/bin; \
      mkdir -p $(PREFIX)/webapps; \
      cp webapps/* $(PREFIX)/webapps; \
      mkdir -p $(PREFIX)/conf; \
      cp conf/resin.conf $(PREFIX)/conf/resin.conf.orig; \
      cp conf/app-default.xml $(PREFIX)/conf/app-default.xml.orig; \
      if test ! -r $(PREFIX)/conf/resin.conf; then \
        cp conf/resin.conf $(PREFIX)/conf/resin.conf; \
        cp conf/app-default.xml $(PREFIX)/conf/app-default.xml; \
      fi; \
    fi

SHELL=/bin/bash
srcdir = .
top_srcdir = ../../..
plugins=common apache2 resin_os

all : plugins

plugins :
    for dir in $(plugins); do (cd $$dir; $(MAKE)); done

clean :
    for dir in common apache1 apache2 $(plugins); do \
      (cd $$dir; $(MAKE) clean); \
        done

install :
    for dir in $(plugins); do (cd $$dir; $(MAKE) install); done


.SUFFIXES: .o .lo

CC=gcc
CFLAGS=-g -O2 -DPOLL -D__SOLARIS__
CFLAGS_SHLIB=-fPIC
LIBTOOL=/usr/resin-3.0.13/libtool --silent
LD=/usr/ccs/bin/ld
LD_SHLIB=/usr/ccs/bin/ld
LDFLAGS=
LDFLAGS_SHLIB=-G -L/usr/lib
OBJ=stream.o config.o memory.o
OBJ_PICS=stream.lo config.lo memory.lo
INCLUDES= -I/usr/sfw/include

all : common.o $(OBJ_PICS)

common.o : $(OBJ)
    $(LD) -r -o $@ $(OBJ)

common.lo : $(OBJ_PICS)
    $(LD) -r -o $@ $(OBJ_PICS)

.c.lo :
    $(LIBTOOL) --mode=compile $(CC) -o $@ -c $(INCLUDES) $(CFLAGS) $<

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

install :

clean :
    - rm *.o *.lo *.la *.so

$(OBJ) : Makefile cse.h
$(OBJ_PICS) : Makefile cse.h


.SUFFIXES: .o .lo .so

CC=gcc
CP=/bin/cp
CFLAGS=-g -O2 -DPOLL -D__SOLARIS__ -O -xarch=386 -xchip=pentium -xspace -Xa -xildoff -DSSL_EXPERIMENTAL -DSSL_ENGINE
CFLAGS_SHLIB=-fPIC
LIBTOOL=/usr/resin-3.0.13/libtool --silent
LD=/usr/ccs/bin/ld
LD_SHLIB=/usr/ccs/bin/ld
LIBS_SHLIB=
LDFLAGS=
LDFLAGS_SHLIB=-G -L/usr/lib
APACHE_INC=-I/usr/apache2/include -I/usr/apache2/include
apache_conf=/etc/apache2/httpd.conf
apache_dir=/usr/apache2
apache_libexec=/usr/apache2/libexec
resin_home=/usr/resin-3.0.13
INCLUDES = $(APACHE_INC) -DRESIN_HOME=\"$(resin_home)\" -I../common
C=../common
COMMON_OBJ=$C/stream.lo $C/config.lo $C/memory.lo
OBJ_PICS=mod_caucho.lo $(COMMON_OBJ)

all : mod_caucho.la

#mod_caucho.so : mod_caucho.la
# mv mod_caucho.la mod_caucho.so

mod_caucho.la : $(OBJ_PICS)
    $(LIBTOOL) --mode=link $(LD_SHLIB) -module -o $@ -avoid-version -rpath $(apache_libexec) $(OBJ_PICS) $(LIBS_SHLIB)

.c.lo :
    $(LIBTOOL) --mode=compile $(CC) -o $@ -c $(INCLUDES) $(CFLAGS) $<

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

install : mod_caucho.la
    $(LIBTOOL) --mode=install $(CP) mod_caucho.la $(apache_libexec)
    - rm -f $(apache_libexec)/mod_caucho.la
    - rm -f $(apache_libexec)/mod_caucho.a
    sh install.sh -conf $(apache_conf) -libexec $(apache_libexec) \
       -resin_home $(resin_home)

clean :
    - rm *.o *.lo *.la *.so .libs

$(OBJ_PICS) : Makefile ../common/cse.h
mod_caucho.lo : Makefile ../common/cse.h

Solaris 10 (entire distro) x86 on Dell PowerEdge 6300, Default Apache2 and OpenSSL

Notes
(0000469)
tokyoturnip   
10-19-05 00:00   
I verified the same problem with "make" on a second machine (HP Vectra VE 400Mhz) with Solaris 10 installation. I have not tred compliling using Solaris 9, but I may try that next.

Open to any suggestions.