Skip to content

Large shared library size (200MB) when linking google-cloud-cpp speech and texttospeech libraries #14932

@Nullarity

Description

@Nullarity

I am developing an application for Android. My application needs to convert voice to text and text to voice. Therefore, I use these two components: google-cloud-cpp::speech and google-cloud-cpp::texttospeech. The following is a simplified CMakeLists.txt:

cmake_minimum_required ( VERSION 3.25 )
project ( assistant VERSION 1.0.0 )
set ( CMAKE_CXX_STANDARD 20 )
find_package ( google_cloud_cpp_speech CONFIG REQUIRED )
find_package ( google_cloud_cpp_texttospeech CONFIG REQUIRED )
add_library ( assistant SHARED src/assistant.cpp )
target_link_libraries ( assistant PRIVATE google-cloud-cpp::speech google-cloud-cpp::texttospeech )

Building this project with MinSizeRel results in an assistant.so of approximately 200MB (google libraries were built shared=off).

My question is: is this normal, or am I doing something wrong (or not doing something right), and should the library size be this large for such basic functionality?

Thank you!

--
Linux x64, gcc 11.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    cpp: operatorGood things for the operator to fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions