Skip to content
This repository has been archived by the owner on Jan 20, 2020. It is now read-only.

error building tinyflow #17

Open
kgupta15 opened this issue May 22, 2017 · 3 comments
Open

error building tinyflow #17

kgupta15 opened this issue May 22, 2017 · 3 comments

Comments

@kgupta15
Copy link

kgupta15 commented May 22, 2017

Here's the error I am getting :

g++ -std=c++11 -std=c++11 -Wall -O2 -msse2  -Wno-unknown-pragmas -funroll-loops -fPIC -Iinclude -Idmlc-core/include -I/home/kapil/Documents/my-nn-library/tinyflow/nnvm/include -I/home/kapil/torch/install/include -I/home/kapil/torch/install/include/TH -I/home/kapil/torch/install/include/THC/ -MM -MT build/src/session.o src/session.cc >build/src/session.d
g++ -std=c++11 -c -std=c++11 -Wall -O2 -msse2  -Wno-unknown-pragmas -funroll-loops -fPIC -Iinclude -Idmlc-core/include -I/home/kapil/Documents/my-nn-library/tinyflow/nnvm/include -I/home/kapil/torch/install/include -I/home/kapil/torch/install/include/TH -I/home/kapil/torch/install/include/THC/ -c src/session.cc -o build/src/session.o
In file included from src/./torch/torch_util.h:10:0,
                 from src/session.cc:11:
dmlc-core/include/dmlc/lua.h: In member function ‘void dmlc::LuaRef::SetByPopStack_(dmlc::LuaState*)’:
dmlc-core/include/dmlc/lua.h:482:40: error: ‘lua_ref’ was not declared in this scope
     ref_ = lua_ref(L, LUA_REGISTRYINDEX);
                                        ^
In file included from dmlc-core/include/dmlc/lua.h:34:0,
                 from src/./torch/torch_util.h:10,
                 from src/session.cc:11:
/home/kapil/torch/install/include/luaT.h: At global scope:
/home/kapil/torch/install/include/luaT.h:41:12: warning: ‘int luaL_typerror(lua_State*, int, const char*)’ defined but not used [-Wunused-function]
 static int luaL_typerror(lua_State *L, int narg, const char *tname)
            ^
Makefile:55: recipe for target 'build/src/session.o' failed
make: *** [build/src/session.o] Error 1

The error points to dmlc-core code in here. I tried to compile dmlc-core using cmake and it builds successfully. I dont know why the tinyflow makefile is giving the error.

@BoyuanJiang
Copy link

@daemonslayer same problem, have you solved it?

@lijiansong
Copy link

you can fix it by change dmlc-core/include/dmlc/lua.h:482:

ref_ = lua_ref(L, LUA_REGISTRYINDEX);

into

ref_ = luaL_ref(L, LUA_REGISTRYINDEX);

@lijiansong
Copy link

It will be better to append origin environment variable at the end,

export PYTHONPATH=${PYTHONPATH}:/path/to/tinyflow/python:/path/to/tinyflow/nnvm/python

into

export PYTHONPATH=/path/to/tinyflow/python:/path/to/tinyflow/nnvm/python:${PYTHONPATH}

because if you install TVM before, tinyflow's nnvm lib will be conflict TVM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants