Trouble getting nhc98 to work

View: New views
2 Messages — Rating Filter:   Alert me  

Trouble getting nhc98 to work

by Karl Crary :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear NHC98 maintainers,

I was experimenting with nhc98 because I was led to believe that using
it, I might be able to use the Haskell FFI to link with libraries built
using Cygwin.  Unfortunately, I never got far enough to try that; it's
failing right out of the box.

First I tried the binary distribution.  The configure and install
process seemed to go smoothly, but in my first attempt to use the
compiler I get:

/usr/local/bin/nhc98: line 131:
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/hmake-PRAGMA: No such
file or directory
/usr/local/bin/nhc98: line 131:
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/hmake-PRAGMA: No such
file or directory
/usr/local/bin/nhc98: line 131:
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/hmake-PRAGMA: No such
file or directory
/usr/local/bin/nhc98: line 547:
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/nhc98comp: No such file
or directory

I then tried to build from source, but with no better luck.  Configure
seems to go smoothly, but the build breaks down quickly:

bash-3.1$ make
ghc  -cpp -o lib/ix86-CYGWIN_NT-5.1/hmake-PRAGMA script/hmake-PRAGMA.hs
cd src/runtime;        make all nhc98heap.exe
make[1]: Entering directory `/c/nhc98-1.18/src/runtime'
Makefile:27: *** target pattern contains no `%'.  Stop.
make[1]: Leaving directory `/c/nhc98-1.18/src/runtime'
make: *** [targets/ix86-CYGWIN_NT-5.1/runtime] Error 2
bash-3.1$ gmake
bash: gmake: command not found
bash-3.1$ which make
/usr/bin/make
bash-3.1$ make
cd src/runtime;        make all nhc98heap.exe
make[1]: Entering directory `/c/nhc98-1.18/src/runtime'
Makefile:27: *** target pattern contains no `%'.  Stop.
make[1]: Leaving directory `/c/nhc98-1.18/src/runtime'
make: *** [targets/ix86-CYGWIN_NT-5.1/runtime] Error 2

Any idea what I might be doing wrong?

    -- Karl Crary

_______________________________________________
Nhc-bugs mailing list
Nhc-bugs@...
http://www.haskell.org/mailman/listinfo/nhc-bugs

Re: Trouble getting nhc98 to work

by Malcolm.Wallace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Karl Crary <crary@...> wrote:

> I was experimenting with nhc98 because I was led to believe that using
> it, I might be able to use the Haskell FFI to link with libraries
> built  using Cygwin.

Should be possible, yes.

> First I tried the binary distribution.  The configure and install
> process seemed to go smoothly, but in my first attempt to use the
> compiler I get:
>
> /usr/local/bin/nhc98: line 131:
> C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/hmake-PRAGMA:
>     No such file or directory

The executable hmake-PRAGMA.exe is certainly included in the tar bundle.
As far as I can see, it should therefore have been installed in the
quoted directory, given the standard installation prefix.  Is it there?
If so, then maybe the driver script for nhc98 just needs to know about
the .exe suffix (but that would seem unlikely in Cygwin).

> I then tried to build from source, but with no better luck.  Configure
> seems to go smoothly, but the build breaks down quickly:
>
> make[1]: Entering directory `/c/nhc98-1.18/src/runtime'
> Makefile:27: *** target pattern contains no `%'.  Stop.

Did you use a Windows-style pathname at configure-time?
(e.g. --prefix="C:\blah")  Replacing that with a Cygwin unix-style
pathname might fix it (e.g. --prefix="/c/blah").

Regards,
    Malcolm
_______________________________________________
Nhc-bugs mailing list
Nhc-bugs@...
http://www.haskell.org/mailman/listinfo/nhc-bugs
LightInTheBox - Buy quality products at wholesale price