Hi Vincent,

Thank you for the patch. Just for (historical) information, a few time
ago, Joe Williams had reported an issue with -ldl and lua. I fixed it,
and a few time after the fix, Dmitry Sivachenko reported that the fix
breaks FreeBSD compilation (because FreeBSD doesn't have the libdl).

So, Willy put the "-ldl" flag implicit for Linux and it must be
activated or deactivated explicitly on other OS (with USE_DL)

Here the thread: http://marc.info/?l=haproxy&m=142655357716804&w=2

On my computer (debian), the classic command line build used on the
last dev version with your patch uses the -ldl two times:

   make TARGET=linux2628 USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 \
        USE_LUA=1 LUA_LIB=/opt/lua53/lib/ LUA_INC=/opt/lua53/include/
   [...]
   gcc -g -o haproxy [...*.o] -lcrypt  -lz -ldl  -lssl -lcrypto \
       -L/opt/lua-5.3.0/lib/ -llua -lm -ldl -L/usr/lib -lpcreposix \
       -lpcre 

I suppose that the double use of the -ldl is not required, so maybe
your patch can move the lines 548 to 551 (Makefile), to the good place,
after "OPTIONS_LDFLAGS  += ...", at line 608 ?

Thierry


On Thu, 16 Jul 2015 21:04:16 +0200
Vincent Bernat <ber...@luffy.cx> wrote:

>  ❦ 13 juillet 2015 19:58 +0200, Vincent Bernat <ber...@luffy.cx> :
> 
> > I suppose that either -ldl could be added to OPTIONS_LDFLAGS append,
> > like this is done for -lm. Or USE_DL section could be moved towards the
> > end. I think the first solution is better since libdl seems to be a
> > dependency of lua.
> >
> > Note that this is not an Ubuntu-specific but they enforce --as-needed by
> > default directly in the linker.
> 
> Here is a proposition. An alternative would be to move the ifneq
> ($(USE_DL),) section at the end of the Makefile.
> 




Reply via email to