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

make convert_imageset_and_flow.cpp failed #28

Closed
whrljt opened this issue Jun 7, 2017 · 13 comments
Closed

make convert_imageset_and_flow.cpp failed #28

whrljt opened this issue Jun 7, 2017 · 13 comments

Comments

@whrljt
Copy link

whrljt commented Jun 7, 2017

In file included from ./include/thirdparty/CImg/CImg.h:361:0,
from tools/convert_imageset_and_flow.cpp:38:
tools/convert_imageset_and_flow.cpp: In function ‘int main(int, char**)’:
tools/convert_imageset_and_flow.cpp:373:14: error: expected unqualified-id before ‘int’
leveldb::Status status = leveldb::DB::Open(options, argv[arg_offset+2], &db);
^
In file included from tools/convert_imageset_and_flow.cpp:18:0:
tools/convert_imageset_and_flow.cpp:374:11: error: ‘status’ was not declared in this scope
CHECK(status.ok()) << "Failed to open leveldb " << argv[arg_offset+2];
^
tools/convert_imageset_and_flow.cpp:374:11: note: suggested alternatives:
In file included from /usr/include/boost/filesystem.hpp:17:0,
from ./include/caffe/util/io.hpp:4,
from tools/convert_imageset_and_flow.cpp:36:
/usr/include/boost/filesystem/operations.hpp:396:15: note: ‘boost::filesystem::status’
file_status status(const path& p, system::error_code& ec)
^
/usr/include/boost/filesystem/operations.hpp:320:17: note: ‘boost::filesystem::detail::status’
file_status status(const path&p, system::error_code* ec=0);
^
Makefile:581: recipe for target '.build_release/tools/convert_imageset_and_flow.o' failed
make: *** [.build_release/tools/convert_imageset_and_flow.o] Error 1
make: *** 正在等待未完成的任务....


I have tried to compile this code in ubuntu 16.04 with cuda 8.0 and gcc 5, this error happened, and I have no idea how to solve it? please help me , thank you!

@nikolausmayer
Copy link
Contributor

Might be an issue with leveldb in which case running a system update might help.
What's the output of apt-cache policy libleveldb-dev | grep "Installed"?

@whrljt
Copy link
Author

whrljt commented Jun 8, 2017

Thank you for replying. I run 'apt-cache policy libleveldb-dev | grep "Installed"' in my terminal, and the output of it is nothing. Is there something wrong?

@nikolausmayer
Copy link
Contributor

Ah sorry, you might be on another OS language. Just run apt-cache policy libleveldb-dev.

@whrljt
Copy link
Author

whrljt commented Jun 8, 2017

libleveldb-dev:
已安装:1.18-5
候选: 1.18-5
版本列表:
*** 1.18-5 500
500 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status

@nikolausmayer
Copy link
Contributor

Hm, that's fine. Can you please run VERBOSE=1 make tools and post the entire output?

@whrljt
Copy link
Author

whrljt commented Jun 8, 2017

CXX tools/compute_image_mean.cpp
tools/compute_image_mean.cpp:11:34: fatal error: caffe/proto/caffe.pb.h: 没有那个文件或目录
compilation terminated.
Makefile:581: recipe for target '.build_release/tools/compute_image_mean.o' failed
make: *** [.build_release/tools/compute_image_mean.o] Error 1

Thank you! And '没有那个文件或目录' means 'There is no such file or directory'.

@nikolausmayer
Copy link
Contributor

Thanks for the translation ;)
This looks like the initial compilation of caffe.pb.h had already failed. Does make all succeed?

@whrljt
Copy link
Author

whrljt commented Jun 8, 2017

CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX tools/compute_image_mean.cpp

These two all can be compiled successfully. It seem just convert_imageset_and_flow.cpp and convert_imageset_and_disparity.cpp will fail with the same issue.

@whrljt
Copy link
Author

whrljt commented Jun 8, 2017

And I have install another caffe before, is it an influence?

@nikolausmayer
Copy link
Contributor

If your environment variables and paths do not include anything from your previous Caffe installation, it should not be a problem. But I am a little confused.
Your first error message suggests a leveldb error, but your installed version is ok. Are you using a different (local) leveldb installation?
Your second message looks like caffe.pb.h is not available. But your last message show that it builds without a problem (and compute_image_mean builds as well which depends on caffe.pb.h).

In any case, you do not need the tools folder unless you want to create your own datasets for training or testing. Maybe leaving that out is an option for you?

@whrljt
Copy link
Author

whrljt commented Jun 8, 2017

Sorry for don't say it clearly. The first leveldb error is the result of running 'make all' , and compute_image_mean can builds without problem. The caffe.pb.h error is the result of running 'VERBOSE=1 make tools', I also don't why this two kinds of error occurred.
Need I try to uninstall leveldb and install is again?
And I will try to remove this two cpp, thank you for your comments very much!

@nikolausmayer
Copy link
Contributor

I also don't really understand why make tools should generate a different error, since it is already in make -j5 all tools pycaffe which the README recommends.

I don't think you need to reinstall leveldb (but you can try it, of course!). Your installed version is ok, it's also the one used in https://github.com/lmb-freiburg/flownet2-docker. But if you have another leveldb installation somewhere, that might interfere.

Sorry, but I can't really help any more here.

@whrljt
Copy link
Author

whrljt commented Jun 8, 2017

You have helped me a lot. Thank you very much.

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

No branches or pull requests

3 participants