From 6617b369c0d713d4eb2b82b878dbe7cf60d32c2a Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Thu, 2 Sep 2021 23:50:51 +0200 Subject: [PATCH] tools: add workaround for cpack problem with Cygwin Copy the gml2gv executable to to the gv2gml alias instead of symlinking it. Creating a symlink to gml2gv works fine in itself, but results in an error like this when running cpack: CPack Error: Problem while adding file to archive , ERROR = Unable to read from file 'Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml': Couldn't list extended attributes gv2gml is a symlink. Trying to read the extended attributes manually gives: attr -l /cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml attr_list: Permission denied Could not list /cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml --- cmd/tools/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/tools/CMakeLists.txt b/cmd/tools/CMakeLists.txt index 0a279c047..d66f7d354 100644 --- a/cmd/tools/CMakeLists.txt +++ b/cmd/tools/CMakeLists.txt @@ -123,7 +123,11 @@ tool_defaults(gml2gv) # Aliases to the gml2gv executable (not including '.exe' suffix) list(APPEND gml2gv_aliases gv2gml) -if(WIN32) + +# We use copying instead of symlinking for Cygwin to avoid +# https://gitlab.com/graphviz/graphviz/-/issues/2123 + +if(WIN32 OR CYGWIN) # Copy gml2gv executable to each alias name then install copies to bindir foreach(cmd_alias IN LISTS gml2gv_aliases) set(gml2gvcopy "${CMAKE_CURRENT_BINARY_DIR}/${cmd_alias}${CMAKE_EXECUTABLE_SUFFIX}") -- 2.40.0