protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.92k stars 15.52k forks source link

can not find some header when complie with proto3 installed in my own path. #176

Closed liwei-ch closed 9 years ago

liwei-ch commented 9 years ago

protobuf3 is installed in my path: /home/s/safe/protobuf3/ when i complie my project, find some files lost:

/home/s/safe/protobuf3/include/google/protobuf/map.h:35:40: error: google/protobuf/stubs/hash.h: No such file or directory
/home/s/safe/protobuf3/include/google/protobuf/map_field_inl.h:36:46: error: google/protobuf/stubs/shared_ptr.h: No such file or directory
/home/s/safe/protobuf3/src/google/protobuf/stubs/hash.h:40:20: error: config.h: No such file or directory
xfxyjwf commented 9 years ago

How did you install protobuf3?

liwei-ch commented 9 years ago
target=/home/s/safe/protobuf3
sudo -u cloud ./autogen.sh
sudo -u cloud ./configure --prefix=$target --oldincludedir=/home/s/safe/protobuf3/include
sudo -u cloud make
sudo -u cloud make check
sudo -u cloud make install
liwei-ch commented 9 years ago

to make it pass, i have to copy these files to target path.

liujisi commented 9 years ago

This has been fixed in the v3.0.0-alpha-2 release

AndreMiras commented 7 years ago

FWIW, I also had the issue on Gentoo with =dev-libs/protobuf-2.6.1-r3, and installing =dev-libs/protobuf-3.0.0_beta3_p1 solved it. Thanks @pherl!