Hello!
I'm trying to resurrect FreeBSD port of pychess (an old version got deleted years ago), and am facing this problem... When ports are build, by default, the DISPLAY environment variable is not set. Indeed, the building servers often don't have any monitors attached nor X11 running.
Unfortunately, the setup.py found in pychess-1.0.0 seems to require DISPLAY -- the process dumps core without it...
mi@aldan:py-pychess/work-py36/pychess-1.0.0 (1350) python3.6 setup.py install
Unable to init server: Could not connect to 127.0.0.1: Connection refused
Unable to init server: Could not connect to 127.0.0.1: Connection refused
/spare/usr/ports/games/py-pychess/work-py36/pychess-1.0.0/lib/pychess/widgets/__init__.py:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
(setup.py:2825): Gtk-CRITICAL **: 12:22:27.506: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
/spare/usr/ports/games/py-pychess/work-py36/pychess-1.0.0/lib/pychess/widgets/ChessClock.py:6: PyGIWarning: PangoCairo was imported without specifying a version first. Use gi.require_version('PangoCairo', '1.0') before import to ensure that the right version gets loaded.
from gi.repository import GLib, Gtk, Gdk, Pango, PangoCairo, GObject
(setup.py:2825): Gtk-CRITICAL **: 12:22:27.530: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(setup.py:2825): Gtk-CRITICAL **: 12:22:27.530: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
(setup.py:2825): Gtk-CRITICAL **: 12:22:27.530: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
Segmentation fault (core dumped)
Since no actual GUI ever appears anyway -- as one would expect
from automated setup -- anyway, why is DISPLAY required
to simply install the files? You don't need a FreeBSD machine to
reproduce the problem -- simply unset DISPLAY before
invoking setup.py (for any target).
Also, would be nice to silence the warnings (about errors), but that's less important. Thank you for maintaining the cool program! Yours,
-mi
P.S. If, as I just found out, this group is closed to
non-members, perhaps, the setup.py should give an
alternative contact e-mail address?