Closed edd8e884-f507-429a-b577-5d554626c0fe closed 2 years ago
Attachment: pygraphviz.log
I tried ./sage -pip install pygraphviz
on a linux fedora desktop and it works fine.
More detail is needed here - on what kind of system; how was graphviz installed etc. Top-level config.log please
The system is a standard Debian bullseye, architecture x86_64, graphviz was installed from the packages. I first saw the error on some VM, and could reproduce it on my laptop.
Attachment: config.log
I attached the config.log.
There is a gap in our dependencies.
The graphviz
package only checks for executables in the system package test (spkg-configure.m4
). But pygraphviz
needs header files and presumably the shared library -- which on debian
are in a separate system package https://packages.debian.org/bookworm/libgraphviz-dev
$ cat build/pkgs/graphviz/spkg-configure.m4
SAGE_SPKG_CONFIGURE([graphviz], [
dnl We check all executables that are tested by sage.features.graphviz
AC_CHECK_PROGS([DOT], [dot])
AS_IF([test x$DOT = x], [sage_spkg_install_graphviz=yes])
AC_CHECK_PROGS([NEATO], [neato])
AS_IF([test x$NEATO = x], [sage_spkg_install_graphviz=yes])
AC_CHECK_PROGS([TWOPI], [twopi])
AS_IF([test x$TWOPI = x], [sage_spkg_install_graphviz=yes])
])
$ cat build/pkgs/graphviz/distros/debian.txt
graphviz
$ cat build/pkgs/pygraphviz/dependencies
$(PYTHON) graphviz | $(PYTHON_TOOLCHAIN)
The solution is to add a dummy script package libgraphviz
in the same way that it is done for nauty
, libnauty
.
Replying to @mkoeppe:
The solution is to add a dummy script package
libgraphviz
in the same way that it is done fornauty
,libnauty
.
This looks verbose, why not simply put both graphviz
and libgraphviz-dev
in the distro file of the graphviz
spkg, as we do for openssl
?
because other uses of graphviz
do not need the shared library
Author: Matthias Koeppe
New commits:
d40fcb9 | build/pkgs/libgraphviz: New, use instead of graphviz as dependency of pygraphviz |
Tested successfully with tox -e docker-debian-bullseye-maximal -- pygraphviz
lgtm
Reviewer: Dima Pasechnik
Thanks!
Changed branch from u/mkoeppe/add_dummy_script_package_libgraphviz__pygraphvizdependency to d40fcb9
We got
pygraphviz/graphviz_wrap.c:2711:10: fatal error: graphviz/cgraph.h: No such file or directory
, see the log in attachment.CC: @mkoeppe @dcoudert
Component: packages: optional
Author: Matthias Koeppe
Branch/Commit:
d40fcb9
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/32825