Compiling Apache2 on T2K Platform using SunStudio12 - libiconv error

Hi,

Installed SunStudio12 + all the usual necessary packages from sunfreeware to compile and install apache 2.2.4.

Problem:

When running configure, the libiconv library is not included into the AP_LIBS line in ./build/config_vars.mk. The result is that apache fails to compile.

I used the following variable definitions:

#/*

# * Declare and define program's global variables

# */

PF_defines()

{

CFLAGS='-DSSL_EXPERIMENTAL -DSSL_ENGINE -xO4 -xtarget=generic';

INSTALLDIR=/usr/local;

LDFLAGS="-L$INSTALLDIR/lib -L/usr/local/lib -R/usr/local/lib";

LD_LIBRARY_PATH=:/lib:/opt/SUNWspro/lib:/usr/local/lib:/usr/local/ssl/lib:/usr/ local/BerkeleyDB.4.2/lib:;

LIBS="-liconv";

PATH=:/bin:/sbin:/etc:/usr/bin:/opt/SUNWspro/bin:/usr/local/bin:/usr/ccs/bin:;

PG_ERR_FLAG=0;

export CFLAGS INSTALLDIR LDFLAGS LD_LIBRARY_PATH PATH;

}

This was the configure command:

PF_configure()

{

#/*

# * Here are some options that are SSL related and needed to leverage

# * T2K Onboad SSL Engine

# */

#--enable-rule=SSL_EXPERIMENTAL \

#/*

# * Optimisation options - disabled for now

# */

#--enable-cache \

#--enable-mem-cache \

./configure --enable-mods-shared=all \

--enable-dav \

--enable-dav-fs \

--enable-dav-lock \

--enable-log-forensic \

--enable-logio \

--enable-usertrack \

--enable-info \

--enable-vhost-alias \

--enable-spelling \

--enable-imagemap \

--enable-mime-magic \

--enable-ident \

--enable-rewrite \

--enable-unique-id \

--enable-version \

--enable-so \

--enable-suexec \

--with-dbm=db4 \

--with-berkeley-db=/usr/local/BerkeleyDB.4.2 \

--enable-ssl \

--enable-rule=SSL_EXPERIMENTAL \

--with-ssl=/usr/local/ssl \

--with-mpm=prefork \

--enable-deflate;

[ ${?} -gt 0 ] && {

echo "Error:- Failed to Configure Apache Distribution\n";

PG_ERR_FLAG=30;

}

return ${PG_ERR_FLAG};

}

Workaround:

Run the configure command.

Edit ./build/config_vars.mk and change the AP_LIBS line to

AP_LIBS = /ld01/stage/software/apache_project/apache/httpd-2.2.4/srclib/pcre/libpcre.la /ld01/stage/software/apache_project/apache/h

ttpd-2.2.4/srclib/apr-util/libaprutil-1.la -ldb -lexpat -liconv /ld01/stage/software/apache_project/apache/httpd-2.2.4/srclib/apr/li

bapr-1.la -luuid -lsendfile -lrt -lsocket -lnsl -lpthread

Now run make followed by make install as normal.

Observations:

This works on Solaris 10 x86 using gcc

This works on Solaris 10 SPARC using gcc

This fails on T2K using gcc

Questions:

Has anyone else seen this?

Does anyone have an explanation - i.e. know why configure does not include the inconv library?

Does anyone know how to instruct apache's configure to add "-liconv"?

[3144 byte] By [Joe_Grossea] at [2007-11-27 10:37:41]
# 1

Did you build and install libiconv in /usr/local ?

For the Cool Stack build in /opt/coolstack, we first install libiconv and then build apache by setting LDFLAGS="-l$INSTALLDIR/lib -l/usr/sfw/lib"

Shanti

shantiSa at 2007-7-28 18:49:52 > top of Java-index,Open Source Technologies,OpenSPARC...