Giter VIP home page Giter VIP logo

ts_mruby's Issues

ts_mruby build failed

My environment is Ubuntu 14.04 64bit.

FIrst, build trafficserver.

git clone https://github.com/apache/trafficserver.git
cd trafficserver
autoreconf -if
./configure --enable-cppapi --prefix=/usr/local/trafficserver-git-master
make
sudo make install

but, not found /usr/local/trafficserver-git-master/bin/tsxs. Then,

./configure --prefix=/usr/local/trafficserver-git-master
make
sudo make install

installed bin/tsxs and related binary.
Then, build ts_mruby after downloading mruby.

cd ts_mruby
autoreconf -if
./configure --with-ts-prefix-root=/usr/local/trafficserver-git-master/ --with-mruby-root=../mruby/
make build_mruby
make

But, a below error occurred.

$ make
/usr/local/trafficserver-git-master/bin/tsxs -I/usr/local/trafficserver-git-master/include -I../mruby/include -L/usr/local/trafficserver-git-master/lib/ts -L/usr/local/trafficserver-git-master/lib -L/home/matsumotory/DEV/mruby/build/host/lib -latscppapi -lmruby -lm -lreadline src/ts_mruby_*.cpp src/ts_mruby.cpp
  compiling src/ts_mruby_core.cpp -> src/ts_mruby_core.lo
In file included from /usr/local/trafficserver-git-master/include/atscppapi/Transaction.h:30:0,
                 from src/ts_mruby_core.cpp:13:
/usr/local/trafficserver-git-master/include/atscppapi/shared_ptr.h:28:26: fatal error: ink_autoconf.h: No such file or directory
 #include "ink_autoconf.h"
                          ^
compilation terminated.
tsxs: compilation failed: c++ -I/usr/local/trafficserver-git-master/include -I/usr/local/trafficserver-git-master/include -I../mruby/include -std=c++11 -g -pipe -Wall -O3 -feliminate-unused-debug-symbols -fno-strict-aliasing -Wno-invalid-offsetof -mcx16 -fpic -c src/ts_mruby_core.cpp -o src/ts_mruby_core.lo
make: *** [ts_mruby.la] Error 1

configure failed

Hi, @syucream

I try to install ts_mruby, but configure script failed.

$ autoreconf -if
$ ./configure --with-ts-prefix-root=/usr/local/trafficserver-git --with-mruby-root=../mruby
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: creating ./config.status
config.status: error: cannot find input file: `Makefile.in'

Did I misunderstood the install process?

Recompile mruby scripts when configuration reloaded.

Current implementation compiles mruby scripts when ts_mruby plugin is initialized.
However, To improve operations of ATS, it should enable to recompile when configuration reloaded. (For example, when traffic_line -x is executed.)

  • Check resources should be re-release/initialize when reloading
  • Implement re-release/initialize logic
  • Try $ traffic_ctl config reload

redesign around hooks

Current impl can support only PRE_REMAP hook or doRemap(), so ts_mruby can't support some methods(ATS::Headers_out#[], etc). In this issue I rethink about hooks to support those.

  • Create some designs.
  • Enable to separate init functions considering hooks.
  • Implement an example script.

records.config like interface for ATS::Records

From #32

records = ATS::Records.new

# getter
records.proxy.config.url_remap.pristine_host_hdr #=> 0
records.url_remap.pristine_host_hdr #=> 0
# setter as #= method
records.proxy.config.url_remap.pristine_host_hdr = 1
records.url_remap.pristine_host_hdr = 1
records = ATS::Records.new
records.set do |proxy|
  # records.config like accessor!
  proxy.config.url_remap.pristine_host_hdr = 1
end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.