error installing torch on centos

90 views
Skip to first unread message

Martin Delgado

unread,
Sep 27, 2016, 1:35:21 PM9/27/16
to torch7
Hi everyone,

I would like to ask you if you could help me with this error that I'm getting when I try to install torch on centos 6.6

I don't have root access and most of the dependencies I have installed them by compiling from source in my home directory.

I have also installed readline from source in my home directory and I've set the lib and include directories to env variables such as INCLUDE and LD_LIBRARY_PATH.

The error that I'm getting is the following one:

gcc -O2 -fPIC -I/home/user/torch/install/include -c utils.c -o utils.o
gcc -shared -o treplutils.so -L/home/user/torch/install/lib utils.o
gcc -O2 -fPIC -I/home/user/torch/install/include -c readline.c -o readline.o
readline.c:7:31: error: readline/readline.h: No such file or directory
readline.c:8:30: error: readline/history.h: No such file or directory
readline.c: In function ‘f_setup’:
readline.c:259: error: ‘rl_readline_name’ undeclared (first use in this function)
readline.c:259: error: (Each undeclared identifier is reported only once
readline.c:259: error: for each function it appears in.)
readline.c:261: error: ‘rl_completer_word_break_characters’ undeclared (first use in this function)
readline.c:263: error: ‘rl_completer_quote_characters’ undeclared (first use in this function)
readline.c:265: error: ‘rl_completion_append_character’ undeclared (first use in this function)
readline.c:267: error: ‘rl_attempted_completion_function’ undeclared (first use in this function)
readline.c: In function ‘f_readline’:
readline.c:276: warning: initialization makes pointer from integer without a cast

Error: Build error: Failed compiling object readline.o

Can anyone help out?

Adelta

unread,
Jan 4, 2017, 9:39:43 PM1/4/17
to torch7
Were you able to solve this issue? I am having the same problem. I too do not have root access so unable to install libreadline-dev globally. I downloaded the libreadline-dev rpm package and installed locally, but unable to point the compiler to it.

Adelta

unread,
Jan 5, 2017, 2:44:25 PM1/5/17
to torch7
Finally solved the problem. In case anyone else faces this problem this is what I did.
1) I compiled from source and installed readline locally. (using ./configure --prefix=/path_to_my_local_dir, make, make install) 
2) Set GCC library paths so it cant find them. 
export LIBRARY_PATH = /path_to_my_local_dir/lib:$LIBRARY_PATH
export CPATH = /path_to_my_local_dir/include:$CPATH 

My system is CentOS 7.2 and gcc 4.8.5 
Reply all
Reply to author
Forward
0 new messages