RE: Static haproxy/openssl build error

2013-09-30 Thread Lukas Tribus
Hi Willy, >> Like previsouly suggested by Apollon, we could introduce a flag for >> statically linking openssl, like we have with PCRE (USE_STATIC_OPENSSL?). >> >> If we do that, we could also include -ldl automatically when using that USE >> flag. >> >> Thoughts? > > I'm a bit hesitant here and a

Re: Static haproxy/openssl build error

2013-09-30 Thread Vincent Bernat
❦ 30 septembre 2013 13:01 CEST, Apollon Oikonomopoulos  : >> My version of pcre-config (8.30, also tested with 8.31) includes: >> >> libS= >> if test ${prefix}/lib/x86_64-linux-gnu != /usr/lib ; then >> libS=-L${prefix}/lib/x86_64-linux-gnu >> fi > > Update: > > Debian's 8.31 (testing/unstable

Re: Static haproxy/openssl build error

2013-09-30 Thread Apollon Oikonomopoulos
On 13:49 Mon 30 Sep , Apollon Oikonomopoulos wrote: > Hi Vincent, > > On 12:19 Mon 30 Sep , Vincent Bernat wrote: > > For me, pcre-config --libs does not use `-L`. Dunno why this is the > > case for Apollon. > > My version of pcre-config (8.30, also tested with 8.31) includes: > > libS=

Re: Static haproxy/openssl build error

2013-09-30 Thread Apollon Oikonomopoulos
Hi Vincent, On 12:19 Mon 30 Sep , Vincent Bernat wrote: > For me, pcre-config --libs does not use `-L`. Dunno why this is the > case for Apollon. My version of pcre-config (8.30, also tested with 8.31) includes: libS= if test ${prefix}/lib/x86_64-linux-gnu != /usr/lib ; then libS=-L${pref

Re: Static haproxy/openssl build error

2013-09-30 Thread Vincent Bernat
❦ 30 septembre 2013 11:30 CEST, Willy Tarreau  : >> I would use `pcre-config --libs` and `pcre-config --cflags` instead. The >> user can still override this on make command line. >> >> PCRE_CFLAGS := $(shell pcre-config --cflags) >> PCRE_LIBS := $(shell pcre-config --libs) > > But these would st

Re: Static haproxy/openssl build error

2013-09-30 Thread Willy Tarreau
Hi Lukas, On Sun, Sep 29, 2013 at 10:49:41PM +0200, Lukas Tribus wrote: > Another thing regarding SSL_INC/SSL_LIB: when linking against static openssl, > libdl is necessary. Previously I did this by appending ADDLIB with -ldl. It > seems like doing the same in SSL_LIB doesn't work (for me), becaus

Re: Static haproxy/openssl build error

2013-09-30 Thread Willy Tarreau
Hi Vincent, On Sun, Sep 29, 2013 at 10:27:30PM +0200, Vincent Bernat wrote: > ??? 29 septembre 2013 18:30 CEST, Willy Tarreau  : > > > So maybe we should in fact stop setting PCREDIR to $(pcre-config --prefix), > > which will result in PCRE_INC/PCRE_LIB remaining silent unless PCREDIR is > > for

Re: Static haproxy/openssl build error

2013-09-29 Thread Vincent Bernat
❦ 29 septembre 2013 22:27 CEST, Vincent Bernat  : > LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ > $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ > $(AM_LDFLAGS) $(LDFLAGS) -o $@ > haproxy: ... > $(AM_V_CCLD)$(LINK) $(haproxy_OBJECTS) $(haproxy_LD

RE: Static haproxy/openssl build error

2013-09-29 Thread Lukas Tribus
Hi! >> I should have spotted that earlier on, it was reported to us as Debian >> bug #722777 [1] and it's there because of USE_PCRE; when USE_PCRE is >> enabled, and PCREDIR is not specified, PCRE_LIB will be forced to >> `pcre-config --prefix`/lib (which 99% of the time will be /usr/lib) >> and

Re: Static haproxy/openssl build error

2013-09-29 Thread Vincent Bernat
❦ 29 septembre 2013 18:30 CEST, Willy Tarreau  : > So maybe we should in fact stop setting PCREDIR to $(pcre-config --prefix), > which will result in PCRE_INC/PCRE_LIB remaining silent unless PCREDIR is > forced. I suspect the following patch should fix it : > > diff --git a/Makefile b/Makefile >

Re: Static haproxy/openssl build error

2013-09-29 Thread Apollon Oikonomopoulos
Hi Willy, On 18:30 Sun 29 Sep , Willy Tarreau wrote: > That's problematic. The issue was created by the addition of > pcre-config > because some people could not build on their systems in the past. The whole > mess started with the lib64 subdir that broke basically every software > relying on

Re: Static haproxy/openssl build error

2013-09-29 Thread Willy Tarreau
Hi Apollon, On Sun, Sep 29, 2013 at 06:49:41PM +0300, Apollon Oikonomopoulos wrote: > Hi all, > > On 13:35 Sun 29 Sep , Willy Tarreau wrote: > > Yes, and I have fixed this two weeks ago. The problem is that the > > "ADDINC" > > and "ADDLIB" variables are not suited for passing single-compone

Re: Static haproxy/openssl build error

2013-09-29 Thread Julien Vehent
Hi Willy. It worked, thanks a lot. Output + build commands are below. On 2013-09-29 13:35, Willy Tarreau wrote: Hi Julien, On Fri, Sep 27, 2013 at 11:08:11AM +0200, Julien Vehent wrote: Hi everyone, I'm attempting to build HEAD with a statically compiled openssl, and get the following error:

Re: Static haproxy/openssl build error

2013-09-29 Thread Apollon Oikonomopoulos
Hi all, On 13:35 Sun 29 Sep , Willy Tarreau wrote: > Yes, and I have fixed this two weeks ago. The problem is that the > "ADDINC" > and "ADDLIB" variables are not suited for passing single-component paths > since they suffix everything. Look what it results in your build log : > > -lcrypt

Re: Static haproxy/openssl build error

2013-09-29 Thread Willy Tarreau
Hi Lukas, On Sun, Sep 29, 2013 at 02:41:11PM +0200, Lukas Tribus wrote: > Hi! >   > (sorry for duplicates, previous mail hit the wire to fast...) hehe :-) > > Yes, and I have fixed this two weeks ago. The problem is that the "ADDINC" > > and "ADDLIB" variables are not suited for passing single-c

RE: Static haproxy/openssl build error

2013-09-29 Thread Lukas Tribus
Hi!   (sorry for duplicates, previous mail hit the wire to fast...) > Yes, and I have fixed this two weeks ago. The problem is that the "ADDINC" > and "ADDLIB" variables are not suited for passing single-component paths > since they suffix everything. Look what it results in your build log : > >

RE: Static haproxy/openssl build error

2013-09-29 Thread Lukas Tribus
Hi! > Yes, and I have fixed this two weeks ago. The problem is that the "ADDINC" > and "ADDLIB" variables are not suited for passing single-component paths > since they suffix everything. Look what it results in your build log : > > -lcrypt -lssl -lcrypto -L/usr/lib -Wl,-Bstatic -lpcreposix \ > -

Re: Static haproxy/openssl build error

2013-09-29 Thread Willy Tarreau
Hi Julien, On Fri, Sep 27, 2013 at 11:08:11AM +0200, Julien Vehent wrote: > Hi everyone, > > I'm attempting to build HEAD with a statically compiled openssl, and get > the following error: > > $ make TARGET=linux2628 USE_STATIC_PCRE=1 USE_OPENSSL=1 > ADDINC=-I/tmp/staticlibssl/include ADDLIB="

RE: Static haproxy/openssl build error

2013-09-29 Thread Lukas Tribus
Hi Apollon, hi Julien, > HAProxy's build system does not currently support static linking > against openssl. Well the linker should detect that you are pointing the path of a static-only build of openssl and link it accordingly (no libcrypto.so there, just a static libcrypto.a file). > I bet

Re: Static haproxy/openssl build error

2013-09-28 Thread Apollon Oikonomopoulos
Hi Julien, On 10:35 Sat 28 Sep , Julien Vehent wrote: > On 2013-09-27 21:17, Lukas Tribus wrote: > >Try stable OpenSSL 1.0.1e, that should work. > > I did, and I get the exact same error. > The problem happens on Debian Squeeze. My laptop on Fedora 19 > doesn't have the issue. > HAProxy's b

RE: Static haproxy/openssl build error

2013-09-28 Thread Julien Vehent
On 2013-09-27 21:17, Lukas Tribus wrote: Hi Julien, I'm attempting to build HEAD with a statically compiled openssl, and get the following error: [...] $ /tmp/staticlibssl/bin/openssl version OpenSSL 1.1.0-dev xx XXX Any idea what could be missing here? Try stable OpenSSL 1.0.1e, that

RE: Static haproxy/openssl build error

2013-09-27 Thread Lukas Tribus
Hi Julien, > I'm attempting to build HEAD with a statically compiled openssl, and get > the following error: > [...] > $ /tmp/staticlibssl/bin/openssl version > OpenSSL 1.1.0-dev xx XXX > > Any idea what could be missing here? Try stable OpenSSL 1.0.1e, that should work. Regards, Lukas

Static haproxy/openssl build error

2013-09-27 Thread Julien Vehent
Hi everyone, I'm attempting to build HEAD with a statically compiled openssl, and get the following error: $ make TARGET=linux2628 USE_STATIC_PCRE=1 USE_OPENSSL=1 ADDINC=-I/tmp/staticlibssl/include ADDLIB="-L/tmp/staticlibssl/lib -ldl" [] gcc -g -o haproxy src/haproxy.o src/sessionhash.