Skip to content

Building shared library has been broken after 82e2ac1 / D91009064 #599

@cho-m

Description

@cho-m

This was seen in Homebrew where we provide shared libraries for various weekly tagged Facebook projects.

The build seems to have been broken by the CMake refactoring in 82e2ac1 / D91009064. No issues in mvfst,
fizz, and wangle so the granular CMake targets work there for shared libraries.


Specifically, when attempting a build with -DBUILD_SHARED_LIBS=ON for latest v2026.03.02.00, CMake errors with

CMake Error at proxygen/lib/CMakeLists.txt:117 (target_include_directories):
  target_include_directories may only set INTERFACE properties on INTERFACE
  targets


CMake Error at proxygen/lib/CMakeLists.txt:131 (target_include_directories):
  target_include_directories may only set INTERFACE properties on INTERFACE
  targets


-- Configuring incomplete, errors occurred!

After trying a local fix for above, CMake fails on a new issue for cycle in dependency graph:

CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
  "proxygen" of type SHARED_LIBRARY
    depends on "proxygen_http_http_message_filters_obj" (strong)
    depends on "proxygen_http_client_obj" (strong)
    depends on "proxygen_http_http_connector_with_fizz_obj" (strong)
    depends on "proxygen_http_hq_connector_obj" (strong)
    depends on "proxygen_http_codec_util_obj" (strong)
    depends on "proxygen_http_codec_codec_common_obj" (strong)
    depends on "proxygen_http_codec_http1x_codec_obj" (strong)

...

  "proxygen_hq_server_obj" of type OBJECT_LIBRARY
    depends on "proxygen_http_session_hq_session_obj" (weak)
    depends on "proxygen_http_codec_codec_common_obj" (weak)
    depends on "proxygen" (weak)
    depends on "proxygen_http_codec_compress_hpack_obj" (weak)
    depends on "proxygen_http_codec_util_obj" (weak)

...

    depends on "proxygen_http_session_server_obj" (weak)
    depends on "proxygen_http_codec_codec_factory_obj" (weak)
    depends on "proxygen_http_session_http_session_codec_factory_obj" (weak)
    depends on "proxygen_http_session_hq_downstream_session_obj" (weak)
At least one of these targets is not a STATIC_LIBRARY.  Cyclic dependencies are allowed only among static libraries.
CMake Generate step failed.  Build files cannot be regenerated correctly.

So the changes may only work for static library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions