Closed GoogleCodeExporter closed 8 years ago
Try setting your LD_LIBRARY_PATH to include /usr/X11R6/lib.
Original comment by m...@twifkak.com
on 4 Nov 2007 at 3:36
Setting the LD_LIBRARY_PATH is another workaround, but workarounds shouldn't be
necessary. During the configure step, Cabal figures out where the X includes
and
libraries are located, but then proceeds to forget the lib location during the
build.
% runghc Setup.hs configure
...
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
...
Original comment by hitesh.j...@gmail.com
on 4 Nov 2007 at 5:25
What is the contents of your .bulidinfo file?
Original comment by don...@gmail.com
on 4 Nov 2007 at 6:37
can you also try the darcs version, as I've pushed some patches that attempt to
substitute into the .buildinfo file extra variables I noticed weren't being
used.
darcs get http://darcs.haskell.org/X11
Original comment by don...@gmail.com
on 4 Nov 2007 at 6:56
The X11.buildinfo contains:
-- X11.buildinfo. Generated from X11.buildinfo.in by configure.
-- System-dependent values used by Distribution.Simple.defaultUserHooks
--
buildable: True
cc-options: -I/usr/X11R6/include
ld-options: -L/usr/X11R6/lib
Original comment by hitesh.j...@gmail.com
on 4 Nov 2007 at 10:15
Just tried the darcs version.
1. autoreconf
2. runhaskell Setup.hs configure --without-xinerama
3. runhaskell Setup.hs build
Setup.hs: Warning: Unknown field 'build-type'
Preprocessing library X11-1.3.0...
/usr/bin/ld: can't locate file for: -lX11
collect2: ld returned 1 exit status
linking Graphics/X11/Types_hsc_make.o failed
command was: /opt/local/bin/ghc-6.6.1 -lX11 Graphics/X11/Types_hsc_make.o -o
Graphics/X11/Types_hsc_make
Setup.hs: got error code while preprocessing: Graphics.X11.Types
X11.buildinfo:
-- X11.buildinfo. Generated from X11.buildinfo.in by configure.
-- System-dependent values used by Distribution.Simple.defaultUserHooks
--
buildable: True
cc-options: -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/X11R6/include
ld-options: -L/usr/X11R6/lib
Original comment by hitesh.j...@gmail.com
on 4 Nov 2007 at 10:22
Can you build and install a newer version of cabal (which will resolve the
build-type
error, and hopefully also get the paths right in the first place).
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Cabal-1.2.2.0
Thanks for your persistence. If you can reproduce this problem with darcs X11
and
latest Cabal, then we can really proceed to squash it.
Original comment by don...@gmail.com
on 4 Nov 2007 at 11:47
Hurray, it works! Thanks for a great product in xmonad and for such quick
support.
BTW, one change that people need to know about is that the configure command no
longer accepts the '--without-xinerama' option -- instead it seems to figure
out what
to do on its own, which is much nicer imho.
% runhaskell Setup.hs configure
Configuring X11-1.3.0...
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 whether to build Xinerama... 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
configure: WARNING: ## ------------------------------ ##
configure: WARNING: ## Report this to dons@galois.com ##
configure: WARNING: ## ------------------------------ ##
checking for X11/extensions/Xinerama.h... yes
configure: creating ./config.status
config.status: creating config.mk
config.status: creating X11.buildinfo
config.status: creating include/HsX11Config.h
config.status: creating include/X11_extras_config.h
% runhaskell Setup.hs build
Preprocessing library X11-1.3.0...
Building X11-1.3.0...
[ 1 of 17] Compiling Graphics.X11.Xlib.Types (
dist/build/Graphics/X11/Xlib/Types.hs,
dist/build/Graphics/X11/Xlib/Types.o )
[ 2 of 17] Compiling Graphics.X11.Types ( dist/build/Graphics/X11/Types.hs,
dist/build/Graphics/X11/Types.o )
[ 3 of 17] Compiling Graphics.X11.Xlib.Atom (
dist/build/Graphics/X11/Xlib/Atom.hs,
dist/build/Graphics/X11/Xlib/Atom.o )
[ 4 of 17] Compiling Graphics.X11.Xlib.Color ( Graphics/X11/Xlib/Color.hs,
dist/build/Graphics/X11/Xlib/Color.o )
[ 5 of 17] Compiling Graphics.X11.Xlib.Context ( Graphics/X11/Xlib/Context.hs,
dist/build/Graphics/X11/Xlib/Context.o )
[ 6 of 17] Compiling Graphics.X11.Xlib.Display ( Graphics/X11/Xlib/Display.hs,
dist/build/Graphics/X11/Xlib/Display.o )
[ 7 of 17] Compiling Graphics.X11.Xlib.Event (
dist/build/Graphics/X11/Xlib/Event.hs,
dist/build/Graphics/X11/Xlib/Event.o )
[ 8 of 17] Compiling Graphics.X11.Xlib.Font (
dist/build/Graphics/X11/Xlib/Font.hs,
dist/build/Graphics/X11/Xlib/Font.o )
[ 9 of 17] Compiling Graphics.X11.Xlib.Misc (
dist/build/Graphics/X11/Xlib/Misc.hs,
dist/build/Graphics/X11/Xlib/Misc.o )
[10 of 17] Compiling Graphics.X11.Xlib.Region ( Graphics/X11/Xlib/Region.hs,
dist/build/Graphics/X11/Xlib/Region.o )
[11 of 17] Compiling Graphics.X11.Xlib.Screen ( Graphics/X11/Xlib/Screen.hs,
dist/build/Graphics/X11/Xlib/Screen.o )
[12 of 17] Compiling Graphics.X11.Xlib.Window ( Graphics/X11/Xlib/Window.hs,
dist/build/Graphics/X11/Xlib/Window.o )
[13 of 17] Compiling Graphics.X11.Xlib.Image ( Graphics/X11/Xlib/Image.hs,
dist/build/Graphics/X11/Xlib/Image.o )
[14 of 17] Compiling Graphics.X11.Xlib ( Graphics/X11/Xlib.hs,
dist/build/Graphics/X11/Xlib.o )
[15 of 17] Compiling Graphics.X11.Xlib.Extras (
dist/build/Graphics/X11/Xlib/Extras.hs, dist/build/Graphics/X11/Xlib/Extras.o )
Warning: orphan instances:
instance base:GHC.Read.Read [X11-1.3.0:Graphics.X11.Xlib.Types.Rectangle] = $f1
[16 of 17] Compiling Graphics.X11.Xinerama (
dist/build/Graphics/X11/Xinerama.hs,
dist/build/Graphics/X11/Xinerama.o )
[17 of 17] Compiling Graphics.X11 ( Graphics/X11.hs,
dist/build/Graphics/X11.o )
ar: creating archive dist/build/libHSX11-1.3.0.a
X11.buildinfo:
-- X11.buildinfo. Generated from X11.buildinfo.in by configure.
-- System-dependent values used by Distribution.Simple.defaultUserHooks
--
buildable: True
cc-options: -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/X11R6/include
ld-options: -L/usr/X11R6/lib
extra-libraries: Xinerama Xext
Original comment by hitesh.j...@gmail.com
on 5 Nov 2007 at 2:59
Excellent! Thanks for all the information.
Original comment by don...@gmail.com
on 5 Nov 2007 at 4:10
Original issue reported on code.google.com by
hitesh.j...@gmail.com
on 4 Nov 2007 at 5:38