On Tue, 17 Mar 2015 08:38:23 +0100 Baptiste <[email protected]> wrote:
> On Tue, Mar 17, 2015 at 1:51 AM, Joe Williams <[email protected]> wrote: > > List, > > > > I seem to be running into issues building haproxy with lua support using > > HEAD. Any thoughts? > > > > joe@ubuntu:~/haproxy$ make DEBUG=-ggdb CFLAGS=-O0 TARGET=linux2628 > > USE_LUA=yes LUA_LIB=/opt/lua53/lib/ LUA_INC=/opt/lua53/include/ LDFLAGS=-ldl > > <snip> > > /opt/lua53/lib//liblua.a(loadlib.o): In function `lookforfunc': > > loadlib.c:(.text+0x502): undefined reference to `dlsym' > > loadlib.c:(.text+0x549): undefined reference to `dlerror' > > loadlib.c:(.text+0x576): undefined reference to `dlopen' > > loadlib.c:(.text+0x5ed): undefined reference to `dlerror' > > /opt/lua53/lib//liblua.a(loadlib.o): In function `gctm': > > loadlib.c:(.text+0x781): undefined reference to `dlclose' > > collect2: error: ld returned 1 exit status > > make: *** [haproxy] Error 1 > > > > joe@ubuntu:~/haproxy$ /opt/lua53/bin/lua -v > > Lua 5.3.0 Copyright (C) 1994-2015 Lua.org, PUC-Rio > > > > Thanks! > > > > -Joe Thank you, In fact I build with the SSL activated, and the libssl is already linked with thz dl library, so I don't sew this compilation error. It is fixed, the patch is in attachment. Thierry > > Hi Joe, > > You're missing an "LDFLAGS=-ldl". > More information on this blog page, including some quickstart code example: > http://blog.haproxy.com/2015/03/12/haproxy-1-6-dev1-and-lua/ > > Baptiste >
>From a1d13d7f72f3dd1f3b39cf43ec27e9f67797e650 Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER <[email protected]> Date: Tue, 17 Mar 2015 11:14:26 +0100 Subject: [PATCH 03/11] BUILD: lua: it miss the '-ldl' directive The Lua library requires the 'dl' library. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a12e4c9..e403239 100644 --- a/Makefile +++ b/Makefile @@ -575,7 +575,7 @@ $(error unable to automatically detect the Lua library name, you can enforce its endif endif -OPTIONS_LDFLAGS += $(LUA_LD_FLAGS) -l$(LUA_LIB_NAME) -lm +OPTIONS_LDFLAGS += $(LUA_LD_FLAGS) -l$(LUA_LIB_NAME) -lm -ldl OPTIONS_OBJS += src/hlua.o endif -- 1.7.10.4

