Skip to content

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.

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