Commit 50f6a557 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

component/trafficserver: build Lua plugin.

parent c3879c9f
Pipeline #18453 failed with stage
# LuaJIT is a Just-In-Time Compiler (JIT) for the Lua programming language.
# https://luajit.org/luajit.html
[buildout]
parts = luajit
[luajit]
recipe = slapos.recipe.cmmi
url = https://luajit.org/download/LuaJIT-2.0.5.tar.gz
md5sum = 48353202cbcacab84ee41a5a70ea0a2c
configure-command = true
# pass dummy LDCONFIG to skip needless calling of ldconfig by non-root user
make-options =
DPREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
LDCONFIG=/bin/echo
......@@ -3,6 +3,7 @@ extends =
../defaults.cfg
../libtool/buildout.cfg
../libxml2/buildout.cfg
../luajit/buildout.cfg
../make/buildout.cfg
../ncurses/buildout.cfg
../openssl/buildout.cfg
......@@ -32,6 +33,7 @@ configure-options =
--with-pcre=${pcre:location}
--with-ncurses=${ncurses:location}
--with-tcl=${tcl:location}/lib/
--with-luajit=${luajit:location}
--with-lzma=${xz-utils:location}
--with-zlib=${zlib:location}
--disable-curl
......@@ -40,7 +42,7 @@ configure-options =
--disable-posix-cap
environment =
PATH=${libtool:location}/bin:${make:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -lm
make-target =
check
......
  • @kazuhiko it seems tests are not happy because trafficserver, which is shared references luajit, which is not shared, this is the :

    RuntimeError: Software hash present in signature /srv/slapgrid/slappart0/srv/testnode/cvt/inst/test0-0/tmp/shared/trafficserver/5d4eae3ceabc0d768ae1d5022fb4b8bb/.slapos.recipe.cmmi.signature

    that we can see here.

    On other tests (for exemple this one), there's also a

    RuntimeError: /srv/slapgrid/slappart0/srv/testnode/cvt/inst/test0-0/tmp/shared/trafficserver/5d4eae3ceabc0d768ae1d5022fb4b8bb/libexec/trafficserver/tslua.so has some not found libraries:
    	libluajit-5.1.so.2 => not found

    I guess this is because rpath is missing, I did not try, but something like this could fix:

    diff --git a/component/luajit/buildout.cfg b/component/luajit/buildout.cfg
    index 9a8ee4c09..2395a3e3b 100644
    --- a/component/luajit/buildout.cfg
    +++ b/component/luajit/buildout.cfg
    @@ -6,6 +6,7 @@ parts = luajit
     
     [luajit]
     recipe = slapos.recipe.cmmi
    +shared = true
     url = https://luajit.org/download/LuaJIT-2.0.5.tar.gz
     md5sum = 48353202cbcacab84ee41a5a70ea0a2c
     configure-command = true
    diff --git a/component/trafficserver/buildout.cfg b/component/trafficserver/buildout.cfg
    index c75eb9779..8eb199fe9 100644
    --- a/component/trafficserver/buildout.cfg
    +++ b/component/trafficserver/buildout.cfg
    @@ -42,7 +42,7 @@ configure-options =
       --disable-posix-cap
     environment =
       PATH=${libtool:location}/bin:${make:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
    -  LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -lm
    +  LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${luajit:location}/lib  -lm
     
     make-target =
       check
  • mentioned in commit 6a9beec3

    Toggle commit list
  • The patch I suggested was not enough, I needed tests for another task, so I applied the fix on master to repair 6a9beec3 I hope that's OK

  • @jerome oh I didn't notice, thanks for your fix !

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment