> On 14 Jan 2020, at 13:53, Willy Tarreau <w...@1wt.eu> wrote:
> 
> On Tue, Jan 14, 2020 at 01:46:55PM +0100, Thierry Fournier wrote:
>> Hi, It have two default path in the library path:
>> 
>> - path for lua libraries
>> - cpath for loading lua C libraries.
>> 
>> In some cases, haproxy requires C libraries like cjson which manipulates 
>> json.
>> 
>> I'm not sure, but it seems that the patch "lua-prepend-path" doesn't include 
>> the cpath.
> 
> Yes it does now with an optional "cpath" keyword on the line. Maybe it's
> not the most convenient way and you'd prefer separate keywords ?


Sorry, I don’t see the keyword "cpath". Maybe a lua-prepend-cpath
would be clearer than a final keyword ? I don’t known. Maybe the
cpath word would be specified at the start in place of the end ?
The most important it was the cpath was taken in account !

Just a little remark, I hope without consequences. Lua C libraries
are .so and not .lua:

   lua-prepend-path /etc/haproxy/lua-cmodules/?.lua cpath

becomes:

   lua-prepend-path /etc/haproxy/lua-cmodules/?.so cpath




Idea 1:

   lua-prepend-path path /etc/haproxy/lua-modules/?.lua
   lua-prepend-path cpath /etc/haproxy/lua-cmodules/?.lua

Idea 2:

   lua-prepend-path /etc/haproxy/lua-modules/?.lua
   lua-prepend-path cpath /etc/haproxy/lua-cmodules/?.lua

Idea 3:

   lua-prepend-path /etc/haproxy/lua-modules/?.lua
   lua-prepend-cpath /etc/haproxy/lua-cmodules/?.lua

Thierry

Reply via email to