Compiling Pound 2.6e with openssl-1.0.0d on CentOS 5.6

More Pound compiling! Seems like the memory leak was in openssl, not Pound, so, here’s how to compile the newest openssl and Pound:

# extract sources
root[~]$ tar zxvf ../openssl-1.0.0d.tar.gz
root[~]$ tar zxvf ../Pound-2.6e.tgz
root[~]$ cd openssl-1.0.0d/
# configure openssl
root[~/openssl-1.0.0d]$ ./config --prefix=/opt/openssl_1d/ \
  --openssldir=/opt/openssl_1d/ \
  threads zlib shared
[...]
# compile
root[~/openssl-1.0.0d]$ time make &> compilation-output.log
# install (as root)
root[~/openssl-1.0.0d]$ su
password:
root[~/openssl-1.0.0d]# make install
# add the lib to ldconfig
root[~/openssl-1.0.0d]# echo '/opt/openssl_1d/lib' > \
  /etc/ld.so.conf.d/openssl-1d.conf
root[~/openssl-1.0.0d]# ldconfig -v | grep ssl
[...]
/opt/openssl-1d/lib:
 libssl.so.1.0.0 -> libssl.so.1.0.0
 libssl.so.6 -> libssl.so.0.9.8e
 libssl.so.6 -> libssl.so.0.9.8e
 libgnutls-openssl.so.13 -> libgnutls-openssl.so.13.0.6
 libssl3.so -> libssl3.so
 libgnutls-openssl.so.13 -> libgnutls-openssl.so.13.0.6
 libssl3.so -> libssl3.so
[...]
root[~/openssl-1.0.0d]# exit
root[~/openssl-1.0.0d]$ 
# move to pound source dir
root[~/openssl-1.0.0d]$ cd ../Pound-2.6e/
# fix pound configure for old gcc
root[~/Pound-2.6e]$ sed -i -e 's#-Wno-unused-result##g' configure
# configure pound
root[~/Pound-2.6e]$ ./configure --with-ssl=/opt/openssl_1d/ \
  --prefix=/opt/pound
[...]
# compile
root[~/Pound-2.6e]$ make
[...]
root[~/Pound-2.6e]$ su -c 'make install'
[...]

If you have GCC 4.4 on CentOS, you’ll get an error compiling pound:

root[~/Pound-2.6e]$ make
[...]
pound.o: In function `put_thr_arg':
/usr/src/Pound-2.6e/pound.c:131: undefined reference to `rpl_malloc'
[...]

To fix this, you should export this before compiling (found here):

root[~/Pound-2.6e]$ export ac_cv_func_malloc_0_nonnull=yes
root[~/Pound-2.6e]$ make
[...]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s