The protobuf port 3.6.1 does not work properly.
Patches are incorrect, when building, the patch error logs this:
patch-x86-windows-static-0-err.log
Checking patch cmake/libprotoc.cmake...
Hunk #1 succeeded at 62 (offset -11 lines).
error: while searching for:
)?
add_executable(js_embed ${protobuf_source_dir}/src/google/protobuf/compiler/js/embed.cc)?
add_custom_command(?
OUTPUT ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc?
DEPENDS js_embed ${js_well_known_types_sources}?
COMMAND js_embed ${js_well_known_types_sources} > ${protobuf_source_dir}/src/google/protobuf/compiler/js/well_known_types_embed.cc?
)?
?
add_library(libprotoc ${protobuf_SHARED_OR_STATIC}?
error: patch failed: cmake/libprotoc.cmake:210
error: cmake/libprotoc.cmake: patch does not apply
I wrote it about that the patches are obsolete. https://github.com/Microsoft/vcpkg/pull/3995
That shows how they test ports :(
You can use my pr which works: https://github.com/Microsoft/vcpkg/pull/4000
Don't mind that my pr "has conflicts", that happened because of the https://github.com/Microsoft/vcpkg/pull/3995. You can safely just download the port and replace files.
Thanks for posting this issue!
The protobuf port 3.6.1 does not work properly.
To be completely clear: does the build fail or does the produced binary not work? While it's definitely better to not have patches that don't apply (and at some point we would like to make non-applicable patches an error), I want to be completely clear what the current state is :)
@TheAifam5 We currently don't consider patches that fail to apply an error, however we do compile the entire transitive build closure to ensure there are no breakages.
I think if the patch does not apply correctly, it's bug in the protobuf port. The patch is there for some reason so unpatched code may not work correctly.
@TheAifam5 @jozefizso
js-embed.patch and it wasn't applying.I merged #4000 so the port is in a clean state. If a patch needs to be re-added, then we can easily retrieve it from git history.
Related: #3787
@alexkaratarakis I'm not sure and I don't see any point why we should have js-embed.patch. If that's is really needed, it's really simple to add.
The BUILD_PROTOC_BINARIES is ON default.
Most helpful comment
@TheAifam5 @jozefizso
4000 Builds fine in all platforms and some of the removed patches were not being referenced in the portfile to begin with. The only patch that was referenced is
js-embed.patchand it wasn't applying.I merged #4000 so the port is in a clean state. If a patch needs to be re-added, then we can easily retrieve it from git history.