xgsch2pcb configure fails in non-X environment

Bug #1054241 reported by Maksim Salau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gEDA
Fix Committed
Undecided
Unassigned

Bug Description

When building xgsch2pcb in non-X environment configure script fails on gtk python module check.
Example :
$ DISPLAY="" ./configure
...snip...
checking for python module gtk... no
configure: error: python module gtk is required

$ DISPLAY="" python -c "import gtk"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 64, in <module>
    _init()
  File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
    _gtk.init_check()
RuntimeError: could not open display

Module is found, but it tries to open display and fails.

To distinguish runtime errors from import errors, I've tried such construction:
$ python -c "import gtk" 2>&1 | grep -q 'ImportError'

But logic exit code is inverted.

Also same reason prevents configure script from getting gtk+ version. So I introduced new --disable-x option to turn that check off.

Patch is attached.

Tags: xgsch2pcb
Revision history for this message
Maksim Salau (maksim-salau) wrote :
Peter TB Brett (peter-b)
Changed in geda:
status: New → In Progress
assignee: nobody → Peter TB Brett (peter-b)
Peter TB Brett (peter-b)
Changed in geda:
status: In Progress → Fix Committed
Peter TB Brett (peter-b)
Changed in geda:
assignee: Peter TB Brett (peter-b) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.