Skip to content
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

build failed if all plugins are disabled #36498

Open
leleliu008 opened this issue May 1, 2024 · 5 comments
Open

build failed if all plugins are disabled #36498

leleliu008 opened this issue May 1, 2024 · 5 comments

Comments

@leleliu008
Copy link

What version of gRPC and what language are you using?

https://github.com/grpc/grpc/archive/refs/tags/v1.62.2.tar.gz

What operating system (Linux, Windows,...) and version?

Android

What runtime / compiler are you using (e.g. python version or version of gcc)

Android NDK r26d (clang version 17.0.2)

What did you do?

cmake \
        -DCMAKE_CXX_STANDARD=17 \
        -DCMAKE_CXX_STANDARD_REQUIRED=TRUE \
        -DgRPC_ABSL_PROVIDER=package \
        -DgRPC_CARES_PROVIDER=package \
        -DgRPC_PROTOBUF_PROVIDER=package \
        -DgRPC_SSL_PROVIDER=package \
        -DgRPC_ZLIB_PROVIDER=package \
        -DgRPC_RE2_PROVIDER=package \
        -DgRPC_INSTALL=ON \
        -DgRPC_BUILD_TESTS=OFF \
        -DgRPC_BUILD_GRPC_CPP_PLUGIN=OFF \
        -DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF \
        -DgRPC_BUILD_GRPC_NODE_PLUGIN=OFF \
        -DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF \
        -DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF \
        -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF \
        -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF \
        -DBUILD_SHARED_LIBS=OFF

I only need libraries, so I disabled all plugins.

What did you expect to see?

successfully built

What did you see instead?

-- CMake command: /home/leleliu008/.ndk-pkg/uppm/installed/cmake/bin/cmake
-- CMake version: 3.29.1
-- CMAKE_HOST_SYSTEM_NAME: Linux
--      CMAKE_SYSTEM_NAME: Android
-- CMake command: /home/leleliu008/.ndk-pkg/uppm/installed/cmake/bin/cmake
-- CMake version: 3.29.1
-- CMAKE_HOST_SYSTEM_NAME: Linux
--      CMAKE_SYSTEM_NAME: Android
-- The C compiler identification is Clang 17.0.2
-- The CXX compiler identification is Clang 17.0.2
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/leleliu008/.ndk-pkg/core/wrapper-target-cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /home/leleliu008/.ndk-pkg/core/wrapper-target-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Performing Test HAVE_STDC_FORMAT_MACROS
-- Performing Test HAVE_STDC_FORMAT_MACROS - Success
-- Found c-ares: /home/leleliu008/.ndk-pkg/installed/android-21-arm64-v8a/c-ares/lib/cmake/c-ares/c-ares-config.cmake (found suitable version "1.28.1", minimum required is "1.13.0")
-- Found ZLIB: /home/leleliu008/.ndk-pkg/installed/android-21-arm64-v8a/libz/lib/libz.so (found version "1.3.1")
-- Found RE2 via CMake.
-- Found OpenSSL: /home/leleliu008/.ndk-pkg/installed/android-21-arm64-v8a/openssl-dev/lib/libcrypto.so (found version "3.3.0")
-- Downloading from https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz, if failed, please try configuring again
-- Configuring done (4.4s)
CMake Error: INSTALL(EXPORT) given unknown export "gRPCPluginTargets"
-- Generating done (0.2s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTING
    CMAKE_COLOR_MAKEFILE
    CMAKE_INSTALL_LIBDIR


CMake Generate step failed.  Build files cannot be regenerated correctly.

Anything else we should know about your project / environment?

@yashykt
Copy link
Member

yashykt commented May 7, 2024

I think if you disable gRPC_BUILD_CODEGEN as well, that would make it work.

@yashykt
Copy link
Member

yashykt commented May 7, 2024

but we could probably add logic to say - if no plugin is enabled, don't do anything with gRPC_BUILD_CODEGEN

@yashykt yashykt removed the untriaged label May 7, 2024
@yashykt
Copy link
Member

yashykt commented May 7, 2024

Feel free to send a PR.

@yashykt
Copy link
Member

yashykt commented May 7, 2024

This is not a very common usecase so I wouldn't be surprised if there are other issues that crop up when doing this.

@leleliu008
Copy link
Author

@yashykt Thank you for your reply.

@drfloob drfloob assigned yashykt and unassigned drfloob May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants