-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mumble_proto.pro: fix protoc invocation for out-of-tree builds #2830
mumble_proto.pro: fix protoc invocation for out-of-tree builds #2830
Conversation
I'm curious... can you paste the full command that protoc invokes, before, and after this change? I wonder why it's necessary when cross building? |
Before: The error didn't appear when cross building, but when using Qt Creator. |
Please add a note to the commit summary explaining that this fixes the problem for out-of-tree builds using Qt Creator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs clarification in commit message and summary.
mumble_proto.pro: fix protoc invocation for out-of-tree builds.
This fixes the invocation of protoc in mumble_proto.pro to be compatible with out-of-tree builds. For example, this is how Qt Creator builds Mumble by default.
It fixes the error:
<insert the error like you have now>
ebcb292
to
f61833b
Compare
Please explain why it fails for out-of-tree builds. You don't need the invocation in there -- that was just for me, because I was confused as to how this was related to cross-compiling. (And, as it turned out -- it wasn't). Something like: mumble_proto.pro: fix protoc invocation for out-of-tree builds This fixes the invocation of protoc in mumble_proto.pro to be compatible with out-of-tree builds. For example, this is how Qt Creator builds Mumble by default. For out-of-tree builds, our include path flags to protoc aren't sufficient. This is because protoc requires that the .proto file it is building is part of the include path. To fix this for out-of-tree builds, we add the absolute path to the directory that contains the .proto file. This allows protoc to work for out-of-tree builds. For reference, the error we got (before this commit) from protoc in out-of-tree builds was: |
This fixes the invocation of protoc in mumble_proto.pro to be compatible with out-of-tree builds. For example, this is how Qt Creator builds Mumble by default. For out-of-tree builds, our include path flags to protoc aren't sufficient. This is because protoc requires that the .proto file it is building is part of the include path. To fix this for out-of-tree builds, we add the absolute path to the directory that contains the .proto file. This allows protoc to work for out-of-tree builds. For reference, the error we got (before this commit) from protoc in out-of-tree builds was: "File does not reside within any path specified using --proto_path (or -I). You must specify a --proto_path which encompasses this file. Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think)."
f61833b
to
00f81cb
Compare
This fixes the error: