Opened 12 years ago
Closed 6 years ago
#1684 closed defect (fixed)
configure GRASS 6 with X11 support
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 6.4.6 |
Component: | Compiling | Version: | svn-releasebranch64 |
Keywords: | configure, X11, debian | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
Compiling GRASS 6 with
--with-x --x-libraries=/usr/lib/x86_64-linux-gnu
(using Debian GNU/Linux, packages libxt-dev
and libx11-dev
installed)
result is no X11 support detected
... checking for X... no ... X11 support: no
Any idea what could be wrong?
Change History (14)
follow-up: 5 comment:1 by , 12 years ago
follow-up: 4 comment:3 by , 12 years ago
Same or similar problem on Ubuntu 12.04 32bit on 64bit machine for GRASS 7.
Even after setting the proper path to X11:
--x-includes=/usr/include/ --x-libraries=/usr/lib/
and succesfull configure with X11... yes, compilation itself fails (e.g for nviz lib). The problem was missing header file StdCmap.h
(or files) from package libxmu-dev.
For me the solution was to install package libxmu-dev.
This header file(s) should be explicitly checked by the configure script to avoid these confusions.
BTW: There are several other issues with configure: it does not check wxPython version (instead, some error dialog is shown on start up) and it does not check presence of numpy (temporal and gui dependency, Ubuntu package python-numpy).
(Related wiki page for Ubuntu: http://grass.osgeo.org/wiki/Compile_and_Install_Ubuntu)
comment:4 by , 12 years ago
Replying to wenzeslaus:
Same or similar problem on Ubuntu 12.04 32bit on 64bit machine for GRASS 7.
Even after setting the proper path to X11:
--x-includes=/usr/include/ --x-libraries=/usr/lib/
strangely adding --x-includes
(even it points to standard include dir) solves problem
X11 support: yes
comment:5 by , 12 years ago
Replying to hamish:
what version of Debian?
Debian sid (unstable)
just in releasebranch_6_4 or in all branches?
All branches
follow-up: 7 comment:6 by , 12 years ago
Replying to wenzeslaus:
BTW: There are several other issues with configure: it does not check wxPython version (instead, some error dialog is shown on start up)
The Debian build rules file uses this:
./configure \ ... --with-wxwidgets=/usr/bin/wx-config \ ...
which results in:
checking whether to use wxWidgets... yes checking for wx-config... /usr/bin/wx-config checking wxWidgets version... 2.8.12 checking for wx/wxprec.h... yes
Replying to martinl:
Debian sid (unstable)
did you try running
apt-get build-dep grass
?
were there any clues in config.log?
Hamish
comment:7 by , 12 years ago
Replying to hamish:
Replying to wenzeslaus:
BTW: There are several other issues with configure: it does not check wxPython version (instead, some error dialog is shown on start up)
The Debian build rules file uses this:
> ./configure \ > ... > --with-wxwidgets=/usr/bin/wx-config \ > ...
Vaclav has pointing to wxPython not wxWidgets. wxWidgets is optional requirement for compilation (eg. wximgview
and other few modules). wxPython is not used during compilation, it's just requirement when running wxGUI by the user. This is reason why it's not included in configuration script.
comment:8 by , 11 years ago
I see the same on debian/wheezy and ubuntu 12.04, no Xmons built.
worked around with:
LDFLAGS="-L/usr/lib/i386-linux-gnu"
or
--x-includes=/usr/include/X11 --x-libraries=/usr/lib/i386-linux-gnu
Hamish
comment:9 by , 11 years ago
--x-includes=/foobar --x-libraries=/usr/lib/i386-linux-gnu
also works, but leaving off --x-includes= entirely does not.
follow-up: 11 comment:10 by , 11 years ago
Keywords: | debian added |
---|---|
Milestone: | 6.4.3 → 6.4.4 |
Priority: | normal → major |
Hi,
I found a cause and solution to this on Debian/Wheezy. Using
CFLAGS="... -Werror-implicit-function-declaration"
on the ./configure like triggers an error in the test compile for X:
(config.log)
... configure:4791: checking for W11 configure:4819: checking for X configure:4884: gcc -E conftest.c >/dev/null 2>conftest.out configure:4960: gcc -o conftest -ggdb -march=amdfam10 -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused -Wl,--export-dynamic conftest.c -lXt 1>&5 configure: In function 'main': configure:4956:1: error: implicit declaration of function 'XtMalloc' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors configure: failed program was: #line 4953 "configure" #include "confdefs.h" int main() { XtMalloc() ; return 0; } configure:5627: checking whether to use Curses configure:5646: checking for curses.h ...
who's forgetting to do the #include? a bug in autoconf or one of ours?
./configure'ing without -Werror-implicit-function-declaration leads to X being detected and built.
Hamish
comment:11 by , 11 years ago
Replying to hamish:
who's forgetting to do the #include? a bug in autoconf or one of ours?
Linking tests normally provide their own dummy prototype rather than including headers, but the test for the X libraries does neither.
I suppose that makes it a bug in autoconf. It's not one which we can readily work around, other than by explicitly removing that particular switch from CFLAGS for the duration of the AC_PATH_XTRA macro.
comment:12 by , 9 years ago
Configuring GRASS 64 on Debian Jessie with
--with-x --x-libraries=/usr/lib/x86_64-linux-gnu # do not use CFLAGS -Werror-implicit-function-declaration!
it works:
X11 support: yes
comment:13 by , 9 years ago
Milestone: | 6.4.4 → 6.4.6 |
---|
Hi,
what version of Debian? just in releasebranch_6_4 or in all branches?
any clues about a missing header file near the end of config.log?
the following works for me on Squeeze, adjust as needed:
the following package requirements are for Debian's Sid, but with minor tweaks will work with other versions:
If config.log does show a missing header file, you can use 'apt-file' to search for which package provides it.
Hamish