Without this change, the following error would occur in an upcoming
commit that changes the Windows specific storage-class attributes to
be controlled by GVDLL instead of by _WIN32:
LINK : fatal error LNK1181: cannot open input file 'gvplugin_neato_layout.lib' [C:\GitLab-Runner\builds\magjac\graphviz\cmd\tools\gvpack.vcxproj]
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Sun, 28 Nov 2021 11:35:20 +0000 (12:35 +0100)]
common: correct storage-class attributes in memory.h
Fixes many errors like this using autotools with MinGW:
CCLD mm2gv.exe
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: matrix_market.o: in function `SparseMatrix_import_matrix_market':
C:\Users\magja\graphviz\cmd\tools/matrix_market.c:99: undefined reference to `__imp_gmalloc'
Magnus Jacobsson [Sat, 24 Jul 2021 14:50:22 +0000 (16:50 +0200)]
neatogen: add storage-class attribute declarations in neatoprocs.h
Fixes this error using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gvpack-gvpack.o: in function `init_node_edge':
C:\Users\magja\graphviz\cmd\tools/gvpack.c:271: undefined reference to `neato_init_node'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\magja\graphviz\cmd\tools/gvpack.c:272: undefined reference to `user_pos'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: gvpack-gvpack.o: in function `init_graph':
C:\Users\magja\graphviz\cmd\tools/gvpack.c:305: undefined reference to `init_nop'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Mon, 26 Jul 2021 14:01:00 +0000 (16:01 +0200)]
neatogen: CMake: define NEATOGEN_EXPORTS
It is not automatically set for static libraries, only for shared
libraries.
Fixes errors like this using CMake with MinGW:
neatogen.lib(neatoinit.obj) : error LNK2019: unresolved external symbol __imp_circuit_model referenced in function kkNeato [C:\Users\magja\graphviz\build\plugin\neato_layout\gvplugin_neato_layout.vcxproj]
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Fri, 30 Jul 2021 06:40:42 +0000 (08:40 +0200)]
fdpgen: CMake: define NEATOGEN_EXPORTS
fdpgen is part of the neato_layout plugin.
Fixes errors like this using CMake with MinGW:
fdpgen.lib(clusteredges.obj) : error LNK2019: unresolved external symbol __imp_Plegal_arrangement referenced in function compoundEdges [C:\Users\magja\graphviz\build\plugin\neato_layout\gvplugin_neato_layout.vcxproj]
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Fri, 30 Jul 2021 06:40:06 +0000 (08:40 +0200)]
circogen: CMake: define NEATOGEN_EXPORTS
circogen is part of the neato_layout plugin.
Fixes errors like this using CMake with MinGW:
circogen.lib(circularinit.obj) : error LNK2019: unresolved external symbol __imp_spline_edges referenced in function circo_layout [C:\Users\magja\graphviz\build\plugin\neato_layout\gvplugin_neato_layout.vcxproj]
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Sun, 25 Jul 2021 05:56:03 +0000 (07:56 +0200)]
sfdpgen: autotools: define NEATOGEN_EXPORTS
sfdpgen is part of the neato_layout plugin.
Fixes these errors using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/sfdpgen/.libs/libsfdpgen_C.a(sfdpinit.o): in function `sfdp_init_node_edge':
C:\Users\magja\graphviz\lib\sfdpgen/sfdpinit.c:37: undefined reference to `__imp_neato_init_node'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/sfdpgen/.libs/libsfdpgen_C.a(sfdpinit.o): in function `tuneControl':
C:\Users\magja\graphviz\lib\sfdpgen/sfdpinit.c:248: undefined reference to `__imp_setSeed'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/sfdpgen/.libs/libsfdpgen_C.a(sfdpinit.o): in function `sfdp_layout':
C:\Users\magja\graphviz\lib\sfdpgen/sfdpinit.c:331: undefined reference to `__imp_spline_edges'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\magja\graphviz\lib\sfdpgen/sfdpinit.c:319: undefined reference to `__imp_spline_edges'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Sun, 25 Jul 2021 05:52:04 +0000 (07:52 +0200)]
circogen: autotools: define NEATOGEN_EXPORTS
circogen is part of the neato_layout plugin.
Fixes these errors using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/circogen/.libs/libcircogen_C.a(circularinit.o): in function `circular_init_node_edge':
C:\Users\magja\graphviz\lib\circogen/circularinit.c:49: undefined reference to `__imp_neato_init_node'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/circogen/.libs/libcircogen_C.a(circularinit.o): in function `circo_layout':
C:\Users\magja\graphviz\lib\circogen/circularinit.c:249: undefined reference to `__imp_spline_edges'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Sun, 25 Jul 2021 05:55:05 +0000 (07:55 +0200)]
fdpgen: autotools: define NEATOGEN_EXPORTS
fdpgen is part of the neato_layout plugin.
Fixes errors like this using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/fdpgen/.libs/libfdpgen_C.a(layout.o): in function `fdp_layout':
C:\Users\magja\graphviz\lib\fdpgen/layout.c:1101: undefined reference to `__imp_neato_set_aspect'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Sun, 25 Jul 2021 05:55:34 +0000 (07:55 +0200)]
osage: autotools: define NEATOGEN_EXPORTS
osage is part of the neato_layout plugin.
Fixes these errors using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/osage/.libs/libosage_C.a(osageinit.o): in function `cluster_init_graph':
C:\Users\magja\graphviz\lib\osage/osageinit.c:69: undefined reference to `__imp_neato_init_node'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/osage/.libs/libosage_C.a(osageinit.o): in function `osage_layout':
C:\Users\magja\graphviz\lib\osage/osageinit.c:367: undefined reference to `__imp_spline_edges1'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\magja\graphviz\lib\osage/osageinit.c:363: undefined reference to `__imp_spline_edges0'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Sun, 25 Jul 2021 05:56:38 +0000 (07:56 +0200)]
twopigen: autotools: define NEATOGEN_EXPORTS
twopigen is part of the neato_layout plugin.
Fixes errors like this when using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/twopigen/.libs/libtwopigen_C.a(twopiinit.o): in function `twopi_init_node_edge':
C:\Users\magja\graphviz\lib\twopigen/twopiinit.c:39: undefined reference to `__imp_neato_init_node'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Thu, 22 Jul 2021 04:40:36 +0000 (06:40 +0200)]
lib/gvpr: autotools: fix incorrect MinGW path translation in DFLT_GVPRPATH string
Add an extra forward slash in front of $(pkgdatadir) to avoid the path
being translated to use backslashes under MSYS2/MinGW. This trick is
needed since DFLT_GVPRPATH is a string which is compiled and
backslashes in strings are interpreted as escape sequences. See
https://stackoverflow.com/a/14189687
Fixes errors like this when using autotools with MinGW:
Magnus Jacobsson [Tue, 28 Sep 2021 18:33:21 +0000 (20:33 +0200)]
pathplan: autotools: add define of PATHPLAN_EXPORTS
Fixes errors like this using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/cvt.o: in function `Pobsopen':
C:\Users\magja\graphviz\lib\pathplan/cvt.c:80: undefined reference to `__imp_visibility'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Mon, 27 Sep 2021 21:05:27 +0000 (23:05 +0200)]
common: autotools: define also GVC_EXPORTS
Fixes errors like this using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/common/.libs/libcommon_C.a(arrows.o): in function `arrow_type_curve':
C:\Users\magja\graphviz\lib\common/arrows.c:696: undefined reference to `__imp_Bezier'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Sat, 31 Jul 2021 10:39:00 +0000 (12:39 +0200)]
label: autotools: define GVC_EXPORTS
Fixes this error using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/label/.libs/liblabel_C.a(xlabels.o): in function `xlnew':
C:\Users\magja\graphviz\lib\label/xlabels.c:41: undefined reference to `__imp_zmalloc'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
Magnus Jacobsson [Thu, 22 Jul 2021 13:58:41 +0000 (15:58 +0200)]
pack: autotools: define GVC_EXPORTS
Fixes errors like this using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/pack/.libs/libpack_C.a(pack.o): in function `fillLine':
C:\Users\magja\graphviz\lib\pack/pack.c:127: undefined reference to `__imp_addPS'
Towards https://gitlab.com/graphviz/graphviz/-/issues/2058
The gvc source files do not refer to xdot explicitly and any implicit
references are now resolved by the transitive dependency through
common.
Fixes these errors using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/xdot/.libs/libxdot.dll.a(d000007.o):(.text+0x0): multiple definition of `parseXDotF'; ../../lib/xdot/.libs/libxdot_C.a(xdot.o):C:\Users\magja\graphviz\lib\xdot/xdot.c:475: first defined here
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/xdot/.libs/libxdot.dll.a(d000002.o):(.text+0x0): multiple definition of `freeXDot'; ../../lib/xdot/.libs/libxdot_C.a(xdot.o):C:\Users\magja\graphviz\lib\xdot/xdot.c:927: first defined here
Magnus Jacobsson [Tue, 28 Sep 2021 19:09:47 +0000 (21:09 +0200)]
common: autotools: add linking to xdot
E.g. lib/common/emit.c. uses parseXDotF from lib/xdot/xdot.c.
This removes the need to link to xdot for downstream libraries that do
not explicitly use xdot.
Fixes these errors using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/common/.libs/libcommon_C.a(input.o): in function `graph_cleanup':
C:\Users\magja\graphviz\lib\common/input.c:881: undefined reference to `__imp_freeXDot'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/common/.libs/libcommon_C.a(emit.o): in function `init_xdot':
C:\Users\magja\graphviz\lib\common/emit.c:58: undefined reference to `__imp_parseXDotF'
Magnus Jacobsson [Wed, 29 Sep 2021 19:06:59 +0000 (21:06 +0200)]
lib: autotools: build xdot before common
E.g. lib/common/emit.c. uses parseXDotF from lib/xdot/xdot.c.
This is the first step in fixing these errors using autotools with
MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/common/.libs/libcommon_C.a(input.o): in function `graph_cleanup':
C:\Users\magja\graphviz\lib\common/input.c:881: undefined reference to `__imp_freeXDot'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: ../../lib/common/.libs/libcommon_C.a(emit.o): in function `init_xdot':
C:\Users\magja\graphviz\lib\common/emit.c:58: undefined reference to `__imp_parseXDotF'
The next commit in this series will add linking to xdot.
Magnus Jacobsson [Thu, 22 Jul 2021 13:59:29 +0000 (15:59 +0200)]
pathplan: autotools: use pathplan.def
Fixes these errors when using autotools with MinGW:
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/cvt.o: in function `Pobsopen':
C:\Users\magja\graphviz\lib\pathplan/cvt.c:80: undefined reference to `__imp_visibility'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/cvt.o: in function `Pobspath':
C:\Users\magja\graphviz\lib\pathplan/cvt.c:108: undefined reference to `__imp_ptVis'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\magja\graphviz\lib\pathplan/cvt.c:115: undefined reference to `__imp_makePath'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/inpoly.o: in function `in_poly':
C:\Users\magja\graphviz\lib\pathplan/inpoly.c:32: undefined reference to `__imp_wind'
C:/tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: .libs/shortestpth.o: in function `makePath':
C:\Users\magja\graphviz\lib\pathplan/shortestpth.c:98: undefined reference to `__imp_directVis'
mkFont: make it more obvious to the compiler the extent of 'flags'
All calls to this function use literals that fit in an unsigned char. Squashes
a -Wconversion warning. This also introduces a new header constant,
`GV_TEXTFONT_FLAGS_WIDTH`.
Many callers of `gvjobs_output_langname` were written as if this function
returns `NO_SUPPORT` when given an unsupported language. But this is incorrect.
It returns `FALSE`.
This function is called with int values, but the values are the result of
`getopt`. `getopt` only ever returns -1 (which is handled separately) or a valid
`char` value, so the cast here is always safe and never truncating.
This parameter cannot be removed without breaking API. Doing this does not seem
worth it just to squash a warning. Additionally this function may use the `gvc`
parameter in future.
The ctype.h `is*` functions are typically implemented as macros using a lookup
table. This is fine, but on Cygwin the compiler is somewhat picky about this:
lib/ast/fmtesc.c:116:59: warning: array subscript has type char
[-Wchar-subscripts]
116 | (c == '#' && (b == f || isspace(*(b - 1)))
| ^~~~~~~~
I expect this release to be more turbulent than others in recent times, simply
because of the greater-than-average number of changes since the last release,
both in aggregate as well as specifically to the release process itself.