gammasoft71/xtd

[BUG] ubuntu build failed with -DXTD_BUILD_SHARED_LIBRARIES=ON

Closed this issue · 2 comments

Describe the bug

when I build the xtd shared library, it shows Cyclic dependencies error.

To Reproduce

the build command is

/usr/local/bin/cmake -DXTD_BUILD_TOOLS=OFF -DXTD_NATIVE_GRAPHIC_TOOLKIT=wxwidgets -DXTD_BUILD_SHARED_LIBRARIES=ON -DXTD_INSTALL_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=/home/bennyWU/.xmake/packages/x/xtd/v0.1.2/6f7b1ebf7d16403bb918df2accf2ff72 -DCMAKE_INSTALL_LIBDIR:PATH=lib -G "Unix Makefiles" -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_STATIC_LINKER_FLAGS_RELEASE= "-DCMAKE_C_FLAGS_RELEASE= -O3 -DNDEBUG" -DCMAKE_SHARED_LINKER_FLAGS_RELEASE= -DCMAKE_EXE_LINKER_FLAGS_RELEASE= "-DCMAKE_CXX_FLAGS_RELEASE= -O3 -DNDEBUG" /home/bennyWU/.xmake/cache/packages/2409/x/xtd/v0.1.2/source

Screenshots

The error message appears as follows.

CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
"xtd.core.native.unix" of type SHARED_LIBRARY
depends on "xtd.core" (weak)
"xtd.core" of type SHARED_LIBRARY
depends on "xtd.core.native.unix" (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.

image

the xtd.core CMakeLists.txt

image

Desktop (please complete the following information)

  • OS: Ubuntu
  • Version: 20.04.6 LTS
  • xtd version: 0.1.2

First of all, thank you for your interest in xtd.
Indeed you are right. I will see it

Hello, can you check if this works for you?