Skip to content

Commit

Permalink
fix(grpc)
Browse files Browse the repository at this point in the history
closes #7915
closes #7734
closes #7568
closes #7457
closes #7066
closes #7031
  • Loading branch information
jhheider committed Nov 16, 2024
1 parent ceb51cf commit 0c5d626
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions projects/grpc.io/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ dependencies:
abseil.io: ^20240116
c-ares.org: '*'
openssl.org: ^1.1
protobuf.dev: 26.1.0 # grpc links to specific versions, so we have to pick one.
github.com/google/re2: '*'
zlib.net: '*'
linux:
gnu.org/gcc/libstdcxx: '*'
# grpc links to specific versions, so we use theirs
# on darwin
protobuf.dev: 26.1.0

build:
dependencies:
Expand Down Expand Up @@ -110,6 +112,7 @@ build:
darwin:
ARGS:
- -DgRPC_PROTOBUF_PROVIDER=module
- -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,{{pkgx.prefix}},-undefined,dynamic_lookup
linux:
CC: clang
CXX: clang++
Expand All @@ -123,19 +126,20 @@ build:
test:
dependencies:
freedesktop.org/pkg-config: ^0
fixture: |
#include <grpc/grpc.h>
int main() {
grpc_init();
grpc_shutdown();
return GRPC_STATUS_OK;
}
script:
- cp $FIXTURE test.cpp
- PKG_CONFIG=$(pkg-config --cflags --libs libcares protobuf re2 grpc++)
- clang++ $PKG_CONFIG test.cpp -o test $LIBS
- ./test
- (grpc_cli ls localhost:58931 2>&1 || true) | grep -E "(failed to connect to all addresses|rpc failed)"
- run: clang++ $PKG_CONFIG $FIXTURE -o test $LIBS
fixture:
extname: cpp
content: |
#include <grpc/grpc.h>
int main() {
grpc_init();
grpc_shutdown();
return GRPC_STATUS_OK;
}
- ./test
env:
PKG_CONFIG: $(pkg-config --cflags --libs libcares protobuf re2 grpc++)
linux:
LIBS: -lstdc++

0 comments on commit 0c5d626

Please sign in to comment.