google/cld3

fatal error C1083: Cannot open include file: 'google/protobuf/port_def.inc': No such file or directory

Opened this issue · 6 comments

I am having the following error when runnign >pip install gcld3 :

EROOR:

\AppData\Local\Temp\pip-install-7_v9ujss\gcld3_9a116eb59c8049b5a46f1c8cf8ca323d\src\cld_3/protos/feature_extractor.pb.h(10): fatal error C1083: Cannot open include file: 'google/protobuf/port_def.inc': No such file
or directory

System information:

  • Windows 10
  • Python 3.8
  • protobuf==3.12.2
  • libprotoc 3.12.1

Notes:
I also tried with Python 3.7 as well as using the most recent version of protobuf==3.15.8

I am having the same problem

Any update on this issue?

Same issue here

I had this error when trying to install gcld3 in a Ubuntu 20.04 image with protobuf 3.20.1 managed by conda. I fixed it by downgrading the protbuf version to 3.6.1

On my machine (WSL Ubuntu 22.04), I had no problem installing gcld3 with protobuf 3.12.4. My guess is that this issue is caused by some kind of mismatch of protobuf versions. This answer suggests that something regarding this file changed after version 3.7 of protobuf.

same issue

(windows, building with visual studio)

  1. you need protobuf of at least 3.20. You can install it with vcpkg
  2. locate port_def.inc inside protobuf installation
  3. set LIBPATH environment variable to a folder, where google/protobuf/port_def.inc located. (not port_def.inc itself)
  4. if you have issue with protobuf.lib... I guess it's a bug. There is no protobuf.lib file, there is libprotobuf.lib file. Copy libprotobuf.lib to protobuf.lib in the same folder.
    1. set LIB environment variable to a place, where protobuf.lib is located.