Hey,

Sorry for long response.

Your way much better.

I will prepare a patch ASAP.

-- 
wbr, Kirill


> On 4 Jan 2018, at 19:24, Thierry Fournier <[email protected]> wrote:
> 
> 
>> On 4 Jan 2018, at 15:16, Kirill A. Korinsky <[email protected]> wrote:
>> 
>> Honestly, I didn't.
>> 
>> If I right understand how export-dynamic works and how haproxy use 
>> integrated LUA, it shouldn't have any impact.
>> 
>> Honestly I see only one case when export-dynamic requests: when some 
>> application load haproxy over dlopen, and use some function from haproxy 
>> binary object.
>> 
>> I expect that it isn't true, is it?
> 
> 
> 
> Hi Kirill,
> 
> This option is usefull for load Lua extensions as .so files. Something
> like the openSSL Lua bindings is provided as .so Lua module. These kind
> of modules requires some Lua symbol which are not used by HAProxy, so
> without the option “ --export-dynamic” the load of these libraries fail
> with a message explaining that some symbols are missing.
> 
> Note: I’m not specialised in the compilation options, and maybe something
> following is wrong.
> 
> The flag --export-dynamic force all the symbols (of the Lua library) to
> be exported in the ELF binary. I guess that this option force the linker
> to embed also the unused symbols from the Lua library.
> 
> The man on my mac compiler shows the option “-export_dynamic” (with
> underscore in place of dash). Maybe a solution is to detect the platform
> and set the right option.
> 
> br,
> Thierry
> 
>> 
>> -- 
>> wbr, Kirill
>> 
>> 
>>> On 4 Jan 2018, at 01:10, Willy Tarreau <[email protected]> wrote:
>>> 
>>> Hi Kirill,
>>> 
>>> On Thu, Dec 28, 2017 at 04:13:38AM +0400, Kirill A. Korinsky wrote:
>>>> Last macOS hasn't support export-dynamic, just remove it
>>>> ---
>>>> Makefile | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>> 
>>>> diff --git a/Makefile b/Makefile
>>>> index 2acf5028..19234897 100644
>>>> --- a/Makefile
>>>> +++ b/Makefile
>>>> @@ -630,7 +630,7 @@ check_lua_inc = $(shell if [ -d $(2)$(1) ]; then echo 
>>>> $(2)$(1); fi;)
>>>> 
>>>> BUILD_OPTIONS   += $(call ignore_implicit,USE_LUA)
>>>> OPTIONS_CFLAGS  += -DUSE_LUA $(if $(LUA_INC),-I$(LUA_INC))
>>>> -LUA_LD_FLAGS := -Wl,--export-dynamic $(if $(LUA_LIB),-L$(LUA_LIB))
>>>> +LUA_LD_FLAGS := $(if $(LUA_LIB),-L$(LUA_LIB))
>>> 
>>> Hmmm how can you be sure you didn't break anything else ? I'm pretty
>>> sure that there was a reason for adding this --export-dynamic, maybe
>>> certain things will still not work on your platform, or others won't
>>> work at all. We need to run some checks before taking this one.
>>> 
>>> I'm CCing Thierry in case he reminds why we need this.
>>> 
>>> Regards,
>>> Willy
>> 
> 

Reply via email to