You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have package msys/protobuf-devel 3.7.1-1 installed and encountered some issues trying to use protoc within it.
I don't encounter this problem when using the official 3.7.1-1 release.
This may also be an upstream issue, related to pre-processor directives that are set when building with mingw rather than MSVC. (didn't check fully but their source implies it's mingw aware)
There are later releases than 3.7.1 but I have not tried to build them within mingw to see if they still have the issue. (I don't encounter it on later official releases)
Specifically, I think this centres around The Unix list seperator being :, so when you pass in Windows paths that contain drive-spec components, it causes problems. C:\users\wherever is parsed as [C, \users\wherever] since the proto_path parameter accepts a delimited list. On Windows as =path1;path2 and *nix as =path1:path2.
The text was updated successfully, but these errors were encountered:
@djdv if you about MSYS version of protobuf then there are no issue because MSYS is like Cygwin and works with Unix paths. To work with Windows path you must pass it in form C:/my/path
Thanks Alexey.
I have tried replacing the \ with / but it has no effect. protoc --proto_path="C:/Users/Dominic Della Valle/Projects/Go/src" --proto_path="." --gogofast_out=. rpc.proto
Using the Cygwin style path, it succeeds. protoc --proto_path="/c/Users/Dominic Della Valle/Projects/Go/src" --proto_path="." --gogofast_out=. rpc.proto
I am a little confused about this because absolute Windows paths seem to work in all the other utilities from MSYS2 that I use. Even outside of MSYS2 shell (in cmd, invoked from make, etc.).
If Unix style is required, that is fine and this can be closed if it seems correct to you.
In our own make file, we will have to find out which version of protoc the user has installed and provide the right conventions accordingly.
If the MSYS protoc then Cygwin paths with : separator.
if mainline protoc then Windows paths with ; separator.
msys2-protoc --proto_path="/c/Users/Dominic Della Valle/Projects/Go/src:." --gogofast_out=. rpc.proto
and mainline-protoc --proto_path="C:\Users\Dominic Della Valle\Projects\Go\src;." --gogofast_out=. rpc.proto
I have package
msys/protobuf-devel 3.7.1-1
installed and encountered some issues trying to useprotoc
within it.I don't encounter this problem when using the official 3.7.1-1 release.
This may also be an upstream issue, related to pre-processor directives that are set when building with mingw rather than MSVC. (didn't check fully but their source implies it's mingw aware)
There are later releases than 3.7.1 but I have not tried to build them within mingw to see if they still have the issue. (I don't encounter it on later official releases)
Specifically, I think this centres around The Unix list seperator being
:
, so when you pass in Windows paths that contain drive-spec components, it causes problems.C:\users\wherever
is parsed as [C
,\users\wherever
] since theproto_path
parameter accepts a delimited list. On Windows as=path1;path2
and *nix as=path1:path2
.The text was updated successfully, but these errors were encountered: