building haproxy with USE_STATIC_PCRE

From: Christian Wiese <morfoh#opensde.org>
Date: Wed, 19 Nov 2008 14:25:00 +0100


Hi folks,

I just compiled haproxy 1.3.15.6 on a Debian machine using following make call:
------------------snip--------------------
make PREFIX=/usr \

     TARGET=linux26 \
     CPU=i686 \
     USE_PCRE=1 USE_STATIC_PCRE=1 \
     USE_REGPARM=1

------------------snip--------------------

but when I run 'ldd haproxy' it seems to me that the USE_STATIC_PCRE=1 has no effect at all because haproxy is obviously linked against the shared libpcre.

---------------------------------snip----------------------------------
# ldd haproxy

	linux-gate.so.1 =>  (0xffffe000)
	libpcreposix.so.3 => /usr/lib/libpcreposix.so.3 (0xb7f65000)
	libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb7f3f000)
	libc.so.6 => /lib/tls/libc.so.6 (0xb7e0c000)
	/lib/ld-linux.so.2 (0xb7f6d000)

---------------------------------snip----------------------------------

I verified it by building on a non-debian machine and the same issue shows up too.

gcc version on debian etch:
---------------------------------snip----------------------------------
# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu Thread model: posix gcc
version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
---------------------------------snip----------------------------------

gcc version on my workstation:
---------------------------------snip----------------------------------
gcc -v
Using built-in specs.
Target: i686-unknown-linux-gnu
Configured with: ../configure --prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --libdir=/usr/lib --datadir=/usr/share
--includedir=/usr/include --infodir=/usr/info --mandir=/usr/man
--sysconfdir=/etc --localstatedir=/var --disable-debug --with-libpam
--with-pam --enable-libpam --enable-pam --build=i686-unknown-linux-gnu
--host=i686-unknown-linux-gnu --enable-__cxa_atexit --disable-checking
--disable-bootstrap --disable-libstdcxx-pch --disable-multilib
--with-gnu-as --with-gnu-ld --enable-threads=posix --enable-libgcj
--disable-libgfortran --enable-shared
--enable-languages=c,c++,java,objc Thread model: posix gcc version 4.1.2
---------------------------------snip----------------------------------

What I find interesting is that on the debilian machine 'nm' shows unresolved symbols:
---------------------------------snip----------------------------------
# nm haproxy | grep pcre

         U pcreposix_regcomp
         U pcreposix_regexec
         U pcreposix_regfree

---------------------------------snip----------------------------------

but no traces of pcre at all while doing the same on my local workstation.

For any kind of hint that enlightens that issue I'd be extremely thankful ;)

Have a nice day!

Cheers,
Chris Received on 2008/11/19 14:25

This archive was generated by hypermail 2.2.0 : 2008/11/19 14:30 CET