Minimal project compilation error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
caffe (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I trying to compile simple project using Caffe library. But I received compile error.
I create simple cpp file (test.cpp):
#include <caffe/caffe.hpp>
int main(int /*argc*/, char ** /*argv*/)
{
return 0;
}
And try to compile it:
$ c++ -DCPU_ONLY -I/usr/
I have 155 errors in compile logs. All errors in caffe.pb.h file about Protobuf API:
/usr/include/
49 | static const ::PROTOBUF_
| ^~~~~~~
| AuxillaryParseT
/usr/include/
336 | ::PROTOBUF_
| ^~~~~~~~~~~~~~~~
/usr/include/
336 | ::PROTOBUF_
| ^
...
I have installed libprotobuf-dev version 3.12.4-1ubuntu3:
$ apt-cache policy libprotobuf-dev
libprotobuf-dev:
Installed: 3.12.4-1ubuntu3
Candidate: 3.12.4-1ubuntu3
Version table:
*** 3.12.4-1ubuntu3 500
500 http://
100 /var/lib/
What should I do to compile my test.cpp?
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: caffe (not installed)
ProcVersionSign
Uname: Linux 5.13.0-25-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Fri Feb 4 18:37:26 2022
InstallationDate: Installed on 2020-10-20 (472 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Beta amd64 (20200930)
ProcEnviron:
TERM=screen-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=uk_UA.UTF-8
SHELL=/bin/zsh
RebootRequiredPkgs: Error: path contained symlinks.
SourcePackage: caffe
UpgradeStatus: Upgraded to impish on 2021-10-08 (118 days ago)
I manually build the debian package in my environment. It works now.
Steps to fix it:
apt-get source libcaffe-dev 0.0+git20180821 .99bd997 dev_1.0. 0+git20180821. 99bd997- 8build2_ amd64.deb
sudo apt build-dep libcaffe-dev
cd caffe-1.
dpkg-buildpackage -tc
sudo dpkg -i ../libcaffe-