
I have a problem with Cabal: it doesn't seem to pick up the "Main-is:" option from the configuration file. Here's my "scc.cabal" file. Note the "Main-is:" line:
Name: scc Version: 0.1 Cabal-Version: >= 1.2 Build-Type: Simple License: GPL License-file: LICENSE.txt Copyright: (c) 2008 Mario Blazevic Author: Mario Blazevic Maintainer: blamario@yahoo.com Synopsis: Streaming component combinators
Executable shsh Main-is: Shell.hs Other-Modules: Foundation, ComponentTypes, Components, Combinators Build-Depends: base, containers, process, readline, parsec
Library Exposed-Modules: Foundation, ComponentTypes, Components, Combinators Build-Depends: base, containers
And below are the outputs of Cabal configure and build commands. Note the absence of "--main-is" ghc command-line option. I'm doing this on Ubuntu 8.04 Linux, but I get the same problem with Gentoo. Is there something wrong with my configuration file, or is this a bug in Cabal?
~/scc/pipe$ runhaskell Setup.lhs configure --verbose --prefix=~ Configuring scc-0.1... Dependency base-any: using base-3.0.1.0 Dependency containers-any: using containers-0.1.0.1 Dependency process-any: using process-1.0.0.0 Dependency readline-any: using readline-1.0.1.0 Dependency parsec-any: using parsec-2.1.0.0 Using compiler: ghc-6.8.2 Using install prefix: ~ Binaries installed in: ~/bin Libraries installed in: ~/lib/scc-0.1/ghc-6.8.2 Private binaries installed in: ~/libexec Data files installed in: ~/share/scc-0.1 Documentation installed in: ~/share/doc/scc-0.1 No alex found Using ar found on system at: /usr/bin/ar No c2hs found No cpphs found No ffihugs found Using ghc version 6.8.2 found on system at: /usr/bin/ghc Using ghc-pkg version 6.8.2 found on system at: /usr/bin/ghc-pkg No greencard found Using haddock version 0.8 found on system at: /usr/bin/haddock No happy found No hmake found Using hsc2hs version 0.66-ghc found on system at: /usr/bin/hsc2hs No hscolour found No hugs found No jhc found Using ld found on system at: /usr/bin/ld No nhc98 found No pfesetup found Using pkg-config version 0.22 found on system at: /usr/bin/pkg-config Using ranlib found on system at: /usr/bin/ranlib Using tar found on system at: /bin/tar
~/scc/pipe$ runhaskell Setup.lhs build --verbose Creating dist/build (and its parents) Creating dist/build/autogen (and its parents) Preprocessing library scc-0.1... Preprocessing executables for scc-0.1... Building scc-0.1... Building library... Creating dist/build (and its parents) Creating dist/build (and its parents) /usr/bin/ghc -package-name scc-0.1 --make -hide-all-packages -i -idist/build/autogen -idist/build -i. -Idist/build -odir dist/build -hidir dist/build -stubdir dist/build -package base-3.0.1.0 -package containers-0.1.0.1 -package process-1.0.0.0 -package readline-1.0.1.0 -package parsec-2.1.0.0 -O Foundation ComponentTypes Components Combinators [1 of 4] Compiling Foundation ( Foundation.hs, dist/build/Foundation.o ) [2 of 4] Compiling ComponentTypes ( ComponentTypes.hs, dist/build/ComponentTypes.o ) [3 of 4] Compiling Components ( Components.hs, dist/build/Components.o ) [4 of 4] Compiling Combinators ( Combinators.hs, dist/build/Combinators.o ) Linking... /usr/bin/ar q dist/build/libHSscc-0.1.a dist/build/Foundation.o dist/build/ComponentTypes.o dist/build/Components.o dist/build/Combinators.o /usr/bin/ar: creating dist/build/libHSscc-0.1.a /usr/bin/ld -x -r -o dist/build/HSscc-0.1.o.tmp dist/build/Foundation.o dist/build/ComponentTypes.o dist/build/Components.o dist/build/Combinators.o Building executable: shsh... Creating dist/build/shsh (and its parents) Creating dist/build/shsh/shsh-tmp (and its parents) Creating dist/build/shsh/shsh-tmp (and its parents) /usr/bin/ghc -o dist/build/shsh/shsh --make -hide-all-packages -i -idist/build/autogen -idist/build/shsh/shsh-tmp -i. -Idist/build/shsh/shsh-tmp -odir dist/build/shsh/shsh-tmp -hidir dist/build/shsh/shsh-tmp -stubdir dist/build/shsh/shsh-tmp -package base-3.0.1.0 -package containers-0.1.0.1 -package process-1.0.0.0 -package readline-1.0.1.0 -package parsec-2.1.0.0 -O ./Shell.hs [1 of 5] Compiling Foundation ( Foundation.hs, dist/build/shsh/shsh-tmp/Foundation.o ) [2 of 5] Compiling ComponentTypes ( ComponentTypes.hs, dist/build/shsh/shsh-tmp/ComponentTypes.o ) [3 of 5] Compiling Components ( Components.hs, dist/build/shsh/shsh-tmp/Components.o ) [4 of 5] Compiling Combinators ( Combinators.hs, dist/build/shsh/shsh-tmp/Combinators.o ) [5 of 5] Compiling Shell ( ./Shell.hs, dist/build/shsh/shsh-tmp/Shell.o ) Warning: output was redirected with -o, but no output will be generated because there is no Main module.
Name: scc Version: 0.1 Cabal-Version: >= 1.2 Build-Type: Simple License: GPL License-file: LICENSE.txt Copyright: (c) 2008 Mario Blazevic Author: Mario Blazevic Maintainer: blamario@yahoo.com Synopsis: Streaming component combinators Executable shsh Main-is: Shell.hs Other-Modules: Foundation, ComponentTypes, Components, Combinators Build-Depends: base, containers, process, readline, parsec Library Exposed-Modules: Foundation, ComponentTypes, Components, Combinators Build-Depends: base, containers