Closed hdmetor closed 8 years ago
If you have installed torch in ~/torch/install
, then fix the Makefile
and substitute all the occurrences of /usr/local
with $(HOME)/torch/install
.
Works great thanks. Had to add a couple of -L
and -I
for my brewed locations
@hdmetor, would you mind posting here the output of git diff origin/master
? So that others may benefit from your same issue.
Good idea
diff --git a/Video-decoder/Makefile b/Video-decoder/Makefile
index ad77677..da49dff 100644
--- a/Video-decoder/Makefile
+++ b/Video-decoder/Makefile
@@ -1,9 +1,9 @@
UNAME_S := $(shell uname -s)
UNAME_P := $(shell uname -p)
-INCLUDE = -I. -I/usr/local/include
+INCLUDE = -I. -I$(HOME)/torch/install/include -I/usr/local/Cellar/ffmpeg/2.8.2/include
LDFLAGS := -lavutil -lavformat -lavcodec
-LIBOPTS = -shared -L/usr/local/lib/lua/5.1 -L/usr/local/lib/
+LIBOPTS = -shared -L$(HOME)/torch/install/lib/lua/5.1 -L$(HOME)/torch/install/lib/ -L/usr/local/Cellar/ffmpeg/2.8.2/lib
CFLAGS = -O3 -fopenmp -c -fpic -Wall
CC = gcc
@@ -29,10 +29,10 @@ libvideo_decoder.so : video_decoder.o
install : libvideo_decoder.so
- sudo cp libvideo_decoder.so /usr/local/lib/lua/5.1/
+ sudo cp libvideo_decoder.so $(HOME)/torch/install/lib/lua/5.1/
uninstall :
- sudo rm /usr/local/lib/lua/5.1/libvideo_decoder.so
+ sudo rm $(HOME)/torch/install/lib/lua/5.1/libvideo_decoder.so
.PHONY : clean
clean :
@hdmetor, thank you.
Hi,
I am trying to install the
Video-decoder
package. I have cloned the repo into~/torch/pkg
and thenI got this error:
I am using a Mac and I have
brew install
ed the prerequisites.What am I doing incorrectly?