{"action":"created","issue":{"url":"https://api.github.com/repos/iovisor/bcc/issues/512","repository_url":"https://api.github.com/repos/iovisor/bcc","labels_url":"https://api.github.com/repos/iovisor/bcc/issues/512/labels{/name}","comments_url":"https://api.github.com/repos/iovisor/bcc/issues/512/comments","events_url":"https://api.github.com/repos/iovisor/bcc/issues/512/events","html_url":"https://github.com/iovisor/bcc/issues/512","id":151763658,"number":512,"title":"lua install steps","user":{"login":"brendangregg","id":1101211,"avatar_url":"https://avatars.githubusercontent.com/u/1101211?v=3","gravatar_id":"","url":"https://api.github.com/users/brendangregg","html_url":"https://github.com/brendangregg","followers_url":"https://api.github.com/users/brendangregg/followers","following_url":"https://api.github.com/users/brendangregg/following{/other_user}","gists_url":"https://api.github.com/users/brendangregg/gists{/gist_id}","starred_url":"https://api.github.com/users/brendangregg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendangregg/subscriptions","organizations_url":"https://api.github.com/users/brendangregg/orgs","repos_url":"https://api.github.com/users/brendangregg/repos","events_url":"https://api.github.com/users/brendangregg/events{/privacy}","received_events_url":"https://api.github.com/users/brendangregg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-28T23:13:10Z","updated_at":"2016-04-29T08:20:30Z","closed_at":null,"body":"Either in INSTALL.md, or in docs/lua.md and linked from INSTALL.md. ... Might want a docs/python.md as well at some point.\r\n\r\nI haven't figured it out yet. Here's what I get when I run an example:\r\n\r\n```\r\n/mnt/src/bcc/examples/lua# lua bashreadline.lua \r\nlua: bashreadline.lua:16: module 'ffi' not found:\r\n\tno field package.preload['ffi']\r\n\tno file './ffi.lua'\r\n\tno file '/usr/local/share/lua/5.1/ffi.lua'\r\n\tno file '/usr/local/share/lua/5.1/ffi/init.lua'\r\n\tno file '/usr/local/lib/lua/5.1/ffi.lua'\r\n\tno file '/usr/local/lib/lua/5.1/ffi/init.lua'\r\n\tno file '/usr/share/lua/5.1/ffi.lua'\r\n\tno file '/usr/share/lua/5.1/ffi/init.lua'\r\n\tno file './ffi.so'\r\n\tno file '/usr/local/lib/lua/5.1/ffi.so'\r\n\tno file '/usr/lib/x86_64-linux-gnu/lua/5.1/ffi.so'\r\n\tno file '/usr/lib/lua/5.1/ffi.so'\r\n\tno file '/usr/local/lib/lua/5.1/loadall.so'\r\nstack traceback:\r\n\t[C]: in function 'require'\r\n\tbashreadline.lua:16: in main chunk\r\n\t[C]: ?\r\n```\r\n\r\nOk, am I supposed to be running it from lua or luajit?:\r\n\r\n```\r\n/mnt/src/bcc/examples/lua# /mnt/LuaJIT-2.0.4/src/luajit bashreadline.lua \r\n/mnt/src/bcc/examples/lua#\r\n```\r\n\r\nI'm probably just doing it wrong. //CC @vmg "},"comment":{"url":"https://api.github.com/repos/iovisor/bcc/issues/comments/215656319","html_url":"https://github.com/iovisor/bcc/issues/512#issuecomment-215656319","issue_url":"https://api.github.com/repos/iovisor/bcc/issues/512","id":215656319,"user":{"login":"vmg","id":42793,"avatar_url":"https://avatars.githubusercontent.com/u/42793?v=3","gravatar_id":"","url":"https://api.github.com/users/vmg","html_url":"https://github.com/vmg","followers_url":"https://api.github.com/users/vmg/followers","following_url":"https://api.github.com/users/vmg/following{/other_user}","gists_url":"https://api.github.com/users/vmg/gists{/gist_id}","starred_url":"https://api.github.com/users/vmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmg/subscriptions","organizations_url":"https://api.github.com/users/vmg/orgs","repos_url":"https://api.github.com/users/vmg/repos","events_url":"https://api.github.com/users/vmg/events{/privacy}","received_events_url":"https://api.github.com/users/vmg/received_events","type":"User","site_admin":true},"created_at":"2016-04-29T08:20:30Z","updated_at":"2016-04-29T08:20:30Z","body":"Hi Brendan! Sorry about the lack of documentation!\r\n\r\nThe recommended way to run the lua probes is the `bcc-lua` tool. If CMake detects the `luajit` and `luajit-5.1-dev` packages (these are the Ubuntu names), it will create a standalone `bcc-lua` tool with no dependencies that run any of the Lua probes and has an user friendly interface.\r\n\r\nYou'll find it at `build/src/lua/bcc-lua` (again, if the Lua packages are available). This tool has 0 dependencies (so it can be deployed to servers) and will load `libbcc.so` dynamically at runtime (to let you switch between libbcc versions). Setting the `LIBBCC_SO_PATH` environment variable will let you point the tool at the version of the library you want to be using.\r\n\r\nFrom there it's smooth sailing. Try `./bcc-lua --help` to see the available options."}}