Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SINGA-270 Installation error: include/singa/proto/ is not in /usr/local/include #282

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xiezl
Copy link
Contributor

@xiezl xiezl commented Nov 21, 2016

Fix the installation path of include/singa/proto.

…al/include

Fix the installation path of include/singa/proto.
@moazreyad
Copy link
Contributor

I tried the PR. The directory /usr/local/include/singa/proto/ exists now, but there is a compile error when I try to compile test.cpp from #272 :

$ g++ ./test.cpp -l singa
In file included from /usr/local/include/singa/core/memory.h:24:0,
from /usr/local/include/singa/core/device.h:30,
from /usr/local/include/singa/core/tensor.h:27,
from /usr/local/include/singa/io/encoder.h:24,
from ./test.cpp:1:
/usr/local/include/singa/proto/core.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^~~~~
/usr/local/include/singa/proto/core.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^~~~~
/usr/local/include/singa/proto/core.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.
^~~~~
In file included from /usr/local/include/singa/io/encoder.h:25:0,
from ./test.cpp:1:
/usr/local/include/singa/proto/io.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
#error This file was generated by an older version of protoc which is
^~~~~
/usr/local/include/singa/proto/io.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
#error incompatible with your Protocol Buffer headers. Please
^~~~~
/usr/local/include/singa/proto/io.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
#error regenerate this file with a newer version of protoc.

…al/include

Fix dependent lib installation.
Add a new option to disable glog usage.
@xiezl
Copy link
Contributor Author

xiezl commented Nov 22, 2016

The problem is caused by using two different protobuf libs.
Please make sure you use the same version of protobuf for compiling your own code and the singa code.

@moazreyad
Copy link
Contributor

Ok. I think the problem is fixed now and the PR can be merged. Thank you.

@@ -49,6 +49,7 @@ OPTION(USE_CUDA "Use Cuda libs" OFF)
OPTION(USE_CUDNN "Use Cudnn libs" ON)
OPTION(USE_OPENCV "Use opencv" OFF)
OPTION(USE_LMDB "Use LMDB libs" OFF)
OPTION(USE_GLOG "Use glog libs" ON)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this one?
I think we agreed to remove it and use it if cmake can detect it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If cmake detects glog, then we link glog statically into libsinga.so.
In this way, we would not have the linking error when compiling user code.

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

Successfully merging this pull request may close these issues.

3 participants