]> granicus.if.org Git - graphviz/log
graphviz
23 months agosmyrna glcreate_gl_topview_menu: squash -Wfloat-conversion warning
Matthew Fernandez [Sat, 14 Jan 2023 04:57:00 +0000 (20:57 -0800)]
smyrna glcreate_gl_topview_menu: squash -Wfloat-conversion warning

23 months agotclpkg insert_poly: remove shadowing of 'polyid'
Matthew Fernandez [Sat, 14 Jan 2023 04:41:25 +0000 (20:41 -0800)]
tclpkg insert_poly: remove shadowing of 'polyid'

23 months agotclpkg remove_poly: remove shadowing of 'polyid'
Matthew Fernandez [Sat, 14 Jan 2023 04:40:49 +0000 (20:40 -0800)]
tclpkg remove_poly: remove shadowing of 'polyid'

23 months agotclpkg Plegal_arrangement: remove shadowing of 'i'
Matthew Fernandez [Sat, 14 Jan 2023 04:39:11 +0000 (20:39 -0800)]
tclpkg Plegal_arrangement: remove shadowing of 'i'

23 months agoMerge branch 'smattr/gitlab-2340' into 'main'
Matthew Fernandez [Sun, 15 Jan 2023 16:58:53 +0000 (16:58 +0000)]
Merge branch 'smattr/gitlab-2340' into 'main'

Autotools: fix non-portable syntax in configure.ac

Closes #2340

See merge request graphviz/graphviz!3049

23 months agoMerge branch 'smattr/gitlab-1950' into 'main'
Matthew Fernandez [Sat, 14 Jan 2023 18:45:15 +0000 (18:45 +0000)]
Merge branch 'smattr/gitlab-1950' into 'main'

migrate some 'sprintf' to agxbufs

See merge request graphviz/graphviz!3036

23 months agopack: remove some unhelpful comments
Matthew Fernandez [Mon, 2 Jan 2023 03:17:01 +0000 (19:17 -0800)]
pack: remove some unhelpful comments

23 months agopack: use an agxbuf to simplify some code
Matthew Fernandez [Mon, 2 Jan 2023 02:47:13 +0000 (18:47 -0800)]
pack: use an agxbuf to simplify some code

Gitlab: #1950

23 months agocore plugin mp_bezier: use an agxbuf to simplify some code
Matthew Fernandez [Mon, 2 Jan 2023 02:47:13 +0000 (18:47 -0800)]
core plugin mp_bezier: use an agxbuf to simplify some code

Gitlab: #1950

23 months agocore plugin fig_bezier: use an agxbuf to simplify some code
Matthew Fernandez [Mon, 2 Jan 2023 02:47:13 +0000 (18:47 -0800)]
core plugin fig_bezier: use an agxbuf to simplify some code

Gitlab: #1950

23 months agosfdpgen spring_electrical_spring_embedding: use an agxbuf instead of 'sprintf'
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_electrical_spring_embedding: use an agxbuf instead of 'sprintf'

This leads to less manual memory management and fewer problems to think about.

Gitlab: #1950

23 months agosfdpgen spring_maxent_embedding: use an agxbuf instead of 'sprintf'
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_maxent_embedding: use an agxbuf instead of 'sprintf'

This leads to less manual memory management and fewer problems to think about.

Gitlab: #1950

23 months agosfdpgen spring_electrical_embedding: use an agxbuf instead of 'sprintf'
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_electrical_embedding: use an agxbuf instead of 'sprintf'

This leads to less manual memory management and fewer problems to think about.

Gitlab: #1950

23 months agosfdpgen spring_electrical_embedding_slow: use an agxbuf instead of 'sprintf'
Matthew Fernandez [Mon, 2 Jan 2023 02:39:27 +0000 (18:39 -0800)]
sfdpgen spring_electrical_embedding_slow: use an agxbuf instead of 'sprintf'

This leads to less manual memory management and fewer problems to think about.

Gitlab: #1950

23 months agoMerge branch 'smattr/19e55e10-d4ef-4070-aefe-5dfc4817aa48' into 'main'
Matthew Fernandez [Sat, 14 Jan 2023 17:54:55 +0000 (17:54 +0000)]
Merge branch 'smattr/19e55e10-d4ef-4070-aefe-5dfc4817aa48' into 'main'

squash compiler warnings in release mode

See merge request graphviz/graphviz!3047

23 months agoadd a CHANGELOG entry for the prior change
Matthew Fernandez [Sat, 14 Jan 2023 17:18:47 +0000 (09:18 -0800)]
add a CHANGELOG entry for the prior change

Gitlab: fixes #2340

23 months agogvmap plot_dot_polygons: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:09:33 +0000 (08:09 -0800)]
gvmap plot_dot_polygons: squash -Wunused-variable warning in release mode

23 months agocore plugin core_loadimage_vrml: squash warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:04:47 +0000 (08:04 -0800)]
core plugin core_loadimage_vrml: squash warning in release mode

This triggered -Wunused-variable warnings.

23 months agosparse SparseMatrix_distance_matrix: squash warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:02:31 +0000 (08:02 -0800)]
sparse SparseMatrix_distance_matrix: squash warning in release mode

This code triggered a -Wunused-variable warning.

23 months agosparse get_mq: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:01:53 +0000 (08:01 -0800)]
sparse get_mq: squash -Wunused-variable warning in release mode

23 months agosparse BinaryHeap_sanity_check: squash warnings in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:00:59 +0000 (08:00 -0800)]
sparse BinaryHeap_sanity_check: squash warnings in release mode

This code triggered -Wunused-variable warnings.

23 months agosparse BinaryHeap_insert: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 16:00:40 +0000 (08:00 -0800)]
sparse BinaryHeap_insert: squash -Wunused-variable warning in release mode

23 months agomindle agglomerative_ink_bundling_internal: squash warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 15:58:24 +0000 (07:58 -0800)]
mindle agglomerative_ink_bundling_internal: squash warning in release mode

When building in release mode, this causes a -Wunused-variable warning.

23 months agocgraph: remove advice about '[[maybe_unused]]'
Matthew Fernandez [Tue, 10 Jan 2023 15:57:43 +0000 (07:57 -0800)]
cgraph: remove advice about '[[maybe_unused]]'

This attribute was only introduced in C++17 and we currently build with C++11.

23 months agodotgen dot_position: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 15:55:16 +0000 (07:55 -0800)]
dotgen dot_position: squash -Wunused-variable warning in release mode

23 months agodotgen find_fast_node: squash -Wunused-function warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 15:54:21 +0000 (07:54 -0800)]
dotgen find_fast_node: squash -Wunused-function warning in release mode

23 months agolabel xlhdxunload: squash -Wunused-variable warning in release mode
Matthew Fernandez [Tue, 10 Jan 2023 15:51:59 +0000 (07:51 -0800)]
label xlhdxunload: squash -Wunused-variable warning in release mode

23 months agoMerge branch 'libtgs_cmake' into 'main'
Matthew Fernandez [Sat, 14 Jan 2023 17:03:49 +0000 (17:03 +0000)]
Merge branch 'libtgs_cmake' into 'main'

CMake: Add support for GNU Triangulated Surface Library

See merge request graphviz/graphviz!3046

23 months agoAutotools: fix non-portable syntax in configure.ac
Michael Bäuerle [Thu, 12 Jan 2023 11:25:00 +0000 (03:25 -0800)]
Autotools: fix non-portable syntax in configure.ac

23 months agoCMake: Add support for GNU Triangulated Surface Library
Nehal J Wani [Tue, 16 Feb 2021 23:38:18 +0000 (18:38 -0500)]
CMake: Add support for GNU Triangulated Surface Library

23 months agoMerge branch 'smattr/eb51b011-0635-4094-b688-4749080dba5c' into 'main'
Matthew Fernandez [Mon, 9 Jan 2023 15:43:47 +0000 (15:43 +0000)]
Merge branch 'smattr/eb51b011-0635-4094-b688-4749080dba5c' into 'main'

CMake: enable LTO in release mode

See merge request graphviz/graphviz!3045

23 months agoMerge branch 'smattr/gitlab-1999' into 'main'
Matthew Fernandez [Sun, 8 Jan 2023 21:41:05 +0000 (21:41 +0000)]
Merge branch 'smattr/gitlab-1999' into 'main'

twopi: fix crash with > 65535 nodes

Closes #1999

See merge request graphviz/graphviz!3017

23 months agoCMake: enable LTO in release mode
Matthew Fernandez [Sun, 8 Jan 2023 20:16:41 +0000 (12:16 -0800)]
CMake: enable LTO in release mode

Link-Time Optimization (LTO) is a mechanism that enables the compiler to
optimize across translation unit boundaries. In particular, it enables
cross-file function inlining. This is present and mature in the majority of
contemporary compilers and switching it on has few downsides.

Some performance numbers:

  ┌───────┬──────────────────┬──────────────────┬──────┐
  │       │ before           │ after            │ diff │
  ╞═══════╪══════════════════╪══════════════════╪══════╡
  │ 1652¹ │ 17.88s           │ 17.85s           │  -0% │
  │       │ 50.4MB peak RSS  │ 50.5MB peak RSS  │  +0% │
  ├───────┼──────────────────┼──────────────────┼──────┤
  │ 1718² │ 2m21s            │ 2m13s            │  -6% │
  │       │ 15.8MB peak RSS  │ 15.9 MB peak RSS │  +1% │
  ├───────┼──────────────────┼──────────────────┼──────┤
  │ 1864³ │ 13.26s           │ 13.07s           │  -1% │
  │       │ 462.0MB peak RSS │ 461.8MB peak RSS │  -0% │
  ├───────┼──────────────────┼──────────────────┼──────┤
  │ 2064⁴ │ 11m42s           │ 11m30s           │  -2% │
  │       │ 1.26GB peak RSS  │ 1.26GB peak RSS  │  -0% │
  ├───────┼──────────────────┼──────────────────┼──────┤
  │ 2095⁵ │ 2m18s            │ 2m19s            │  +1% │
  │       │ 92.3MB peak RSS  │ 92.1MB peak RSS  │  -0% │
  └───────┴──────────────────┴──────────────────┴──────┘

¹ The test case from https://gitlab.com/graphviz/graphviz/-/issues/1652 run as
  `neato -Tsvg -o /dev/null 1652.dot`.
² swedish-flat.dot Magnus attached to
  https://gitlab.com/graphviz/graphviz/-/issues/1718 run as
  `circo -Tsvg -o /dev/null swedish-flag.dot`.
³ The test case from https://gitlab.com/graphviz/graphviz/-/issues/1864 run as
  `twopi -Tsvg -o /dev/null 1864.dot`.
⁴ The test case from https://gitlab.com/graphviz/graphviz/-/issues/2064 run as
  `dot -Gnslimit=2 -Gnslimit1=2 -Gmaxiter=5000 -Tsvg -o /dev/null 2064.dot`.
⁵ The tests/2095.dot test case from prior to minimization
  (3819821ea70fae730dd224936628ed3929b03531). Run as
  `dot -Tsvg -o /dev/null 2095.dot`.

23 months agopathplan: replace unchecked allocation calls with cgraph wrappers
Matthew Fernandez [Mon, 26 Dec 2022 05:41:23 +0000 (21:41 -0800)]
pathplan: replace unchecked allocation calls with cgraph wrappers

After the prior UB fixes, the #1999 example bottoms out in this code, failing
the second allocation call while trying to allocate ~938GB. The return values
for neither of these calls were checked, resulting in messy crashes when
scenarios like this occurred. This change swaps them for calls to the cgraph
allocation wrappers that exit gracefully on out-of-memory conditions.

Gitlab: #1999

23 months agopathplan: fix integer overflow with > 46341 nodes
Matthew Fernandez [Sun, 25 Dec 2022 20:39:16 +0000 (12:39 -0800)]
pathplan: fix integer overflow with > 46341 nodes

After this change, a ASan+UBSan build of Graphviz can process the #1999 example
without crashing. Graphs with >46341 (⌈√INT_MAX⌉) nodes no longer cause an
integer overflow.

Gitlab: fixes #1999
Reported-by: Lockywolf
23 months agotwopi: fix crash with > 46341 nodes
Matthew Fernandez [Sun, 25 Dec 2022 20:25:49 +0000 (12:25 -0800)]
twopi: fix crash with > 46341 nodes

UBSan revealed the graph attached to #1999 was triggering an integer overflow in
this multiplication, later on causing a crash in `twopi`. Any number of nodes
≥⌈√INT_MAX⌉ exceeds INT_MAX during multiplication. This fix still does not
enable the graph to be processed in a reasonable amount of time, and it still
crashes later after several hours due to another integer overflow.

Gitlab: #1999

23 months agoMerge branch 'smattr/959ab28c-7e08-479f-94da-0bbebf3fee2b' into 'main'
Matthew Fernandez [Sun, 8 Jan 2023 20:44:45 +0000 (20:44 +0000)]
Merge branch 'smattr/959ab28c-7e08-479f-94da-0bbebf3fee2b' into 'main'

expr: remove some variable shadowing

See merge request graphviz/graphviz!3038

23 months agoexpr exeval: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:27:31 +0000 (20:27 -0800)]
expr exeval: remove shadowing of 'expr' global

23 months agoexpr eval: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:26:55 +0000 (20:26 -0800)]
expr eval: remove shadowing of 'expr' global

23 months agoexpr xPrint: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:25:32 +0000 (20:25 -0800)]
expr xPrint: remove shadowing of 'expr' global

23 months agoexpr xConvert: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:25:01 +0000 (20:25 -0800)]
expr xConvert: remove shadowing of 'expr' global

23 months agoexpr exsubstr: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:24:29 +0000 (20:24 -0800)]
expr exsubstr: remove shadowing of 'expr' global

23 months agoexpr exsub: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:23:55 +0000 (20:23 -0800)]
expr exsub: remove shadowing of 'expr' global

23 months agoexpr extokens: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:22:56 +0000 (20:22 -0800)]
expr extokens: remove shadowing of 'expr' global

23 months agoexpr exsplit: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:22:16 +0000 (20:22 -0800)]
expr exsplit: remove shadowing of 'expr' global

23 months agoexpr exdump: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:18:32 +0000 (20:18 -0800)]
expr exdump: remove shadowing of 'expr' global

23 months agoexpr exccopen: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:18:02 +0000 (20:18 -0800)]
expr exccopen: remove shadowing of 'expr' global

23 months agoexpr gen: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:17:06 +0000 (20:17 -0800)]
expr gen: remove shadowing of 'expr' global

23 months agoexpr scan: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:14:54 +0000 (20:14 -0800)]
expr scan: remove shadowing of 'expr' global

23 months agoexpr print: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:14:10 +0000 (20:14 -0800)]
expr print: remove shadowing of 'expr' global

23 months agoexpr scan: remove shadowing of 'expr' global
Matthew Fernandez [Wed, 4 Jan 2023 04:13:11 +0000 (20:13 -0800)]
expr scan: remove shadowing of 'expr' global

23 months agoexpr scan: cast 'integer' field when accessing file handles
Matthew Fernandez [Wed, 4 Jan 2023 04:09:36 +0000 (20:09 -0800)]
expr scan: cast 'integer' field when accessing file handles

Squashes 2 -Wsign-conversion warnings. These values are known to be in range
here.

23 months agoortho: use zero initialization for 'boxf' variables
Matthew Fernandez [Wed, 4 Jan 2023 03:52:39 +0000 (19:52 -0800)]
ortho: use zero initialization for 'boxf' variables

This was phrased as `{{0}}` to avoid a compiler warning on CentOS 7 about the
LHS being a nested struct. However it turns out this is a false positive in
older versions of GCC, and this form of zero initialization should be valid for
any aggregate in C99. Accordingly _newer_ versions of GCC warn if you use this
double braced phrasing. This change switches to the more standard C99
initialization, squashing warnings on newer platforms at the expense of
reintroducing some warnings on CentOS 7.

23 months agoMerge branch 'smattr/73d72b6c-4de5-482e-a999-b1c1734f172b' into 'main'
Matthew Fernandez [Sun, 8 Jan 2023 19:56:13 +0000 (19:56 +0000)]
Merge branch 'smattr/73d72b6c-4de5-482e-a999-b1c1734f172b' into 'main'

sparse Multilevel_MQ_Clustering_establish: replace linked-list with generic list

See merge request graphviz/graphviz!3033

23 months agosparse QuadTree_get_nearest_internal: remove redundant branch
Matthew Fernandez [Sun, 1 Jan 2023 21:43:33 +0000 (13:43 -0800)]
sparse QuadTree_get_nearest_internal: remove redundant branch

23 months agosparse QuadTree_get_supernodes_internal: remove redundant branch
Matthew Fernandez [Sun, 1 Jan 2023 21:17:52 +0000 (13:17 -0800)]
sparse QuadTree_get_supernodes_internal: remove redundant branch

23 months agosparse Multilevel_MQ_Clustering_establish: replace linked-list with generic list
Matthew Fernandez [Sun, 1 Jan 2023 21:07:39 +0000 (13:07 -0800)]
sparse Multilevel_MQ_Clustering_establish: replace linked-list with generic list

Linked-lists are a common option for implementing dynamic arrays in C. However
on contemporary platforms they have poor performance characteristics. The need
to allocate on every element addition and the pointer chasing involved in
traversing the list pollutes caches and degrades branch prediction.

This change swaps the use of a linked-list for a contiguous array that is
expanded on demand in the manner of C++’s `std::vector`. Traversal is cheap and
the amortized element addition cost is low.

The previous code prepended to linked-lists and then traversed them from
beginning to end. The new code flips this and appends to the lists and then
traverses them from end to beginning in order to preserve the ordering.

While making this change, we also replace the use of a common/memory.h
allocation wrapper with a cgraph/alloc.h one.

23 months agoMerge branch 'smattr/c3ea7753-28f3-4b52-abcc-db85e741ceca' into 'main'
Matthew Fernandez [Sun, 8 Jan 2023 16:45:00 +0000 (16:45 +0000)]
Merge branch 'smattr/c3ea7753-28f3-4b52-abcc-db85e741ceca' into 'main'

remove unnecessary casts when calling 'AGATTRWF'

See merge request graphviz/graphviz!3040

23 months agoremove unnecessary casts when calling 'AGATTRWF'
Matthew Fernandez [Thu, 5 Jan 2023 15:55:07 +0000 (07:55 -0800)]
remove unnecessary casts when calling 'AGATTRWF'

23 months agoMerge branch 'smattr/gitlab-1618' into 'main'
Matthew Fernandez [Sun, 8 Jan 2023 05:11:19 +0000 (05:11 +0000)]
Merge branch 'smattr/gitlab-1618' into 'main'

add '--version' and '--help' command line options

Closes #1618

See merge request graphviz/graphviz!3042

23 months agoimplement '--help' as an alias for '-?'
Matthew Fernandez [Fri, 6 Jan 2023 06:01:00 +0000 (22:01 -0800)]
implement '--help' as an alias for '-?'

Gitlab: closes #1618
Reported-by: Basile Starynkevitch <basile@starynkevitch.net>
23 months agoimplement '--version' as an alias for '-V'
Matthew Fernandez [Fri, 6 Jan 2023 06:01:00 +0000 (22:01 -0800)]
implement '--version' as an alias for '-V'

Gitlab: #1618

23 months agoadd a test case for #1618
Matthew Fernandez [Fri, 6 Jan 2023 05:45:23 +0000 (21:45 -0800)]
add a test case for #1618

Gitlab: #1618

23 months agoMerge branch 'cross' into 'main'
Matthew Fernandez [Sun, 8 Jan 2023 00:35:30 +0000 (00:35 +0000)]
Merge branch 'cross' into 'main'

Autotools: Make ann file check cross-compilation friendly

Closes #2335

See merge request graphviz/graphviz!3043

23 months agoadd a changelog entry for the prior fix
Matthew Fernandez [Sat, 7 Jan 2023 22:54:43 +0000 (14:54 -0800)]
add a changelog entry for the prior fix

Gitlab: #2335

23 months agoAutotools: Make ann file check cross-compilation friendly
Nehal J Wani [Sat, 7 Jan 2023 11:41:40 +0000 (11:41 +0000)]
Autotools: Make ann file check cross-compilation friendly

Resolves https://gitlab.com/graphviz/graphviz/-/issues/2335

23 months agoMerge branch 'gvplugin_webp' into 'main'
Matthew Fernandez [Sat, 7 Jan 2023 22:52:39 +0000 (22:52 +0000)]
Merge branch 'gvplugin_webp' into 'main'

Specify __dllspec specification for gvplugin_webp

See merge request graphviz/graphviz!3028

23 months agoSpecify __dllspec specification for gvplugin_webp
Nehal J Wani [Fri, 30 Dec 2022 22:52:09 +0000 (22:52 +0000)]
Specify __dllspec specification for gvplugin_webp

This ensures that the import library is created on Windows

23 months agoMerge branch 'smattr/f383f87f-8260-4e85-acfd-26a2ade8605f' into 'main'
Matthew Fernandez [Fri, 6 Jan 2023 06:33:15 +0000 (06:33 +0000)]
Merge branch 'smattr/f383f87f-8260-4e85-acfd-26a2ade8605f' into 'main'

Start 7.0.7 development

See merge request graphviz/graphviz!3041

23 months agoStart 7.0.7 development
Matthew Fernandez [Fri, 6 Jan 2023 05:15:36 +0000 (21:15 -0800)]
Start 7.0.7 development

23 months agoMerge branch 'smattr/006bd60d-8175-437b-aa06-b6679d85b958' into 'main'
Matthew Fernandez [Fri, 6 Jan 2023 05:13:49 +0000 (05:13 +0000)]
Merge branch 'smattr/006bd60d-8175-437b-aa06-b6679d85b958' into 'main'

Stable Release 7.0.6

See merge request graphviz/graphviz!3025

23 months agoStable Release 7.0.6
Matthew Fernandez [Fri, 30 Dec 2022 18:54:49 +0000 (10:54 -0800)]
Stable Release 7.0.6

23 months agoMerge branch 'smattr/gitlab-1131' into 'main'
Matthew Fernandez [Thu, 5 Jan 2023 02:50:39 +0000 (02:50 +0000)]
Merge branch 'smattr/gitlab-1131' into 'main'

remove webdot

Closes #1131, #1048, and #934

See merge request graphviz/graphviz!3039

23 months agoremove webdot
Matthew Fernandez [Thu, 5 Jan 2023 01:18:16 +0000 (17:18 -0800)]
remove webdot

Gitlab: closes #934, closes #1048, closes #1131

23 months agoMerge branch 'link-lib' into 'main' 1918-feature-request-subgraph-as-a-node
Mark Hansen [Tue, 3 Jan 2023 08:55:45 +0000 (08:55 +0000)]
Merge branch 'link-lib' into 'main'

dot_builtins: pass full path to GTS library to clang

Closes #2334

See merge request graphviz/graphviz!3035

23 months agodot_builtins: pass full path to GTS library to clang
Mark Hansen [Mon, 2 Jan 2023 03:10:44 +0000 (14:10 +1100)]
dot_builtins: pass full path to GTS library to clang

Clang was having trouble finding homebrew GTS on my macOS.

This is similar to a series of other changes I made to fix cmake builds
on macOS previously (search the codebase for _LINK_LIBRARIES).

Fixes #2334

23 months agoMerge branch 'smattr/gitlab-2233' into 'main'
Matthew Fernandez [Tue, 3 Jan 2023 05:10:06 +0000 (05:10 +0000)]
Merge branch 'smattr/gitlab-2233' into 'main'

Autotools: look for Qt6 in preference to Qt5

Closes #2233

See merge request graphviz/graphviz!3030

23 months agoAutotools: look for Qt6 in preference to Qt5
Matthew Fernandez [Sat, 31 Dec 2022 22:12:39 +0000 (14:12 -0800)]
Autotools: look for Qt6 in preference to Qt5

This is the equivalent of 743aed2fea0206827294c9efa6ab117a2ba8dceb, but for the
Autotools build system.

Qt6 no longer ships with pkg-config (.pc) file(s). So we need to do manual
discovery of the necessary information ourselves.

QMake is called `qtmake6` in Qt6 and the `qtmake` that ships with it is a
symlink to the former. So this change preferences Qt6 if both Qt5 and Qt6 are
installed.

Some notable warts:

  1. Discovery uses `AC_CHECK_FILE` rather than
     `AC_CHECK_HEADER`/`AC_CHECK_HEADERS`. The latter seems to exclusively call
     the C compiler rather than the C++ compiler, and thus cannot be used for
     C++ header discovery.¹ A consequence of this choice is that discovery
     checks existence only, not whether the headers are usable.

  2. Library discovery also uses `AC_CHECK_FILE` rather than `AC_CHECK_LIB`.
     Given the above restriction, if we cannot call the C++ compiler, there is
     little point in attempting a link check. But this does mean that discovery
     here also only checks existence, not whether the libraries are usable.

  3. There seems to be no pkg-config-like mechanism for discovering that e.g.
     Qt6Widgets and Qt6PrintSupport depend on Qt6Gui and thus `-lQt6Gui.so` must
     also be included in the link line. Qt6 has migrated to a CMake-based build
     system and their answer to most of these such problems appears to be “move
     to CMake.”² This change just hard codes the link lines under the assumption
     these will be stable across the Qt6 series.

  4. Qt6 requires C++17,³ so we need to switch from C++11 to C++17 mode when
     `--with-qt=yes`. The CMake discovery apparently does this automatically.

  5. The `QT_SELECT` environment variable does nothing in Qt6. The line using it
     in cmd/gvedit/Makefile.am has been left unchanged in this commit. When
     using Qt5 it still avoids accidentally picking up Qt4 and when using Qt6 it
     is a no-op.

Gitlab: closes #2233

¹ If accurate, this would also explain the difficulty I had in
  https://gitlab.com/graphviz/graphviz/-/issues/1835#note_794857735.
² https://www.qt.io/blog/qt-6-build-system
  https://doc.qt.io/qt-6/qt6-buildsystem.html
³ https://www.qt.io/blog/2019/08/07/technical-vision-qt-6
  https://www.qt.io/blog/qt-6.0-released

23 months agoAutotools: import C++17 macro from Autoconf archive
Matthew Fernandez [Sat, 31 Dec 2022 22:10:50 +0000 (14:10 -0800)]
Autotools: import C++17 macro from Autoconf archive

This commit imports m4/ax_cxx_compile_stdcxx_17.m4 from commit
da89908ef7d82a90fe5dab8904a65869b5a5d996 of
git://git.savannah.gnu.org/autoconf-archive.git. It will be used in an upcoming
change.

Gitlab: #2233

23 months agoMerge branch 'smattr/e0f32e40-1fb8-45eb-a7f3-4f29ff889495' into 'main'
Matthew Fernandez [Tue, 3 Jan 2023 03:47:45 +0000 (03:47 +0000)]
Merge branch 'smattr/e0f32e40-1fb8-45eb-a7f3-4f29ff889495' into 'main'

sparse: warning squashing and flag removal

See merge request graphviz/graphviz!3034

23 months agosparse modularity_clustering: remove 'use_value' parameter
Matthew Fernandez [Mon, 2 Jan 2023 00:36:45 +0000 (16:36 -0800)]
sparse modularity_clustering: remove 'use_value' parameter

This is always set to true.

23 months agosparse mq_clustering: remove 'use_value' parameter
Matthew Fernandez [Mon, 2 Jan 2023 00:34:06 +0000 (16:34 -0800)]
sparse mq_clustering: remove 'use_value' parameter

This is always set to true.

23 months agosparse mq_clustering: remove 'inplace' parameter
Matthew Fernandez [Mon, 2 Jan 2023 00:32:21 +0000 (16:32 -0800)]
sparse mq_clustering: remove 'inplace' parameter

This is always set to false.

23 months agosparse mq_clustering: remove 'flag' parameter
Matthew Fernandez [Mon, 2 Jan 2023 00:30:59 +0000 (16:30 -0800)]
sparse mq_clustering: remove 'flag' parameter

This is always set to 0.

23 months agosparse hierachical_mq_clustering: remove 'flag' parameter
Matthew Fernandez [Mon, 2 Jan 2023 00:28:09 +0000 (16:28 -0800)]
sparse hierachical_mq_clustering: remove 'flag' parameter

This is always set to 0.

23 months agosparse modularity_clustering: remove 'flag' parameter
Matthew Fernandez [Mon, 2 Jan 2023 00:25:16 +0000 (16:25 -0800)]
sparse modularity_clustering: remove 'flag' parameter

This is always set to 0.

23 months agosparse hierachical_modularity_clustering: remove 'flag' parameter
Matthew Fernandez [Mon, 2 Jan 2023 00:20:38 +0000 (16:20 -0800)]
sparse hierachical_modularity_clustering: remove 'flag' parameter

This is always set to 0.

23 months agosparse Multilevel_Modularity_Clustering_establi: remove unhelpful comment
Matthew Fernandez [Mon, 2 Jan 2023 00:19:26 +0000 (16:19 -0800)]
sparse Multilevel_Modularity_Clustering_establi: remove unhelpful comment

23 months agosparse: remove unnecessary casts
Matthew Fernandez [Mon, 2 Jan 2023 00:19:12 +0000 (16:19 -0800)]
sparse: remove unnecessary casts

23 months agosparse: remove unnecessary parens
Matthew Fernandez [Mon, 2 Jan 2023 00:18:58 +0000 (16:18 -0800)]
sparse: remove unnecessary parens

23 months agosparse Multilevel_Modularity_Clustering_init: rephrase 'deg_total' clamping
Matthew Fernandez [Mon, 2 Jan 2023 00:14:33 +0000 (16:14 -0800)]
sparse Multilevel_Modularity_Clustering_init: rephrase 'deg_total' clamping

Squashes a -Wfloat-equal warning.

23 months agosparse Multilevel_Modularity_Clustering_init: remove shadowing of 'n'
Matthew Fernandez [Mon, 2 Jan 2023 00:12:59 +0000 (16:12 -0800)]
sparse Multilevel_Modularity_Clustering_init: remove shadowing of 'n'

This variable shadowed an `n` from the outer scope with an identical value.

23 months agoMerge branch 'smattr/8d876879-1a00-4159-89fd-5b42fa0e5243' into 'main'
Matthew Fernandez [Tue, 3 Jan 2023 02:50:26 +0000 (02:50 +0000)]
Merge branch 'smattr/8d876879-1a00-4159-89fd-5b42fa0e5243' into 'main'

sparse: squash a couple of compiler warnings

See merge request graphviz/graphviz!3032

23 months agosparse: remove shadowing of 'point' global
Matthew Fernandez [Sun, 1 Jan 2023 22:17:58 +0000 (14:17 -0800)]
sparse: remove shadowing of 'point' global

23 months agosparse: use an 'int' for 'id' field in node data
Matthew Fernandez [Sun, 1 Jan 2023 22:10:31 +0000 (14:10 -0800)]
sparse: use an 'int' for 'id' field in node data

Making this a `double` seems to have been a mistake. Only `int` values are ever
stored into this field and it is only ever compared against `int` values.

23 months agoMerge branch 'smattr/gitlab-1835' into 'main'
Matthew Fernandez [Tue, 3 Jan 2023 01:52:27 +0000 (01:52 +0000)]
Merge branch 'smattr/gitlab-1835' into 'main'

Autotools: discover libANN manually if ann.pc is missing

Closes #1835

See merge request graphviz/graphviz!3037

23 months agoAutotools: discover libANN manually if ann.pc is missing
Matthew Fernandez [Mon, 2 Jan 2023 17:24:43 +0000 (09:24 -0800)]
Autotools: discover libANN manually if ann.pc is missing

On Debian and Debian derivatives (e.g. Ubuntu) the libann and libann-dev
packages ship without an ann.pc file to support `pkg-config`. As a result of
this, `pkg-config` cannot find libANN and concludes it is not installed.

This change teaches the Autotools build system how to discover libANN manually
if the `pkg-config` technique fails. Note that we need to use `AC_CHECK_FILE`
instead of `AC_CHECK_HEADER` because libANN is in C++.

Gitlab: closes #1835

23 months agolib/mingle: fix: rename 'DEBUG' to 'MINGLE_DEBUG'
Matthew Fernandez [Mon, 2 Jan 2023 17:40:33 +0000 (09:40 -0800)]
lib/mingle: fix: rename 'DEBUG' to 'MINGLE_DEBUG'

When compiling Graphviz in debug mode (`-DDEBUG`) with libANN, this code causes
syntactic errors due to it using `DEBUG` itself.

23 months agoMerge branch 'smattr/997bc5ba-8507-4ac3-a496-eb9a2d0b2691' into 'main'
Matthew Fernandez [Sun, 1 Jan 2023 18:34:20 +0000 (18:34 +0000)]
Merge branch 'smattr/997bc5ba-8507-4ac3-a496-eb9a2d0b2691' into 'main'

increase stack size on non-Linux platforms to 32MB

Closes #1710

See merge request graphviz/graphviz!3031

23 months agoincrease stack size on macOS to 32MB
Matthew Fernandez [Sun, 1 Jan 2023 02:22:43 +0000 (18:22 -0800)]
increase stack size on macOS to 32MB

Similar to the prior situation with Windows platforms, the CMake build on macOS
was failing the long chain test due to insufficient stack reservation. This
change applies the same increase there. Note that there is no need to adjust the
Autotools build, which seems to handle this test case fine on all platforms.

Gitlab: closes #1710