From 92d2ca0f7607f587d8fb6f47c57c2ff410ba2dbd Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 00:47:44 +0530 Subject: [PATCH 01/22] Create build.yml --- .github/workflows/build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000000..5d7c96adff3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,17 @@ +name: Build arm64 +on: workflow_dispatch +jobs: + build: + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + - run: brew install protobuf + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - run: ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true + - uses: actions/upload-artifact@v4 + with: + name: protoc-gen-grpc-java-arm64 + path: compiler/build/exe/java_plugin/protoc-gen-grpc-java From b95166f29ab52bfe70faab45c324c5218292f111 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 00:52:38 +0530 Subject: [PATCH 02/22] Update build.yml --- .github/workflows/build.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d7c96adff3..89b2a965cd4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,12 +5,25 @@ jobs: runs-on: macos-14 steps: - uses: actions/checkout@v4 - - run: brew install protobuf + + - name: Install Protobuf + run: | + brew install protobuf + echo "Protobuf installed at:" + brew --prefix protobuf + ls $(brew --prefix protobuf)/include/google/protobuf/ + - uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - run: ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true + + - name: Build with Protobuf paths + run: | + export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include + export LIBRARY_PATH=$(brew --prefix protobuf)/lib + ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true + - uses: actions/upload-artifact@v4 with: name: protoc-gen-grpc-java-arm64 From 18c50f996c30f413d437f36e41c48268bc426c72 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 00:57:03 +0530 Subject: [PATCH 03/22] Update build.yml --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89b2a965cd4..89d19a8cd11 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,20 +9,20 @@ jobs: - name: Install Protobuf run: | brew install protobuf - echo "Protobuf installed at:" brew --prefix protobuf - ls $(brew --prefix protobuf)/include/google/protobuf/ - uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - name: Build with Protobuf paths + - name: Build run: | - export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include - export LIBRARY_PATH=$(brew --prefix protobuf)/lib - ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true + PROTOBUF_PREFIX=$(brew --prefix protobuf) + ./gradlew :grpc-compiler:java_pluginExecutable \ + -PskipAndroid=true \ + -PprotobufIncludePath=${PROTOBUF_PREFIX}/include \ + -PprotobufLibPath=${PROTOBUF_PREFIX}/lib - uses: actions/upload-artifact@v4 with: From be26d773935f739fb999918bddd0e693f1068a27 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:01:01 +0530 Subject: [PATCH 04/22] Update build.yml --- .github/workflows/build.yml | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89d19a8cd11..e0bb7d2b8c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build arm64 +name: Build arm64 manual on: workflow_dispatch jobs: build: @@ -6,25 +6,24 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Protobuf - run: | - brew install protobuf - brew --prefix protobuf - - - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' + - name: Install deps + run: brew install protobuf - - name: Build + - name: Build manually run: | - PROTOBUF_PREFIX=$(brew --prefix protobuf) - ./gradlew :grpc-compiler:java_pluginExecutable \ - -PskipAndroid=true \ - -PprotobufIncludePath=${PROTOBUF_PREFIX}/include \ - -PprotobufLibPath=${PROTOBUF_PREFIX}/lib + cd compiler/src/java_plugin/cpp + + c++ -std=c++17 -O2 \ + -I/opt/homebrew/include \ + -L/opt/homebrew/lib \ + -lprotobuf -lprotoc \ + -o protoc-gen-grpc-java \ + java_plugin.cpp java_generator.cpp + + chmod +x protoc-gen-grpc-java + ./protoc-gen-grpc-java --version - uses: actions/upload-artifact@v4 with: name: protoc-gen-grpc-java-arm64 - path: compiler/build/exe/java_plugin/protoc-gen-grpc-java + path: compiler/src/java_plugin/cpp/protoc-gen-grpc-java From 727e77c94246dedda371a9a628d953b49cf305a8 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:08:00 +0530 Subject: [PATCH 05/22] Update build.yml --- .github/workflows/build.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0bb7d2b8c3..89b2a965cd4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build arm64 manual +name: Build arm64 on: workflow_dispatch jobs: build: @@ -6,24 +6,25 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install deps - run: brew install protobuf + - name: Install Protobuf + run: | + brew install protobuf + echo "Protobuf installed at:" + brew --prefix protobuf + ls $(brew --prefix protobuf)/include/google/protobuf/ + + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' - - name: Build manually + - name: Build with Protobuf paths run: | - cd compiler/src/java_plugin/cpp - - c++ -std=c++17 -O2 \ - -I/opt/homebrew/include \ - -L/opt/homebrew/lib \ - -lprotobuf -lprotoc \ - -o protoc-gen-grpc-java \ - java_plugin.cpp java_generator.cpp - - chmod +x protoc-gen-grpc-java - ./protoc-gen-grpc-java --version + export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include + export LIBRARY_PATH=$(brew --prefix protobuf)/lib + ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 with: name: protoc-gen-grpc-java-arm64 - path: compiler/src/java_plugin/cpp/protoc-gen-grpc-java + path: compiler/build/exe/java_plugin/protoc-gen-grpc-java From 885de0bec84030ff14d93e665b1c98f18a2dba82 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:11:44 +0530 Subject: [PATCH 06/22] Update build.yml --- .github/workflows/build.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 89b2a965cd4..3da939463f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,12 +6,9 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Protobuf + - name: Install Protobuf and dependencies run: | - brew install protobuf - echo "Protobuf installed at:" - brew --prefix protobuf - ls $(brew --prefix protobuf)/include/google/protobuf/ + brew install protobuf abseil - uses: actions/setup-java@v4 with: @@ -20,8 +17,8 @@ jobs: - name: Build with Protobuf paths run: | - export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include - export LIBRARY_PATH=$(brew --prefix protobuf)/lib + export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include + export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 From aad4992c9a115c9e58311c5053614dccbe8430d9 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:15:58 +0530 Subject: [PATCH 07/22] Update build.yml --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3da939463f5..7fc36d2c4d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,9 +19,15 @@ jobs: run: | export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib + export MACOSX_DEPLOYMENT_TARGET=10.15 ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 with: name: protoc-gen-grpc-java-arm64 path: compiler/build/exe/java_plugin/protoc-gen-grpc-java +``` + +Added: +``` +export MACOSX_DEPLOYMENT_TARGET=10.15 From 077b9cb8bc2772d4fddd5a6a3b29cc43edb99b2e Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:17:32 +0530 Subject: [PATCH 08/22] Update build.yml --- .github/workflows/build.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7fc36d2c4d1..47f13923a02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,3 @@ jobs: with: name: protoc-gen-grpc-java-arm64 path: compiler/build/exe/java_plugin/protoc-gen-grpc-java -``` - -Added: -``` -export MACOSX_DEPLOYMENT_TARGET=10.15 From f51fb488ebbb5a41e304e32ef159c7cec412f4d7 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:25:20 +0530 Subject: [PATCH 09/22] Update build.yml --- .github/workflows/build.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47f13923a02..355c1435ee7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,39 @@ jobs: run: | export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib - export MACOSX_DEPLOYMENT_TARGET=10.15 - ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true + export CXXFLAGS="-mmacosx-version-min=10.15" + export CFLAGS="-mmacosx-version-min=10.15" + export LDFLAGS="-mmacosx-version-min=10.15" + ./gradlew :grpc-compiler:java_pluginExecutableJava_pluginCpp :grpc-compiler:java_pluginExecutable -PskipAndroid=true --info + + - uses: actions/upload-artifact@v4 + with: + name: protoc-gen-grpc-java-arm64 + path: compiler/build/exe/java_plugin/protoc-gen-grpc-javaname: Build arm64 +on: workflow_dispatch +jobs: + build: + runs-on: macos-14 + steps: + - uses: actions/checkout@v4 + + - name: Install Protobuf and dependencies + run: | + brew install protobuf abseil + + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Build with Protobuf paths + run: | + export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include + export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib + export CXXFLAGS="-mmacosx-version-min=10.15" + export CFLAGS="-mmacosx-version-min=10.15" + export LDFLAGS="-mmacosx-version-min=10.15" + ./gradlew :grpc-compiler:java_pluginExecutableJava_pluginCpp :grpc-compiler:java_pluginExecutable -PskipAndroid=true --info - uses: actions/upload-artifact@v4 with: From abe6bc685dccbd187f1170e066b1443386ff8439 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:26:22 +0530 Subject: [PATCH 10/22] Update build.yml --- .github/workflows/build.yml | 40 ++++++++----------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 355c1435ee7..801d63d06d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,43 +15,19 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Build with Protobuf paths + - name: Patch build for macOS version run: | - export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include - export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib - export CXXFLAGS="-mmacosx-version-min=10.15" - export CFLAGS="-mmacosx-version-min=10.15" - export LDFLAGS="-mmacosx-version-min=10.15" - ./gradlew :grpc-compiler:java_pluginExecutableJava_pluginCpp :grpc-compiler:java_pluginExecutable -PskipAndroid=true --info - - - uses: actions/upload-artifact@v4 - with: - name: protoc-gen-grpc-java-arm64 - path: compiler/build/exe/java_plugin/protoc-gen-grpc-javaname: Build arm64 -on: workflow_dispatch -jobs: - build: - runs-on: macos-14 - steps: - - uses: actions/checkout@v4 - - - name: Install Protobuf and dependencies - run: | - brew install protobuf abseil - - - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' + # Add compiler flag to build.gradle + sed -i '' 's/cppCompiler.args/cppCompiler.args "-mmacosx-version-min=10.15",/g' compiler/build.gradle || true + + # Or add it globally + echo "allprojects { tasks.withType(CppCompile) { compilerArgs.add('-mmacosx-version-min=10.15') } }" >> build.gradle - - name: Build with Protobuf paths + - name: Build run: | export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib - export CXXFLAGS="-mmacosx-version-min=10.15" - export CFLAGS="-mmacosx-version-min=10.15" - export LDFLAGS="-mmacosx-version-min=10.15" - ./gradlew :grpc-compiler:java_pluginExecutableJava_pluginCpp :grpc-compiler:java_pluginExecutable -PskipAndroid=true --info + ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 with: From 8de0ad99ea646a0ecd4b37f70ec8de44ebfa0a02 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:29:41 +0530 Subject: [PATCH 11/22] Update build.yml --- .github/workflows/build.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 801d63d06d0..7af865ace9c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,27 +6,22 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Protobuf and dependencies + - name: Install older Protobuf run: | - brew install protobuf abseil + # Install protobuf 21.x (older, more compatible) + brew install protobuf@21 + brew link protobuf@21 --force - uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - name: Patch build for macOS version - run: | - # Add compiler flag to build.gradle - sed -i '' 's/cppCompiler.args/cppCompiler.args "-mmacosx-version-min=10.15",/g' compiler/build.gradle || true - - # Or add it globally - echo "allprojects { tasks.withType(CppCompile) { compilerArgs.add('-mmacosx-version-min=10.15') } }" >> build.gradle - - name: Build run: | - export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include - export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib + export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf@21)/include + export LIBRARY_PATH=$(brew --prefix protobuf@21)/lib + export PATH=$(brew --prefix protobuf@21)/bin:$PATH ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 From d9db1811d8d9905fbe550049445ce54250543a2e Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:33:02 +0530 Subject: [PATCH 12/22] Update build.yml --- .github/workflows/build.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7af865ace9c..70c155a8f13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,9 +8,7 @@ jobs: - name: Install older Protobuf run: | - # Install protobuf 21.x (older, more compatible) brew install protobuf@21 - brew link protobuf@21 --force - uses: actions/setup-java@v4 with: @@ -19,9 +17,17 @@ jobs: - name: Build run: | - export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf@21)/include - export LIBRARY_PATH=$(brew --prefix protobuf@21)/lib - export PATH=$(brew --prefix protobuf@21)/bin:$PATH + export PATH="/opt/homebrew/opt/protobuf@21/bin:$PATH" + export CPLUS_INCLUDE_PATH="/opt/homebrew/opt/protobuf@21/include" + export CPPFLAGS="-I/opt/homebrew/opt/protobuf@21/include" + export LDFLAGS="-L/opt/homebrew/opt/protobuf@21/lib" + export LIBRARY_PATH="/opt/homebrew/opt/protobuf@21/lib" + export PKG_CONFIG_PATH="/opt/homebrew/opt/protobuf@21/lib/pkgconfig" + + # Verify protoc is found + which protoc + protoc --version + ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 From a600708a4a29cf78e79e88dd92216ec81aaeeec0 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:38:21 +0530 Subject: [PATCH 13/22] Update build.yml --- .github/workflows/build.yml | 39 ++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70c155a8f13..c2feb7032e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,28 +6,41 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install older Protobuf + - name: Install Protobuf and dependencies run: | - brew install protobuf@21 + brew install protobuf abseil - uses: actions/setup-java@v4 with: java-version: '17' distribution: 'temurin' - - name: Build + - name: Patch build.gradle run: | - export PATH="/opt/homebrew/opt/protobuf@21/bin:$PATH" - export CPLUS_INCLUDE_PATH="/opt/homebrew/opt/protobuf@21/include" - export CPPFLAGS="-I/opt/homebrew/opt/protobuf@21/include" - export LDFLAGS="-L/opt/homebrew/opt/protobuf@21/lib" - export LIBRARY_PATH="/opt/homebrew/opt/protobuf@21/lib" - export PKG_CONFIG_PATH="/opt/homebrew/opt/protobuf@21/lib/pkgconfig" - - # Verify protoc is found - which protoc - protoc --version + # Add the macOS deployment target to compiler/build.gradle + cat >> compiler/build.gradle << 'EOF' + // Fix macOS deployment target for C++17 features + model { + toolChains { + clang(Clang) { + eachPlatform { + cppCompiler.withArguments { args -> + args << "-mmacosx-version-min=10.15" + } + linker.withArguments { args -> + args << "-mmacosx-version-min=10.15" + } + } + } + } + } + EOF + + - name: Build + run: | + export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include + export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 From f539be493072ea4d2563ecd4dd65751556b371bd Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:43:55 +0530 Subject: [PATCH 14/22] Update build.yml --- .github/workflows/build.yml | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2feb7032e4..214cb84a7c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,32 +15,21 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Patch build.gradle + - name: List abseil libraries run: | - # Add the macOS deployment target to compiler/build.gradle - cat >> compiler/build.gradle << 'EOF' - - // Fix macOS deployment target for C++17 features - model { - toolChains { - clang(Clang) { - eachPlatform { - cppCompiler.withArguments { args -> - args << "-mmacosx-version-min=10.15" - } - linker.withArguments { args -> - args << "-mmacosx-version-min=10.15" - } - } - } - } - } - EOF + ls $(brew --prefix abseil)/lib/*.a | head -30 - - name: Build + - name: Build with manual linking run: | export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib + + # Get all abseil libraries + ABSEIL_LIBS=$(ls $(brew --prefix abseil)/lib/*.a | xargs -I{} basename {} .a | sed 's/^lib/-l/' | tr '\n' ' ') + echo "Abseil libs: $ABSEIL_LIBS" + + export LDFLAGS="-L$(brew --prefix abseil)/lib -L$(brew --prefix protobuf)/lib $ABSEIL_LIBS" + ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - uses: actions/upload-artifact@v4 From f1de0b62d323c37cf0b1be0afb0671040526b8ee Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:48:26 +0530 Subject: [PATCH 15/22] Update build.yml --- .github/workflows/build.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 214cb84a7c7..66f62908b63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,24 +15,29 @@ jobs: java-version: '17' distribution: 'temurin' - - name: List abseil libraries + - name: Patch build.gradle for macOS version and abseil run: | - ls $(brew --prefix abseil)/lib/*.a | head -30 + cd compiler + + # Add -mmacosx-version-min=10.15 to cppCompiler args + sed -i '' 's/cppCompiler.args "-I/cppCompiler.args "-mmacosx-version-min=10.15", "-I/' build.gradle + + # Add abseil libs to linker + sed -i '' 's|linker.args "-lprotoc", "-lprotobuf"|linker.args "-mmacosx-version-min=10.15", "-lprotoc", "-lprotobuf", "-L/opt/homebrew/opt/abseil/lib", "-labsl_log_internal_message", "-labsl_log_internal_nullguard", "-labsl_log_internal_check_op", "-labsl_log_internal_conditions", "-labsl_log_internal_format", "-labsl_raw_hash_set", "-labsl_hash", "-labsl_city", "-labsl_low_level_hash", "-labsl_hashtablez_sampler", "-labsl_raw_logging_internal", "-labsl_spinlock_wait", "-labsl_synchronization", "-labsl_stacktrace", "-labsl_symbolize", "-labsl_debugging_internal", "-labsl_demangle_internal", "-labsl_malloc_internal", "-labsl_base", "-labsl_throw_delegate", "-labsl_time", "-labsl_time_zone", "-labsl_int128", "-labsl_strings", "-labsl_strings_internal", "-labsl_string_view", "-labsl_examine_stack", "-labsl_log_globals", "-labsl_log_severity", "-labsl_log_sink", "-labsl_strerror"|' build.gradle + + echo "=== Checking patches ===" + grep -A2 "cppCompiler.args" build.gradle | head -10 + grep "linker.args" build.gradle | head -5 - - name: Build with manual linking + - name: Build run: | export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib - # Get all abseil libraries - ABSEIL_LIBS=$(ls $(brew --prefix abseil)/lib/*.a | xargs -I{} basename {} .a | sed 's/^lib/-l/' | tr '\n' ' ') - echo "Abseil libs: $ABSEIL_LIBS" - - export LDFLAGS="-L$(brew --prefix abseil)/lib -L$(brew --prefix protobuf)/lib $ABSEIL_LIBS" - ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true - - uses: actions/upload-artifact@v4 + - name: Upload artifact + uses: actions/upload-artifact@v4 with: name: protoc-gen-grpc-java-arm64 path: compiler/build/exe/java_plugin/protoc-gen-grpc-java From e25d712c1e06ba8455c055d5111f54a8107a47bb Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:52:08 +0530 Subject: [PATCH 16/22] Update build.yml --- .github/workflows/build.yml | 49 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66f62908b63..b1000bc355c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,19 +15,50 @@ jobs: java-version: '17' distribution: 'temurin' - - name: Patch build.gradle for macOS version and abseil + - name: Patch build.gradle with Python run: | - cd compiler + python3 << 'EOF' + import re - # Add -mmacosx-version-min=10.15 to cppCompiler args - sed -i '' 's/cppCompiler.args "-I/cppCompiler.args "-mmacosx-version-min=10.15", "-I/' build.gradle + with open('compiler/build.gradle', 'r') as f: + content = f.read() - # Add abseil libs to linker - sed -i '' 's|linker.args "-lprotoc", "-lprotobuf"|linker.args "-mmacosx-version-min=10.15", "-lprotoc", "-lprotobuf", "-L/opt/homebrew/opt/abseil/lib", "-labsl_log_internal_message", "-labsl_log_internal_nullguard", "-labsl_log_internal_check_op", "-labsl_log_internal_conditions", "-labsl_log_internal_format", "-labsl_raw_hash_set", "-labsl_hash", "-labsl_city", "-labsl_low_level_hash", "-labsl_hashtablez_sampler", "-labsl_raw_logging_internal", "-labsl_spinlock_wait", "-labsl_synchronization", "-labsl_stacktrace", "-labsl_symbolize", "-labsl_debugging_internal", "-labsl_demangle_internal", "-labsl_malloc_internal", "-labsl_base", "-labsl_throw_delegate", "-labsl_time", "-labsl_time_zone", "-labsl_int128", "-labsl_strings", "-labsl_strings_internal", "-labsl_string_view", "-labsl_examine_stack", "-labsl_log_globals", "-labsl_log_severity", "-labsl_log_sink", "-labsl_strerror"|' build.gradle + # Print lines with cppCompiler for debugging + print("=== Lines with cppCompiler ===") + for i, line in enumerate(content.split('\n')): + if 'cppCompiler' in line: + print(f"{i}: {line}") - echo "=== Checking patches ===" - grep -A2 "cppCompiler.args" build.gradle | head -10 - grep "linker.args" build.gradle | head -5 + # Add -mmacosx-version-min=10.15 to ALL cppCompiler.args lines + content = re.sub( + r'(cppCompiler\.args\s+)"', + r'\1"-mmacosx-version-min=10.15", "', + content + ) + + # Add abseil libs to linker.args with -lprotobuf + abseil_libs = ', "-L/opt/homebrew/opt/abseil/lib", "-labsl_log_internal_message", "-labsl_log_internal_nullguard", "-labsl_log_internal_check_op", "-labsl_log_internal_conditions", "-labsl_log_internal_format", "-labsl_raw_hash_set", "-labsl_hash", "-labsl_city", "-labsl_low_level_hash", "-labsl_hashtablez_sampler", "-labsl_raw_logging_internal", "-labsl_spinlock_wait", "-labsl_synchronization", "-labsl_stacktrace", "-labsl_symbolize", "-labsl_debugging_internal", "-labsl_demangle_internal", "-labsl_malloc_internal", "-labsl_base", "-labsl_throw_delegate", "-labsl_time", "-labsl_time_zone", "-labsl_int128", "-labsl_strings", "-labsl_strings_internal", "-labsl_string_view", "-labsl_examine_stack", "-labsl_log_globals", "-labsl_log_severity", "-labsl_log_sink", "-labsl_strerror"' + + content = content.replace( + '"-lprotobuf"', + '"-lprotobuf"' + abseil_libs + ) + + # Also add linker flag for macos version + content = re.sub( + r'(linker\.args\s+)"', + r'\1"-mmacosx-version-min=10.15", "', + content + ) + + with open('compiler/build.gradle', 'w') as f: + f.write(content) + + print("\n=== Modified lines with cppCompiler ===") + for i, line in enumerate(content.split('\n')): + if 'cppCompiler' in line or 'linker.args' in line: + print(f"{i}: {line}") + EOF - name: Build run: | From 2c6740655103385dca59c44fed09eef121456c91 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 01:56:39 +0530 Subject: [PATCH 17/22] Update build.yml --- .github/workflows/build.yml | 99 +++++++++++++++---------------------- 1 file changed, 41 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1000bc355c..8d362cc5732 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build arm64 +name: Build arm64 manual on: workflow_dispatch jobs: build: @@ -6,69 +6,52 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Protobuf and dependencies + - name: Install dependencies run: | brew install protobuf abseil - - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Patch build.gradle with Python + - name: Manual compile run: | - python3 << 'EOF' - import re - - with open('compiler/build.gradle', 'r') as f: - content = f.read() - - # Print lines with cppCompiler for debugging - print("=== Lines with cppCompiler ===") - for i, line in enumerate(content.split('\n')): - if 'cppCompiler' in line: - print(f"{i}: {line}") - - # Add -mmacosx-version-min=10.15 to ALL cppCompiler.args lines - content = re.sub( - r'(cppCompiler\.args\s+)"', - r'\1"-mmacosx-version-min=10.15", "', - content - ) - - # Add abseil libs to linker.args with -lprotobuf - abseil_libs = ', "-L/opt/homebrew/opt/abseil/lib", "-labsl_log_internal_message", "-labsl_log_internal_nullguard", "-labsl_log_internal_check_op", "-labsl_log_internal_conditions", "-labsl_log_internal_format", "-labsl_raw_hash_set", "-labsl_hash", "-labsl_city", "-labsl_low_level_hash", "-labsl_hashtablez_sampler", "-labsl_raw_logging_internal", "-labsl_spinlock_wait", "-labsl_synchronization", "-labsl_stacktrace", "-labsl_symbolize", "-labsl_debugging_internal", "-labsl_demangle_internal", "-labsl_malloc_internal", "-labsl_base", "-labsl_throw_delegate", "-labsl_time", "-labsl_time_zone", "-labsl_int128", "-labsl_strings", "-labsl_strings_internal", "-labsl_string_view", "-labsl_examine_stack", "-labsl_log_globals", "-labsl_log_severity", "-labsl_log_sink", "-labsl_strerror"' - - content = content.replace( - '"-lprotobuf"', - '"-lprotobuf"' + abseil_libs - ) - - # Also add linker flag for macos version - content = re.sub( - r'(linker\.args\s+)"', - r'\1"-mmacosx-version-min=10.15", "', - content - ) - - with open('compiler/build.gradle', 'w') as f: - f.write(content) - - print("\n=== Modified lines with cppCompiler ===") - for i, line in enumerate(content.split('\n')): - if 'cppCompiler' in line or 'linker.args' in line: - print(f"{i}: {line}") - EOF - - - name: Build - run: | - export CPLUS_INCLUDE_PATH=$(brew --prefix protobuf)/include:$(brew --prefix abseil)/include - export LIBRARY_PATH=$(brew --prefix protobuf)/lib:$(brew --prefix abseil)/lib - - ./gradlew :grpc-compiler:java_pluginExecutable -PskipAndroid=true + PROTOBUF_PREFIX=$(brew --prefix protobuf) + ABSEIL_PREFIX=$(brew --prefix abseil) + + # Get all abseil dylibs for linking + ABSEIL_LIBS=$(pkg-config --libs absl_log absl_log_internal_message absl_log_internal_check_op absl_strings absl_hash absl_raw_hash_set absl_synchronization absl_base absl_time absl_int128 2>/dev/null || echo "-L${ABSEIL_PREFIX}/lib -labsl_log_internal_message -labsl_log_internal_check_op -labsl_strings -labsl_hash -labsl_raw_hash_set -labsl_synchronization -labsl_base -labsl_time -labsl_int128 -labsl_raw_logging_internal -labsl_throw_delegate -labsl_string_view -labsl_strings_internal -labsl_spinlock_wait -labsl_city -labsl_low_level_hash -labsl_debugging_internal -labsl_demangle_internal -labsl_stacktrace -labsl_symbolize -labsl_time_zone -labsl_log_severity -labsl_examine_stack -labsl_log_globals -labsl_log_internal_conditions -labsl_log_internal_format -labsl_log_internal_nullguard -labsl_strerror -labsl_log_sink -labsl_hashtablez_sampler -labsl_malloc_internal -labsl_vlog_config_internal") + + echo "Abseil libs: $ABSEIL_LIBS" + + cd compiler/src/java_plugin/cpp + + # Compile each file + clang++ -std=c++17 -mmacosx-version-min=10.15 \ + -I${PROTOBUF_PREFIX}/include \ + -I${ABSEIL_PREFIX}/include \ + -c java_generator.cpp -o java_generator.o + + clang++ -std=c++17 -mmacosx-version-min=10.15 \ + -I${PROTOBUF_PREFIX}/include \ + -I${ABSEIL_PREFIX}/include \ + -c java_plugin.cpp -o java_plugin.o + + # Link + clang++ -mmacosx-version-min=10.15 \ + java_generator.o java_plugin.o \ + -L${PROTOBUF_PREFIX}/lib \ + -L${ABSEIL_PREFIX}/lib \ + -lprotoc -lprotobuf \ + $ABSEIL_LIBS \ + -o protoc-gen-grpc-java + + # Verify + file protoc-gen-grpc-java + ./protoc-gen-grpc-java --version || true + + # Copy to expected location + mkdir -p $GITHUB_WORKSPACE/output + cp protoc-gen-grpc-java $GITHUB_WORKSPACE/output/ - name: Upload artifact uses: actions/upload-artifact@v4 with: name: protoc-gen-grpc-java-arm64 - path: compiler/build/exe/java_plugin/protoc-gen-grpc-java + path: output/protoc-gen-grpc-java From 31153e9c317d6a84144c80fe13402f8ce6b0c790 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 02:01:36 +0530 Subject: [PATCH 18/22] Update build.yml --- .github/workflows/build.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d362cc5732..e76fbcbfd8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build arm64 manual +name: Build arm64 static on: workflow_dispatch jobs: build: @@ -10,16 +10,11 @@ jobs: run: | brew install protobuf abseil - - name: Manual compile + - name: Manual compile with static linking run: | PROTOBUF_PREFIX=$(brew --prefix protobuf) ABSEIL_PREFIX=$(brew --prefix abseil) - # Get all abseil dylibs for linking - ABSEIL_LIBS=$(pkg-config --libs absl_log absl_log_internal_message absl_log_internal_check_op absl_strings absl_hash absl_raw_hash_set absl_synchronization absl_base absl_time absl_int128 2>/dev/null || echo "-L${ABSEIL_PREFIX}/lib -labsl_log_internal_message -labsl_log_internal_check_op -labsl_strings -labsl_hash -labsl_raw_hash_set -labsl_synchronization -labsl_base -labsl_time -labsl_int128 -labsl_raw_logging_internal -labsl_throw_delegate -labsl_string_view -labsl_strings_internal -labsl_spinlock_wait -labsl_city -labsl_low_level_hash -labsl_debugging_internal -labsl_demangle_internal -labsl_stacktrace -labsl_symbolize -labsl_time_zone -labsl_log_severity -labsl_examine_stack -labsl_log_globals -labsl_log_internal_conditions -labsl_log_internal_format -labsl_log_internal_nullguard -labsl_strerror -labsl_log_sink -labsl_hashtablez_sampler -labsl_malloc_internal -labsl_vlog_config_internal") - - echo "Abseil libs: $ABSEIL_LIBS" - cd compiler/src/java_plugin/cpp # Compile each file @@ -33,25 +28,32 @@ jobs: -I${ABSEIL_PREFIX}/include \ -c java_plugin.cpp -o java_plugin.o - # Link + # Find all static libraries (.a files) + echo "=== Finding static libs ===" + find ${PROTOBUF_PREFIX}/lib -name "*.a" | head -10 + find ${ABSEIL_PREFIX}/lib -name "*.a" | head -10 + + # Link statically using .a files directly clang++ -mmacosx-version-min=10.15 \ java_generator.o java_plugin.o \ - -L${PROTOBUF_PREFIX}/lib \ - -L${ABSEIL_PREFIX}/lib \ - -lprotoc -lprotobuf \ - $ABSEIL_LIBS \ + ${PROTOBUF_PREFIX}/lib/libprotoc.a \ + ${PROTOBUF_PREFIX}/lib/libprotobuf.a \ + ${ABSEIL_PREFIX}/lib/libabsl_*.a \ + -lc++ \ + -framework CoreFoundation \ -o protoc-gen-grpc-java - # Verify + # Verify it's not depending on homebrew libs + echo "=== Checking dependencies ===" + otool -L protoc-gen-grpc-java + file protoc-gen-grpc-java - ./protoc-gen-grpc-java --version || true - # Copy to expected location mkdir -p $GITHUB_WORKSPACE/output cp protoc-gen-grpc-java $GITHUB_WORKSPACE/output/ - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: protoc-gen-grpc-java-arm64 + name: protoc-gen-grpc-java-arm64-static path: output/protoc-gen-grpc-java From dfa6a5cfd951b11634a0bb2701184cb41a2e644f Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 02:07:00 +0530 Subject: [PATCH 19/22] Update build.yml --- .github/workflows/build.yml | 84 ++++++++++++++++++++++++++++--------- 1 file changed, 64 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e76fbcbfd8f..eec88be4c1e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build arm64 static +name: Build arm64 static from source on: workflow_dispatch jobs: build: @@ -6,48 +6,92 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install dependencies + - name: Install build tools run: | - brew install protobuf abseil + brew install cmake ninja - - name: Manual compile with static linking + - name: Build abseil static run: | - PROTOBUF_PREFIX=$(brew --prefix protobuf) - ABSEIL_PREFIX=$(brew --prefix abseil) + cd $HOME + git clone --depth 1 --branch 20240116.2 https://github.com/abseil/abseil-cpp.git + cd abseil-cpp + mkdir build && cd build + cmake .. \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \ + -DABSL_BUILD_TESTING=OFF \ + -DABSL_USE_GOOGLETEST_HEAD=OFF \ + -DCMAKE_INSTALL_PREFIX=$HOME/local \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + ninja + ninja install + echo "=== Abseil static libs ===" + ls $HOME/local/lib/*.a | head -20 + + - name: Build protobuf static + run: | + cd $HOME + git clone --depth 1 --branch v25.3 https://github.com/protocolbuffers/protobuf.git + cd protobuf + mkdir build && cd build + cmake .. \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_STANDARD=17 \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \ + -Dprotobuf_BUILD_TESTS=OFF \ + -Dprotobuf_ABSL_PROVIDER=package \ + -DCMAKE_PREFIX_PATH=$HOME/local \ + -DCMAKE_INSTALL_PREFIX=$HOME/local \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_POSITION_INDEPENDENT_CODE=ON + ninja + ninja install + + echo "=== Protobuf static libs ===" + ls $HOME/local/lib/*.a | head -20 + + - name: Compile grpc-java plugin + run: | cd compiler/src/java_plugin/cpp - # Compile each file + # Compile clang++ -std=c++17 -mmacosx-version-min=10.15 \ - -I${PROTOBUF_PREFIX}/include \ - -I${ABSEIL_PREFIX}/include \ + -I$HOME/local/include \ -c java_generator.cpp -o java_generator.o clang++ -std=c++17 -mmacosx-version-min=10.15 \ - -I${PROTOBUF_PREFIX}/include \ - -I${ABSEIL_PREFIX}/include \ + -I$HOME/local/include \ -c java_plugin.cpp -o java_plugin.o - # Find all static libraries (.a files) - echo "=== Finding static libs ===" - find ${PROTOBUF_PREFIX}/lib -name "*.a" | head -10 - find ${ABSEIL_PREFIX}/lib -name "*.a" | head -10 + # Get list of all static libs needed + echo "=== All static libs ===" + ls $HOME/local/lib/*.a - # Link statically using .a files directly + # Link everything statically clang++ -mmacosx-version-min=10.15 \ java_generator.o java_plugin.o \ - ${PROTOBUF_PREFIX}/lib/libprotoc.a \ - ${PROTOBUF_PREFIX}/lib/libprotobuf.a \ - ${ABSEIL_PREFIX}/lib/libabsl_*.a \ + $HOME/local/lib/libprotoc.a \ + $HOME/local/lib/libprotobuf.a \ + $HOME/local/lib/libutf8_validity.a \ + $HOME/local/lib/libabsl_*.a \ -lc++ \ -framework CoreFoundation \ -o protoc-gen-grpc-java - # Verify it's not depending on homebrew libs echo "=== Checking dependencies ===" otool -L protoc-gen-grpc-java + echo "=== File info ===" file protoc-gen-grpc-java + ls -lh protoc-gen-grpc-java + + echo "=== Test run ===" + ./protoc-gen-grpc-java --version || echo "Done" mkdir -p $GITHUB_WORKSPACE/output cp protoc-gen-grpc-java $GITHUB_WORKSPACE/output/ From abeb82c130c7352caa55c3b445bec46dffbdc9d8 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 02:15:13 +0530 Subject: [PATCH 20/22] Update build.yml --- .github/workflows/build.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eec88be4c1e..e1b2c88c8dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: - name: Build abseil static run: | cd $HOME - git clone --depth 1 --branch 20240116.2 https://github.com/abseil/abseil-cpp.git + git clone --depth 1 --branch 20240722.0 https://github.com/abseil/abseil-cpp.git cd abseil-cpp mkdir build && cd build cmake .. \ @@ -28,14 +28,11 @@ jobs: -DCMAKE_POSITION_INDEPENDENT_CODE=ON ninja ninja install - - echo "=== Abseil static libs ===" - ls $HOME/local/lib/*.a | head -20 - name: Build protobuf static run: | cd $HOME - git clone --depth 1 --branch v25.3 https://github.com/protocolbuffers/protobuf.git + git clone --depth 1 --branch v28.3 https://github.com/protocolbuffers/protobuf.git cd protobuf mkdir build && cd build cmake .. \ @@ -53,13 +50,12 @@ jobs: ninja install echo "=== Protobuf static libs ===" - ls $HOME/local/lib/*.a | head -20 + ls $HOME/local/lib/*.a - name: Compile grpc-java plugin run: | cd compiler/src/java_plugin/cpp - # Compile clang++ -std=c++17 -mmacosx-version-min=10.15 \ -I$HOME/local/include \ -c java_generator.cpp -o java_generator.o @@ -68,10 +64,6 @@ jobs: -I$HOME/local/include \ -c java_plugin.cpp -o java_plugin.o - # Get list of all static libs needed - echo "=== All static libs ===" - ls $HOME/local/lib/*.a - # Link everything statically clang++ -mmacosx-version-min=10.15 \ java_generator.o java_plugin.o \ @@ -86,11 +78,9 @@ jobs: echo "=== Checking dependencies ===" otool -L protoc-gen-grpc-java - echo "=== File info ===" file protoc-gen-grpc-java ls -lh protoc-gen-grpc-java - echo "=== Test run ===" ./protoc-gen-grpc-java --version || echo "Done" mkdir -p $GITHUB_WORKSPACE/output From 98d26ef93c9dbc219195a5ac2b2eacfe1990d202 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 02:21:51 +0530 Subject: [PATCH 21/22] Update build.yml --- .github/workflows/build.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1b2c88c8dc..159b70830ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,14 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Check required protobuf version + run: | + echo "=== Checking grpc-java's expected protobuf version ===" + grep -r "protobuf" gradle.properties || true + grep -r "protobufVersion" build.gradle || true + grep -r "com.google.protobuf:protobuf" build.gradle | head -5 || true + cat gradle/libs.versions.toml | grep -i protobuf || true + - name: Install build tools run: | brew install cmake ninja @@ -29,10 +37,11 @@ jobs: ninja ninja install - - name: Build protobuf static + - name: Build protobuf static (latest) run: | cd $HOME - git clone --depth 1 --branch v28.3 https://github.com/protocolbuffers/protobuf.git + # Try the latest protobuf + git clone --depth 1 --branch v29.3 https://github.com/protocolbuffers/protobuf.git cd protobuf mkdir build && cd build cmake .. \ @@ -49,8 +58,8 @@ jobs: ninja ninja install - echo "=== Protobuf static libs ===" - ls $HOME/local/lib/*.a + echo "=== Check for QualifiedClassName ===" + grep -r "QualifiedClassName" $HOME/local/include/google/protobuf/ || echo "Not found in headers" - name: Compile grpc-java plugin run: | @@ -64,7 +73,6 @@ jobs: -I$HOME/local/include \ -c java_plugin.cpp -o java_plugin.o - # Link everything statically clang++ -mmacosx-version-min=10.15 \ java_generator.o java_plugin.o \ $HOME/local/lib/libprotoc.a \ From c4636fb3761e78b6d1961c7df5c4effc786244b4 Mon Sep 17 00:00:00 2001 From: Shabin Date: Fri, 6 Feb 2026 02:30:06 +0530 Subject: [PATCH 22/22] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 159b70830ea..89fbcffd15a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,7 @@ jobs: run: | cd $HOME # Try the latest protobuf - git clone --depth 1 --branch v29.3 https://github.com/protocolbuffers/protobuf.git + git clone --depth 1 https://github.com/protocolbuffers/protobuf.git cd protobuf mkdir build && cd build cmake .. \