The absolute path on GitLab runners is different from our private
runners.
rpmbuild produces the build in the home directory, not in the current
directory. At least in Docker containers on GitLab runners these are
not the same.
Henrik Grimler [Sat, 28 Mar 2020 14:43:57 +0000 (15:43 +0100)]
lib/vpsc: rename bcopy->b_copy
bcopy is the name of a deprecated function. Compiling on a system
system that still have the function (for example android) gives an
error like:
```
[...]
Making all in vpsc
make[3]: Entering directory '/data/data/com.termux/files/home/projects/graphviz/build/lib/vpsc'
CXX blocks.lo
../../../lib/vpsc/blocks.cpp:158:36: error: too few arguments provided to function-like macro invocation
vector<Block*> bcopy(begin(),end());
^
/data/data/com.termux/files/usr/include/strings.h:61:9: note: macro 'bcopy' defined here
^
1 error generated.
```
Not using bcopy for vector names in block.cpp fixes this.
Henrik Grimler [Sat, 28 Mar 2020 15:32:18 +0000 (16:32 +0100)]
lib/sfdpgen: include malloc.h in PriorityQueue.c to define free
Works now that lib/cgraph/malloc.h is not included. Since we get the
`free` definition from malloc.h we also do not need
`#define FREE free` and friends.
Henrik Grimler [Sat, 28 Mar 2020 14:50:15 +0000 (15:50 +0100)]
lib/cgraph: include empty malloc.h from subdir include
Having it directly in cgraph/ means that this file is found by all
other libs with `-Ilib/cgraph/`. Since it is only needed by cgraph we
can move it to a subdirectory and add `-Iinclude/` to the cgraph
Makefile. If the other libraries and plugins picks up the empty
malloc.h it causes problems on some systems when compiling for example
lib/sfdpgen/PriorityQueue.c and plugin/visio/VisioGraphic.cpp where it
gives errors like:
```
/storage/termux-build/graphviz/src/lib/sfdpgen/PriorityQueue.c:96:40: error: use of undeclared identifier 'free'; did you mean 'frexp'?
DoubleLinkedList_delete_element(l, free, &((q->buckets)[gainold]));
^~~~
frexp
```
and
```
[...]
In file included from /storage/termux-build/graphviz/src/plugin/visio/VisioGraphic.cpp:16:
In file included from /storage/termux-build/_cache/android-r20-api-24-v3/bin/../sysroot/usr/include/c++/v1/algorithm:644:
In file included from /storage/termux-build/_cache/android-r20-api-24-v3/bin/../sysroot/usr/include/c++/v1/memory:654:
In file included from /storage/termux-build/_cache/android-r20-api-24-v3/bin/../sysroot/usr/include/c++/v1/typeinfo:61:
In file included from /storage/termux-build/_cache/android-r20-api-24-v3/bin/../sysroot/usr/include/c++/v1/exception:82:
/storage/termux-build/_cache/android-r20-api-24-v3/bin/../sysroot/usr/include/c++/v1/cstdlib:125:9: error: no member named 'calloc' in the global namespace
using ::calloc;
~~^
[...]
```
On other systems the compilation succeeds but with warnings like
```
../../../lib/common/memory.c:47:10: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
```
To work around this we can introduce a variable $(HOSTCC), which expands
to the standard compiler, `$(CC)`, unless the user has run
`export HOSTCC=some-host-compiler` or similar before configuring.
Magnus Jacobsson [Fri, 20 Mar 2020 16:45:47 +0000 (17:45 +0100)]
Fix lintian errors appearing when running in Docker
The is the same problem as in
https://gitlab.com/graphviz/graphviz/-/jobs/193592697 which was fixed
with
https://gitlab.com/graphviz/graphviz/-/commit/b0871968de2252653b001bf700ed98c240e8aad6,
but for some reason it doesn't work in Docker.
Stephen C North [Tue, 24 Dec 2019 02:18:13 +0000 (21:18 -0500)]
an assert in applyattrs() is too restrictive when setting edge [key=something}
as the object tag can be AGINEDGE not AGEDGE==AGOUTEDGE so we changed that
Stephen C North [Tue, 26 Nov 2019 20:47:38 +0000 (15:47 -0500)]
Attempted fix for https://gitlab.com/graphviz/graphviz/issues/1631
Stand-alone attributes within subgraphs are incorrectly handled for dot/canon/xdot output files. Fix is to access local dictionary, not root, when writing nodes within subgraphs.