
Hello folks, Currently having fun trying to install Hat on Cygwin. So far I have got hmake and glib built okay. However on trying to do a "make" on hat, I get the result attached at the bottom. The problem /seems/ to be with glib. Here's what works after doing a "make install" anyway:
$ hmake -hat sort.hs hat-trans sort.hs Wrote Hat/sort.hs ghc -c -package hat -o Hat/sort.o Hat/sort.hs c:\ghc\ghc-5.04.3\bin\ghc.exe: unknown package name: hat
(So hmake and hat-trans at least seem to be okay.) I'm not sure what other information would be useful, but for starters, some version info: glib-1.2.10 hat-2.02 hmake-3.07 The only other thing that could be useful is the following message on doing a "make install" for glib:
Libraries have been installed in: /usr/local/lib
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages.
Any help would be very much appreciated! Cheers, Andy ---------------------------------------------------------- $ make cd src/hattools; make HC=ghc install make[1]: Entering directory `/home/Andy/hat-2.02/src/hattools' hmake -hc=ghc -fglasgow-exts -package lang -package util -DUSE_READLINE=1 HatTra il c:/cygwin/home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/pathutil s.o c:/cygwin/home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/artutil s.o c:/cygwin/home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/hat-nam es.o c:/cygwin/home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/observ eutils.o \ -dc:/cygwin/home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools \ `glib-config --libs` cd c:/cygwin/home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools && ghc -fglasgow-exts -package lang -package util -o HatTrail Run.o FFIExtensions.o HighlightStyle.o PrettyLibHighlight.o SExp.o LowLevel.o HatTrail.o c:/cygwin/h ome/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/pathutils.o c:/cygwin/ home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/artutils.o c:/cygwin/ home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/hat-names.o c:/cygwin /home/Andy/hat-2.02/targets/ix86-CYGWIN_NT-5.1/obj/hattools/observeutils.o -L/us r/local/lib -lglib c:\ghc\ghc-5.04.3\gcc-lib\ld.exe: cannot find -lglib make[1]: *** [c:/cygwin/home/Andy/hat-2.02/lib/ix86-CYGWIN_NT-5.1/hat-trail] Err or 1 make[1]: Leaving directory `/home/Andy/hat-2.02/src/hattools' make: *** [targets/ix86-CYGWIN_NT-5.1/hat-tools-ghc] Error 2 ---------------------------------------------------------- -- Andy Fugard +46 (0)73 779 3503 http://www.possibly.me.uk

Andy Fugard
Currently having fun trying to install Hat on Cygwin. So far I have got hmake and glib built okay. However on trying to do a "make" on hat, I get the result attached at the bottom. The problem /seems/ to be with glib.
ghc -fglasgow-exts -package lang -package util -o HatTrail *.o -L/usr/local/lib -lglib c:\ghc\ghc-5.04.3\gcc-lib\ld.exe: cannot find -lglib
OK, the symptom of the problem is that 'glib' has installed itself in a Cygwin directory /usr/local/lib but ghc necessarily interprets the directory flag as windows-absolute, rather than relative to the Cygwin home. But the actual cause is a small bug in hmake, which is supposed to translate directory options to make them suitable for the underlying compiler. It works in most cases, but I simply forgot about the -L option. A patch (for script/hmake.inst in the hmake distribution) is attached. After applying it, you should only need to 'make install' for hmake - no rebuilding should be necessary. Then you can try again with the hat-tools: make hat-tools make install The other problem is this:
ghc -c -package hat -o Hat/sort.o Hat/sort.hs c:\ghc\ghc-5.04.3\bin\ghc.exe: unknown package name: hat
It looks like installation of the Hat library package inside the ghc directories has failed. Did you install ghc with adminstrator privileges, but Hat as an ordinary user? That might account for it. You need to have sufficient permissions to copy the Hat library into the ghc directory, and for ghc-pkg to overwrite its global config file (package.conf). If it still fails, then look for the message Installing hat package for ghc under $libdir in the installation log, and send us the output immediately following. Regards, Malcolm ---- patch for hmake ---- diff -u -r1.32 script/hmake.inst --- script/hmake.inst 27 May 2003 09:58:08 -0000 1.32 +++ script/hmake.inst 19 Jun 2003 10:28:38 -0000 @@ -144,7 +144,7 @@ # -U*) cppflags=$cppflags" $1"; ;; # Link flags - -L*) LDFLAGS=$LDFLAGS" $1" ;; + -L*) LDFLAGS=$LDFLAGS" `filepath $1`" ;; -l*) LDFLAGS=$LDFLAGS" $1" ;; # tracing and profiling flags - mainly nhc98, some hat-trans

Malcolm Wallace wrote:
Andy Fugard
writes: Currently having fun trying to install Hat on Cygwin. So far I have got hmake and glib built okay. However on trying to do a "make" on hat, I get the result attached at the bottom. The problem /seems/ to be with glib.
ghc -fglasgow-exts -package lang -package util -o HatTrail *.o -L/usr/local/lib -lglib c:\ghc\ghc-5.04.3\gcc-lib\ld.exe: cannot find -lglib
OK, the symptom of the problem is that 'glib' has installed itself in a Cygwin directory /usr/local/lib but ghc necessarily interprets the directory flag as windows-absolute, rather than relative to the Cygwin home.
Patch applied; now it gives c:\ghc\ghc-5.04.3\bin\ghc.exe: file `c:/cygwin/usr/local/lib' does not exist make[1]: *** [c:/cygwin/home/Andy/hat-2.02/lib/ix86-CYGWIN_NT-5.1/hat-trail] Err or 1 make[1]: Leaving directory `/home/Andy/hat-2.02/src/hattools' make: *** [targets/ix86-CYGWIN_NT-5.1/hat-tools-ghc] Error 2 Perhaps just a problem with the / instead of \ ? C:\cygwin\usr\local\lib does exist ok. Not sure yet what to hack to fix it... Andy
participants (2)
-
Andy Fugard
-
Malcolm Wallace