Cabal fails to install package with executables

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Cabal fails to install package with executables

Alexey Rodriguez Yakushev
Hi! I am making a Cabal package containing executables. Most options to  
the Setup.hs script work except installation. The error seemed so  
obvious that I thought it my own. But trying with one of Cabal's  
testcases I discovered the same error.

Take the wash2hs example found in the tests directory. Taking a quick  
look at (wash2hs.cabal)

http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/Cabal/ 
tests/wash2hs/wash2hs.cabal?rev=1.5;content-type=text%2Fplain

We can see that
  - The sources live in the hs directory
  - The main hs file is WASHMain.hs and
  - The executable is wash2hs

I run "configure" and "build" with no problems, but when calling  
"Setup.hs" with "install -v" I get:

--------
$ runghc Setup.lhs install -v

Installing: /opt/lib/Wash-2hs-1.4.34 & /opt/bin Wash-2hs-1.4.34...
copy dist/build/wash2hs to /opt/bin/wash2hs
*** Exception: dist/build/wash2hs: copyFile: does not exist (No such  
file or directory)
---------

Although the built binary is placed in dist/build/hs, Cabal insists on  
reading the binary from dist/build for installation.

I am running the 6.4.1 GHC generic binary for x86 linux systems. I  
downloaded the test case from the 1.0 distribution of Cabal, I checked  
that it is the same as in CVS.

I welcome all hints.

Cheers,

Alexey

_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries
Reply | Threaded
Open this post in threaded view
|

Re: Cabal fails to install package with executables

Isaac Jones-2
> Installing: /opt/lib/Wash-2hs-1.4.34 & /opt/bin Wash-2hs-1.4.34...
> copy dist/build/wash2hs to /opt/bin/wash2hs
> *** Exception: dist/build/wash2hs: copyFile: does not exist (No such  
> file or directory)

This is a known bug with cabal 1.0 (which is what GHC currently comes
with).  There's a patch that was previously posted on this list, which
you might want to forward to the GHC maintainer for your platform.

Another solution is to use a newer version of cabal, though they are
all "unstable prerelase" versions:
http://haskell.org/cabal/download.html

peace,

  isaac

_______________________________________________
Libraries mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/libraries