Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obscure ar error ultimately from missing module header #5868

Open
quasicomputational opened this issue Feb 3, 2019 · 1 comment
Open

Obscure ar error ultimately from missing module header #5868

quasicomputational opened this issue Feb 3, 2019 · 1 comment

Comments

@quasicomputational
Copy link
Contributor

$ cabal new-build all
Build profile: -w ghc-8.6.3 -O1
In order, the following will be built (use -v for more details):
 - foo-1 (lib) (first run)
Configuring library for foo-1..
Preprocessing library for foo-1..
Building library for foo-1..
[1 of 1] Compiling Main             ( Foo.hs, /tmp/foo/dist-newstyle/build/x86_64-linux/ghc-8.6.3/foo-1/build/Main.o )
/usr/bin/ar: /tmp/foo/dist-newstyle/build/x86_64-linux/ghc-8.6.3/foo-1/build/Foo.o: No such file or directory
$ cat foo.cabal 
cabal-version: 2.4
name: foo
version: 1

library
  default-language: Haskell2010
  exposed-modules: Foo
  build-depends: base

$ cat Foo.hs 
main = return ()
$ cabal --version
cabal-install version 2.4.1.0
compiled using version 2.4.1.0 of the Cabal library 

The user's problem here is that Foo.hs needs a module Foo where header, but it's not at all obvious how to figure that out from the ar error.

@phadej
Copy link
Collaborator

phadej commented Feb 3, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants