[Xmonad] Re: Compile error: How to find problem in environment?

Kai Grossjohann kai.grossjohann at verizonbusiness.com
Mon Jun 18 09:05:07 EDT 2007


Bruce Stephens <xmonad at cenderis.demon.co.uk> writes:

> Kai Grossjohann <kai.grossjohann-ZauoW0Wb6k83fM+T6T0RSkEOCMrvLtNR at public.gmane.org> writes:
>
> [...]
>
>> Perhaps I shouldn't be using Xinerama on OSX?  This time, Google has no
>> suggestions.
>
> Rerun autoconf.  This was mentioned on the mailing list.  Doubtless
> Google will catch on in a few days.

Okay.  This time, I was able to make two baby steps before having to
come back for help.

autoconf followed by Setup.lhs configure produces this: (more text
below)

marcie% ./Setup.lhs configure --prefix=/opt/sw/xmonad --user
Configuring X11-extras-0.2...
configure: Dependency base-any: using base-2.1.1
configure: Dependency X11>=1.2.1: using X11-1.2.2
configure: Using install prefix: /opt/sw/xmonad
configure: Binaries installed in: /opt/sw/xmonad/bin
configure: Libraries installed in: /opt/sw/xmonad/lib/X11-extras-0.2/ghc-6.6.1
configure: Private binaries installed in: /opt/sw/xmonad/libexec
configure: Data files installed in: /opt/sw/xmonad/share/X11-extras-0.2
configure: Using compiler: /opt/local/bin/ghc
configure: Compiler flavor: GHC
configure: Compiler version: 6.6.1
configure: Using package tool: /opt/local/bin/ghc-pkg
configure: Using ar found on system at: /usr/bin/ar
configure: No haddock found
configure: No pfesetup found
configure: Using ranlib found on system at: /usr/bin/ranlib
configure: Using runghc found on system at: /opt/local/bin/runghc
configure: No runhugs found
configure: No happy found
configure: No alex found
configure: Using hsc2hs: /opt/local/bin/hsc2hs
configure: No c2hs found
configure: No cpphs found
configure: No greencard found
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking whether -R must be followed by a space... neither works
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking X11/extensions/Xinerama.h usability... no
checking X11/extensions/Xinerama.h presence... yes
configure: WARNING: X11/extensions/Xinerama.h: present but cannot be compiled
configure: WARNING: X11/extensions/Xinerama.h:     check for missing prerequisite headers?
configure: WARNING: X11/extensions/Xinerama.h: see the Autoconf documentation
configure: WARNING: X11/extensions/Xinerama.h:     section "Present But Cannot Be Compiled"
configure: WARNING: X11/extensions/Xinerama.h: proceeding with the preprocessor's result
configure: WARNING: X11/extensions/Xinerama.h: in the future, the compiler will take precedence
checking for X11/extensions/Xinerama.h... yes
configure: creating ./config.status
config.status: creating X11-extras.buildinfo
config.status: error: cannot find input file: include/X11_extras_config.h.in

So I edited configure.ac as follows:

marcie% diff -u configure.ac.ORIG configure.ac
--- configure.ac.ORIG   2007-06-18 14:57:40.000000000 +0200
+++ configure.ac        2007-06-18 14:57:27.000000000 +0200
@@ -10,7 +10,9 @@
     CPPFLAGS="$CPPFLAGS -I $x_includes"
 fi
 
-AC_CHECK_HEADERS([X11/extensions/Xinerama.h], [have_xinerama=yes])
+AC_CHECK_HEADERS([X11/Xlib.h])
+AC_CHECK_HEADERS([X11/extensions/Xinerama.h], [have_xinerama=yes], [],
+[#include <X11/Xlib.h>])
 
 if test "$have_xinerama" = yes; then
     EXTRA_LIBRARIES="extra-libraries: Xinerama" 
zsh: exit 1     diff -u configure.ac.ORIG configure.ac

With this change, the warning went away, but the real problem didn't
change:

Configure succeeds:

marcie% ./Setup.lhs configure --prefix=/opt/sw/xmonad --user
Configuring X11-extras-0.2...
configure: Dependency base-any: using base-2.1.1
configure: Dependency X11>=1.2.1: using X11-1.2.2
configure: Using install prefix: /opt/sw/xmonad
configure: Binaries installed in: /opt/sw/xmonad/bin
configure: Libraries installed in: /opt/sw/xmonad/lib/X11-extras-0.2/ghc-6.6.1
configure: Private binaries installed in: /opt/sw/xmonad/libexec
configure: Data files installed in: /opt/sw/xmonad/share/X11-extras-0.2
configure: Using compiler: /opt/local/bin/ghc
configure: Compiler flavor: GHC
configure: Compiler version: 6.6.1
configure: Using package tool: /opt/local/bin/ghc-pkg
configure: Using ar found on system at: /usr/bin/ar
configure: No haddock found
configure: No pfesetup found
configure: Using ranlib found on system at: /usr/bin/ranlib
configure: Using runghc found on system at: /opt/local/bin/runghc
configure: No runhugs found
configure: No happy found
configure: No alex found
configure: Using hsc2hs: /opt/local/bin/hsc2hs
configure: No c2hs found
configure: No cpphs found
configure: No greencard found
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking whether -R must be followed by a space... neither works
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking X11/Xlib.h usability... yes
checking X11/Xlib.h presence... yes
checking for X11/Xlib.h... yes
checking for X11/extensions/Xinerama.h... yes
configure: creating ./config.status
config.status: creating X11-extras.buildinfo
config.status: creating include/X11_extras_config.h
config.status: include/X11_extras_config.h is unchanged

Hm.  Now I tried to reproduce the problem, but it didn't work!  The
difference to before is that I can autoreconf, not autoconf.

Thanks for your patience.  I wonder how I got this all running on my
Linux box without so much pain.  Perhaps I was smoking something great
that caused amnesia :-)

Kai



More information about the Xmonad mailing list