e-lab / torch-toolbox

A collection of snippets and libraries for Torch from e-Lab
https://engineering.purdue.edu/elab/
199 stars 64 forks source link

Make fails #5

Closed jrbtaylor closed 8 years ago

jrbtaylor commented 8 years ago

make produces the error:

gcc -O3 -fopenmp -c -fpic -Wall -I. -I/usr/local/include video_decoder.c video_decoder.c:13:18: fatal error: luaT.h: No such file or directory

include

              ^

compilation terminated. make: *\ [video_decoder.o] Error 1

jhjin commented 8 years ago

@jrbtaylor The old Makefile is updated via https://github.com/e-lab/torch-toolbox/commit/36151e011db9499e27a4d6c9c0a83f751ce104a4 . Could you try again if the problem still exist? Make sure to check your Torch is installed in $(HOME)/torch, otherwise manually change the environment variable TORCH in the Makefile.

jrbtaylor commented 8 years ago

Thanks. Make now works but I am getting an error on local video = assert(require("libvideo_decoder"))

.../data/jtaylor/Torch/install/share/lua/5.1/trepl/init.lua:363: error loading module 'libvideo_decoder' from file './libvideo_decoder.so': ./libvideo_decoder.so: undefined symbol: av_frame_alloc stack traceback: [C]: in function 'error' .../data/jtaylor/Torch/install/share/lua/5.1/trepl/init.lua:363: in function 'require' [string "local video = assert(require("libvideo_decode..."]:1: in main chunk [C]: in function 'xpcall' .../data/jtaylor/Torch/install/share/lua/5.1/trepl/init.lua:648: in function 'repl' ...ylor/Torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk [C]: at 0x00406670

jhjin commented 8 years ago

@jrbtaylor You may want to update your libav library because avcodec_alloc_frame is deprecated and replaced by av_frame_alloc. Or change all av_frame_allocs to avcodec_alloc_frame manually in the source and see if it works.