Public bug reported:
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*/)
{
caffe::SolverParameter solver_param;
return 0;
}
And try to compile it:
$ c++ -DCPU_ONLY -I/usr/include/opencv4 -o test.o -c test.cpp
I have 155 errors in compile logs. All errors in caffe.pb.h file about Protobuf
API:
/usr/include/caffe/proto/caffe.pb.h:49:51: error: ‘AuxiliaryParseTableField’ in
namespace ‘google::protobuf::internal’ does not name a type; did you mean
‘AuxillaryParseTableField’?
49 | static const
::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
|
^~~~~~~~~~~~~~~~~~~~~~~~
|
AuxillaryParseTableField
/usr/include/caffe/proto/caffe.pb.h:336:30: error: ‘ConstStringParam’ is not a
member of ‘google::protobuf’
336 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name,
FillerParameter_VarianceNorm* value) {
| ^~~~~~~~~~~~~~~~
/usr/include/caffe/proto/caffe.pb.h:336:81: error: expected primary-expression
before ‘*’ token
336 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name,
FillerParameter_VarianceNorm* value) {
|
^
...
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://ua.archive.ubuntu.com/ubuntu impish/main amd64 Packages
100 /var/lib/dpkg/status
What should I do to compile my test.cpp?
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: caffe (not installed)
ProcVersionSignature: Ubuntu 5.13.0-25.26-generic 5.13.19
Uname: Linux 5.13.0-25-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: unknown
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-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
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)
** Affects: caffe (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug impish
** Attachment added: "Compilation log"
https://bugs.launchpad.net/bugs/1960075/+attachment/5559215/+files/compile.log
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1960075
Title:
Minimal project compilation error
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/caffe/+bug/1960075/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs