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

fix: preserve dependencies between googleapis libs #14894

Merged
merged 11 commits into from
Jan 25, 2023
Merged

fix: preserve dependencies between googleapis libs #14894

merged 11 commits into from
Jan 25, 2023

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Dec 22, 2022

The googleapis package contains over 500 libraries. These libraries depend on each other, and cannot be statically linked successfully if the libraries are out of order.

We use a file in the package to preserve this dependency order. It seems like too much of a maintenance burden to keep such information in the conanfile.py code.

Specify library name and version: googleapis/_

Fixes #14881


The googleapis package contains over 500 libraries. These libraries
depend on each other, and cannot be statically linked successfully
if the libraries are out of order.

We use a file in the package to preserve this dependency order. It
seems like too much of a maintenance burden to keep such information
in the `conanfile.py` code.
@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Dec 22, 2022

I detected other pull requests that are modifying googleapis/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@ghost ghost mentioned this pull request Dec 22, 2022
4 tasks
@conan-center-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

Hooks produced the following warnings for commit 777f3f4
googleapis/cci.20210730
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_devtools_cloudtrace_v1_cloudtrace_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_vision_v1_vision_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_monitored_resource_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1alpha1_conformance_service_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_dayofweek_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_partner_aistreams_v1alpha1_aistreams_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_context_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_timeofday_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_iam_v1_policy_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_system_parameter_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_decimal_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1beta1_eval_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1alpha1_value_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1beta1_decl_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_expr_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_bigtable_v2_bigtable_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_resource_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_spanner_v1_spanner_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_label_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_bigquery_storage_v1beta2_storage_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_endpoint_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_actions_type_datetime_range_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_http_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_control_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_kms_v1_kms_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_visibility_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_quaternion_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_latlng_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_dialogflow_v2_dialogflow_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_httpbody_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_spanner_admin_instance_v1_instance_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_metric_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_iam_v1_iam_policy_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_iam_credentials_v1_credentials_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_interval_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_pubsub_v1_pubsub_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_speech_v1_speech_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_color_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_actions_type_date_range_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_monitoring_dashboard_v1_dashboard_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_config_change_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_maps_routes_v1_routes_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_annotations_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_auth_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_billing_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_quota_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_bigquery_storage_v1beta1_storage_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_storage_v2_storage_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_backend_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_rpc_code_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_distribution_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_geo_type_viewport_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_iam_v1_options_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_logging_type_type_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_iam_admin_v1_admin_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_monitoring_v3_monitoring_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_rpc_status_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_devtools_cloudtrace_v2_cloudtrace_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_datetime_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1beta1_expr_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_launch_stage_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_monitoring_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1alpha1_syntax_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_fraction_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_month_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_money_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_logging_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1alpha1_eval_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_maps_roads_v1op_roads_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_calendar_period_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1alpha1_explain_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_texttospeech_v1_texttospeech_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_usage_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_service_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_longrunning_operations_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_spanner_admin_database_v1_database_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1beta1_source_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_rpc_error_details_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_client_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_field_behavior_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_logging_v2_logging_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_documentation_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_log_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_bigtable_admin_v2_admin_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_source_info_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_cloud_bigquery_storage_v1_storage_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_phone_number_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1alpha1_checked_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_postal_address_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_consumer_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_type_date_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_api_expr_v1beta1_value_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_rpc_context_attribute_context_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libgoogle_storage_v1_storage_proto.so' links to system library 'm' but it is not in cpp_info.system_libs.

@coryan coryan mentioned this pull request Dec 23, 2022
@conan-center-bot

This comment has been minimized.

@coryan coryan marked this pull request as ready for review December 24, 2022 00:19
@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline

All green in build 8 (789b5c1d6c36e9b9dd77c75b6d6290bcb3f43855):

  • googleapis/cci.20220711@:
    All packages built successfully! (All logs)

  • googleapis/cci.20220531@:
    All packages built successfully! (All logs)

  • googleapis/cci.20210730@:
    All packages built successfully! (All logs)

  • googleapis/cci.20211122@:
    All packages built successfully! (All logs)


Conan v2 pipeline (informative, not required for merge)

Failure in build 8 (789b5c1d6c36e9b9dd77c75b6d6290bcb3f43855):

  • googleapis/cci.20220531@:
    Error running command conan export --name googleapis --version cci.20220531 recipes/googleapis/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • googleapis/cci.20211122@:
    Error running command conan export --name googleapis --version cci.20211122 recipes/googleapis/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • googleapis/cci.20210730@:
    Error running command conan export --name googleapis --version cci.20210730 recipes/googleapis/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    
  • googleapis/cci.20220711@:
    Error running command conan export --name googleapis --version cci.20220711 recipes/googleapis/all/conanfile.py:

    ERROR: Error loading conanfile at '/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py': Unable to load conanfile in /home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/home/conan/w/prod-v2_cci_PR-14894/recipes/googleapis/all/conanfile.py", line 6, in <module>
        from conans import CMake, tools
    ImportError: cannot import name 'CMake' from 'conans' (/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/conans/__init__.py)
    

Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@coryan
Copy link
Contributor Author

coryan commented Jan 3, 2023

Ping, this is blocking changes to make google-cloud-cpp usable.

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tricky, but much better than collect_libs. Thank you for your contribution!

@conan-center-bot conan-center-bot merged commit f4a5162 into conan-io:master Jan 25, 2023
@coryan coryan deleted the googleapis-fix-component-dependencies branch January 25, 2023 13:33
StellaSmith pushed a commit to StellaSmith/conan-center-index that referenced this pull request Feb 2, 2023
* fix: preserve dependencies between googleapis libs

The googleapis package contains over 500 libraries. These libraries
depend on each other, and cannot be statically linked successfully
if the libraries are out of order.

We use a file in the package to preserve this dependency order. It
seems like too much of a maintenance burden to keep such information
in the `conanfile.py` code.

* Fix lints

* Implement topological sort

* Lint again

* Weaken type hints

* I was confused, no tsort is needed

* Fix macOS build / workaround for GID_MAX macro

* Fix lint errors

* Fix (I think) warnings about system libraries

* Address review comments

* Fix build
@jcar87
Copy link
Contributor

jcar87 commented Feb 3, 2023

The use of Components has caused issues related to how the resdirs attribute is referenced (both directly and implicitly by Conan generators). We've fixed grpc-proto quickly, but it appears to be causing issues elsewhere.

Ping, this is blocking changes to make google-cloud-cpp usable.

@coryan, I'd be very grateful if you could provide more details as to what was broken with the google-cloud-cpp recipe without the changes in this PR - as we may have to roll back the changes in the package_info until we have an opportunity to investigate.

@coryan
Copy link
Contributor Author

coryan commented Feb 3, 2023

The use of Components has caused issues related to how the resdirs attribute is referenced (both directly and implicitly by Conan generators). We've fixed grpc-proto quickly, but it appears to be causing issues elsewhere.

I am sorry to hear that.

I'd be very grateful if you could provide more details as to what was broken with the google-cloud-cpp recipe without the changes in this PR - as we may have to roll back the changes in the package_info until we have an opportunity to investigate.

The problem is described in #14881 thought maybe in not enough detail. Linking the googleapis::googleapis target did not work in some cases. That is, if your CMake file had something like:

target_link_libraries(my-target PRIVATE googleapis::googleapis)

And you used symbols from (for example) the bigtable protos, your program would not link. In general, if googleapis created lib_aaa_protos.a and lib_bbb_protos.a with the second depending on the first there was no guarantee that the libraries would appear in the right order on the link line. You can easily verify this by changing the googleapis test as described in #14881.

Note that (currently) google-cloud-cpp vendors-in googleapis:

# TODO: Add googleapis once it is available in CCI (now it is embedded)

Before this PR, any attempt to fix that problem was unlikely to work (I think). If google-cloud-cpp tries to use the libraries from googleapis, they will be linked in the wrong order. I am not even sure the google-cloud-cpp recipe works at all at the moment as it pulls grpc, and therefore grpc-proto and therefore googleapis, but also provides its own definitions of the googleapis symbols. I think that explains things like #15082 .

I am not sure these ramblings clarify anything. If they don't please let me know and I will try to help.

FWIW, I have sent #15469 to upgrade googleapis. After that upgrade I will send a PR to fix google-cloud-cpp so it uses googleapis instead of vendoring that in. I mention this because maybe it solves the other problems you are seeing.

@jcar87
Copy link
Contributor

jcar87 commented Feb 3, 2023

Hi @coryan!

Thanks so much for providing more details. This makes perfect sense. If there are tons of libraries, if they have order-dependent linkage, indeed collect_libraries() is not enough to reflect the correct order.
Using components is a sound idea, especially if the dependencies are correctly expressed - it's perhaps the intricacies of resdirs and how the recipe was already used that has become a problem.

The vendoring of .proto files (and their compiled counterparts) in certain libraries is also a known issue that the googleapis recipe was meant to solve.

I do wonder (wild idea), given that the libraries in googleapis are more of a Conan-center specific rather than a global thing, if having a single library for all symbols would be feasible in any way. Having a high number of small libraries is perhaps not the most optimal way (especially if they are shared), but would need to check how these are referred to by other projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[package] googleapis/cci.*: missing dependencies between googleapis libraries
5 participants