neatogen cmpitems: rephrase to avoid double→int conversion
This had a number of problems with respect to possible overflow and loss of
precision. This commit rephrases the comparison into something that does not
rely on any coercion or conversion.
make final Pylint step fail for any non-FIXME warning/error
The gating Pylint check now fails if any warning or error is detected, excluding
FIXME comments. This should hopefully lead to improved code quality in Python
introduced into the code base in future.
This triggers for a lot of Graphviz Python code because, by its nature of being
used to write test cases in Graphviz, there is inherently always going to be a
lot of similar looking code.
silence Pylint import-errors about regression_test_helpers
I do not know why, but Pylint does not understand this import while Python
itself does. I have tried different variations, but Pylint complains about all
of them.
OCaml bindings: fix: only pass -fpermissive when compiling C++
The `-fpermissive` flag is only valid for Objective-C and C++, but was being set
for C and C++. When compiling the C part of these bindings, this was generating
the warning:
cc1: warning: command line option ‘-fpermissive’ is valid for C++/ObjC++ but
not for C
This flag was introduced in 8f4667edb410a6d11b53746849304fb953b5c6ae to work
around non-conformant code generation by SWIG. In future, it might be worth
investigating whether the underlying issue has been fixed in SWIG and this work
around can be removed.
gvpack_static: force the C++ compiler to be used also for static linking
The trick to force the C++ compiler to be used for linking was applied
only for gvpack, not for gvpack_static.
Fixes many errors like this:
/usr/bin/ld: ../../lib/vpsc/.libs/libvpsc_C.a(csolve_VPSC.o): in function `newVariable':
csolve_VPSC.cpp:(.text+0x20): undefined reference to `operator new(unsigned long)'
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 </home/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN/bin/gv2gml> to archive </home/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.1~dev.20210902.2049-CYGWIN.zip>, 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
Copy the dot executable to its alias commands instead of symlinking
it. Creating symlinks to dot works fine in itself, but results in an
error like this when running cpack:
CPack Error: Problem while adding file </cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.0~dev.20210812.2025-CYGWIN/bin/circo> to archive </cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.0~dev.20210812.2025-CYGWIN.zip>, ERROR = Unable to read from file 'Graphviz-2.49.0~dev.20210812.2025-CYGWIN/bin/circo': Couldn't list extended attributes
circo 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.0~dev.20210812.2025-CYGWIN/bin/circo
attr_list: Permission denied
Could not list /cygdrive/c/Users/magja/graphviz/build/_CPack_Packages/CYGWIN/ZIP/Graphviz-2.49.0~dev.20210812.2025-CYGWIN/bin/circo
ci/build.sh: remove trailing text after actual version ID
Fixes a problem on Cygwin where 'uname -r' gives:
3.2.0(0.340/5/3)
which, when used as the name of a directory, actually represents a
directory named '3.2.0(0.340', containing a subdirectory named '5'
containing a subdirectory named '3)'.
fix: write Graphviz build version to GRAPHVIZ_VERSION file instead of VERSION
C++20 standardizes a new `version` header.¹ A side effect of this is that
Autotools-driven Graphviz compilation fails when using both (1) a C++20-capable
compiler and (2) a case-insensitive file system:
Making all in vpsc
CXX block.lo
In file included from block.cpp:20:
In file included from …/include/c++/v1/memory:667:
In file included from …/include/c++/v1/type_traits:417:
In file included from …/include/c++/v1/cstddef:37:
../../version:1:1: error: expected unqualified-id
2.49.1~dev.20210907.1517
^
The core problem is that the root of the repository checkout (or unpacked
tarball) is in the compiler’s include path in order to allow including
`config.h`. But the generated `VERSION` file is also in this same directory.
Nothing in Graphviz attempts to include the C++20 `version` header, but some of
the other stdlib headers transitively include `version`.
To avoid this confusion, we rename Graphviz’ generated file.