Skip to content

Conversation

@06kellyjac
Copy link
Member

Motivation for this change

Init protoc-gen-grpc-web at 1.2.1

Using a patch from grpc/grpc-web#1107

Is there a better way to change dir or to fetchFromGithub and only keep the ./javascript/net/grpc/web/ subdir? thanks

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Relase notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jul 30, 2021
@alyssais
Copy link
Member

alyssais commented Aug 1, 2021

When cross-compiling (building pkgsCross.aarch64-multiplatform.protoc-gen-grpc-web), I got this error:

aarch64-unknown-linux-gnu-g++ -std=c++11 -I/usr/local/include -pthread  -c -o grpc_generator.o grpc_generator.cc
grpc_generator.cc:19:10: fatal error: google/protobuf/compiler/code_generator.h: No such file or directory
   19 | #include <google/protobuf/compiler/code_generator.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: grpc_generator.o] Error 1

So protobuf needs to be a (non-native) build input. You might want to set strictDeps = true; to help catch this sort of issue when not cross-compiling.

@06kellyjac
Copy link
Member Author

Thanks for the reviews

@alyssais
Copy link
Member

alyssais commented Aug 1, 2021

aarch64-unknown-linux-gnu-g++ -std=c++11 -I/usr/local/include -pthread  -c -o grpc_generator.o grpc_generator.cc
grpc_generator.cc:19:10: fatal error: google/protobuf/compiler/code_generator.h: No such file or directory
   19 | #include <google/protobuf/compiler/code_generator.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: grpc_generator.o] Error 1

So protobuf needs to be both a build input and a native build input.

@ofborg ofborg bot added the ofborg-internal-error Ofborg encountered an error label Aug 2, 2021
@SuperSandro2000 SuperSandro2000 merged commit 268b1de into NixOS:master Aug 2, 2021
@06kellyjac 06kellyjac deleted the grpc-web branch August 2, 2021 10:57
@cole-h cole-h removed the ofborg-internal-error Ofborg encountered an error label Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants