Cabal fails to install package with executables

Alexey Rodriguez Yakushev alexey at
Tue Dec 6 15:37:07 EST 2005

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) 

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.



More information about the Libraries mailing list