helloSystem / Menu

Global menu bar written in Qt
43 stars 14 forks source link

Builds fail #89

Closed stefonarch closed 2 years ago

stefonarch commented 2 years ago
...
...
[100%] Built target Menu
-- GLOB mismatch!
-- GLOB mismatch!
-- Configuring done
CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
  "translations" of type UTILITY
    depends on "Menu_autogen" (strong)
  "resources" of type UTILITY
    depends on "translations" (strong)
  "Menu_autogen" of type UTILITY
    depends on "resources" (strong)
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.
make: *** [Makefile:371: cmake_check_build_system] Error 1
probonopd commented 2 years ago

On FreeBSD too:

[100%] Linking CXX executable Menu
[100%] Built target Menu
make DESTDIR=Menu.AppDir -j$(sysctl -n hw.ncpu) install
-- GLOB mismatch!
-- GLOB mismatch!
-- Configuring done
CMake Error: The inter-target dependency graph contains the following strongly connected component (cycle):
  "translations" of type UTILITY
    depends on "Menu_autogen" (strong)
  "resources" of type UTILITY
    depends on "translations" (strong)
  "Menu_autogen" of type UTILITY
    depends on "resources" (strong)
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.
*** [cmake_check_build_system] Error code 1
make: stopped in /tmp/cirrus-ci-build/build
1 error
make: stopped in /tmp/cirrus-ci-build/build
Exit status: 2

This breaks our CI.

probonopd commented 2 years ago

It broke without the code or Makefile even being touched, only by some changes in translations from Weblate, or from some packages in the FreeBSD build system having been updated?

image

Gotta love it when stuff breaks from one day to the next without you even touching it...

Ideas what might be causing this?

stefonarch commented 2 years ago

No idea, FYI on arch also previous checkouts fail identically.

probonopd commented 2 years ago

That might indicate that newer versions of CMake fail building it while older ones worked. Just speculating. Maybe @TheAssassin can spot my stupid mistake?

TheAssassin commented 2 years ago

It's pretty obvious: you managed to create a cyclic dependency. Target A depends on B, which depends on C, which depends on A. You need to break the cycle.

Also, it builds just fine with CMake version 3.21.4 on my computer. You need to provide complete build logs including the configuration if you want someone to have a look.

probonopd commented 2 years ago

Probably here?

https://github.com/helloSystem/Menu/blob/2d74201083e88a63a32357029716ea24bb0501a4/src/CMakeLists.txt#L49-L64

TheAssassin commented 2 years ago

You need to generate a targets graph and post it. Something along these lines should do the trick:

# of course, you should run this in your existing build dir, not the source dir
# one you ran CMake pointing to a source dir, you can re-run it just fine pointing to the build dir only
cmake . --graphviz=test.graph && dot -Tsvg test.graph > test.svg
probonopd commented 2 years ago

On my local system:

test

digraph "Menu" {
node [
  fontsize = "12"
];
subgraph clusterLegend {
  label = "Legend";
  color = black;
  edge [ style = invis ];
  legendNode0 [ label = "Executable", shape = egg ];
  legendNode1 [ label = "Static Library", shape = octagon ];
  legendNode2 [ label = "Shared Library", shape = doubleoctagon ];
  legendNode3 [ label = "Module Library", shape = tripleoctagon ];
  legendNode4 [ label = "Interface Library", shape = pentagon ];
  legendNode5 [ label = "Object Library", shape = hexagon ];
  legendNode6 [ label = "Unknown Library", shape = septagon ];
  legendNode7 [ label = "Custom Target", shape = box ];
  legendNode0 -> legendNode1 [ style = solid ];
  legendNode0 -> legendNode2 [ style = solid ];
  legendNode0 -> legendNode3;
  legendNode1 -> legendNode4 [ label = "Interface", style = dashed ];
  legendNode2 -> legendNode5 [ label = "Private", style = dotted ];
  legendNode3 -> legendNode6 [ style = solid ];
  legendNode0 -> legendNode7;
}
    "node0" [ label = "Menu", shape = egg ];
    "node1" [ label = "-L/usr/local/lib", shape = septagon ];
    "node0" -> "node1" [ style = dotted ] // Menu -> -L/usr/local/lib
    "node2" [ label = "-lXcomposite", shape = septagon ];
    "node0" -> "node2" [ style = dotted ] // Menu -> -lXcomposite
    "node3" [ label = "/usr/local/lib/libICE.so", shape = septagon ];
    "node0" -> "node3" [ style = dotted ] // Menu -> /usr/local/lib/libICE.so
    "node4" [ label = "/usr/local/lib/libSM.so", shape = septagon ];
    "node0" -> "node4" [ style = dotted ] // Menu -> /usr/local/lib/libSM.so
    "node5" [ label = "/usr/local/lib/libX11.so", shape = septagon ];
    "node0" -> "node5" [ style = dotted ] // Menu -> /usr/local/lib/libX11.so
    "node6" [ label = "/usr/local/lib/libXext.so", shape = septagon ];
    "node0" -> "node6" [ style = dotted ] // Menu -> /usr/local/lib/libXext.so
    "node7" [ label = "/usr/local/lib/libxcb-damage.so", shape = septagon ];
    "node0" -> "node7" [ style = dotted ] // Menu -> /usr/local/lib/libxcb-damage.so
    "node8" [ label = "/usr/local/lib/libxcb-util.so", shape = septagon ];
    "node0" -> "node8" [ style = dotted ] // Menu -> /usr/local/lib/libxcb-util.so
    "node9" [ label = "/usr/local/lib/libxcb.so", shape = septagon ];
    "node0" -> "node9" [ style = dotted ] // Menu -> /usr/local/lib/libxcb.so
    "node10" [ label = "KF5::DBusAddons", shape = doubleoctagon ];
    "node11" [ label = "Qt5::DBus", shape = doubleoctagon ];
    "node12" [ label = "Qt5::Core", shape = doubleoctagon ];
    "node11" -> "node12" [ style = dashed ] // Qt5::DBus -> Qt5::Core
    "node10" -> "node11" [ style = dashed ] // KF5::DBusAddons -> Qt5::DBus
    "node0" -> "node10" [ style = dotted ] // Menu -> KF5::DBusAddons
    "node13" [ label = "KF5::WindowSystem", shape = doubleoctagon ];
    "node14" [ label = "Qt5::Gui", shape = doubleoctagon ];
    "node14" -> "node12" [ style = dashed ] // Qt5::Gui -> Qt5::Core
    "node13" -> "node14" [ style = dashed ] // KF5::WindowSystem -> Qt5::Gui
    "node15" [ label = "Qt5::Widgets", shape = doubleoctagon ];
    "node15" -> "node12" [ style = dashed ] // Qt5::Widgets -> Qt5::Core
    "node15" -> "node14" [ style = dashed ] // Qt5::Widgets -> Qt5::Gui
    "node13" -> "node15" [ style = dashed ] // KF5::WindowSystem -> Qt5::Widgets
    "node16" [ label = "X11::X11", shape = septagon ];
    "node13" -> "node16" [ style = dashed ] // KF5::WindowSystem -> X11::X11
    "node0" -> "node13" [ style = dotted ] // Menu -> KF5::WindowSystem
    "node17" [ label = "Qt5::Concurrent", shape = doubleoctagon ];
    "node17" -> "node12" [ style = dashed ] // Qt5::Concurrent -> Qt5::Core
    "node18" [ label = "Qt5::Network", shape = doubleoctagon ];
    "node18" -> "node12" [ style = dashed ] // Qt5::Network -> Qt5::Core
    "node19" [ label = "Qt5::X11Extras", shape = doubleoctagon ];
    "node19" -> "node12" [ style = dashed ] // Qt5::X11Extras -> Qt5::Core
    "node19" -> "node14" [ style = dashed ] // Qt5::X11Extras -> Qt5::Gui
    "node20" [ label = "Qt5::moc", shape = egg ];
    "node21" [ label = "Qt5::lrelease", shape = egg ];
    "node22" [ label = "Qt5::lupdate", shape = egg ];
    "node0" -> "node17" [ style = dotted ] // Menu -> Qt5::Concurrent
    "node0" -> "node11" [ style = dotted ] // Menu -> Qt5::DBus
    "node0" -> "node18" [ style = dotted ] // Menu -> Qt5::Network
    "node0" -> "node15" [ style = dotted ] // Menu -> Qt5::Widgets
    "node0" -> "node19" [ style = dotted ] // Menu -> Qt5::X11Extras
    "node23" [ label = "Qt5::rcc", shape = egg ];
    "node0" -> "node23"  // Menu -> Qt5::rcc
    "node24" [ label = "X11", shape = septagon ];
    "node0" -> "node24" [ style = dotted ] // Menu -> X11
    "node25" [ label = "Xdamage", shape = septagon ];
    "node0" -> "node25" [ style = dotted ] // Menu -> Xdamage
    "node26" [ label = "Xfixes", shape = septagon ];
    "node0" -> "node26" [ style = dotted ] // Menu -> Xfixes
    "node27" [ label = "Xrender", shape = septagon ];
    "node0" -> "node27" [ style = dotted ] // Menu -> Xrender
    "node28" [ label = "xcb", shape = septagon ];
    "node0" -> "node28" [ style = dotted ] // Menu -> xcb
    "node29" [ label = "xcb-ewmh", shape = septagon ];
    "node0" -> "node29" [ style = dotted ] // Menu -> xcb-ewmh
    "node30" [ label = "datetime", shape = doubleoctagon ];
    "node30" -> "node15" [ style = dotted ] // datetime -> Qt5::Widgets
    "node31" [ label = "statusnotifier", shape = doubleoctagon ];
    "node31" -> "node17" [ style = dotted ] // statusnotifier -> Qt5::Concurrent
    "node31" -> "node11" [ style = dotted ] // statusnotifier -> Qt5::DBus
    "node31" -> "node15" [ style = dotted ] // statusnotifier -> Qt5::Widgets
    "node31" -> "node19" [ style = dotted ] // statusnotifier -> Qt5::X11Extras
    "node32" [ label = "dbusmenu-qt5", shape = doubleoctagon ];
    "node32" -> "node12" [ style = dashed ] // dbusmenu-qt5 -> Qt5::Core
    "node32" -> "node11" [ style = dashed ] // dbusmenu-qt5 -> Qt5::DBus
    "node32" -> "node14" [ style = dashed ] // dbusmenu-qt5 -> Qt5::Gui
    "node32" -> "node15" [ style = dashed ] // dbusmenu-qt5 -> Qt5::Widgets
    "node31" -> "node32" [ style = dotted ] // statusnotifier -> dbusmenu-qt5
    "node33" [ label = "volume", shape = doubleoctagon ];
    "node33" -> "node12" [ style = dotted ] // volume -> Qt5::Core
    "node33" -> "node11" [ style = dotted ] // volume -> Qt5::DBus
    "node33" -> "node14" [ style = dotted ] // volume -> Qt5::Gui
    "node33" -> "node15" [ style = dotted ] // volume -> Qt5::Widgets
}