Open abhi18av opened 7 years ago
I've been careful with the install
corrode git/master
⯠stack setup
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-7.10.3.
Installed GHC. stack will use a locally installed GHC
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
I've been trying to set it up again, used the very basic cabal install
things
⯠cabal install
Resolving dependencies...
Configuring corrode-0.1.0.0...
Building corrode-0.1.0.0...
Failed to install corrode-0.1.0.0
Build log ( /Users/eklavya/.cabal/logs/corrode-0.1.0.0.log ):
cabal: Entering directory '.'
Configuring corrode-0.1.0.0...
Building corrode-0.1.0.0...
Preprocessing library corrode-0.1.0.0...
src/Language/Rust/Corrode/C.lhs:1:1: error:
File name does not match module name:
Saw: âMainâ
Expected: âLanguage.Rust.Corrode.Câ
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
corrode-0.1.0.0 failed during the building phase. The exception was:
ExitFailure 1
Sorry it's taken me a while to get back to you! I have a couple questions:
Is src/Language/Rust/Corrode/C.lhs
empty in your checkout?
Which filesystem type is your home directory on?
I'm guessing that error message means the compiler didn't see any source text in the file. We've previously seen this happen on Windows due to weird handling of symbolic links there. If you aren't using the Mac default of HFS+ I could imagine symlinks might be a problem for you too.
No issues, I understand :)
Yes, the contents of the C.lhs
are,
C.md
And regarding the information about the machine, still running on Yosemite
⯠uname -a
Darwin abhinavs-MBP.Home 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
I have the same problem on Windows 10 64bit, compiling latest master (34053342c2f1ca04f23ad94d) with stack build
I could bypass the problem by removing the .lhs files with .md links and renaming the .md files to .lhs
I got a similar error on OSX too:
~> cabal install
Resolving dependencies...
Downloading base-compat-0.10.4...
Downloading syb-0.7...
Configuring syb-0.7...
Configuring base-compat-0.10.4...
Building syb-0.7...
Building base-compat-0.10.4...
Installed syb-0.7
Downloading language-c-0.6.1...
Configuring language-c-0.6.1...
Building language-c-0.6.1...
Installed base-compat-0.10.4
Downloading markdown-unlit-0.5.0...
Configuring markdown-unlit-0.5.0...
Building markdown-unlit-0.5.0...
Installed markdown-unlit-0.5.0
Failed to install language-c-0.6.1
Build log ( /Users/jq/.cabal/logs/ghc-8.4.3/language-c-0.6.1-5v6oYERi1tRAptXLR6wS7O.log ):
cabal: Entering directory '/var/folders/5y/qnqlwlt14mz19xvmpvtnwrzr0000gn/T/cabal-tmp-10665/language-c-0.6.1'
Configuring language-c-0.6.1...
Preprocessing library for language-c-0.6.1..
Building library for language-c-0.6.1..
[ 1 of 39] Compiling Language.C.Analysis.NameSpaceMap ( src/Language/C/Analysis/NameSpaceMap.hs, dist/build/Language/C/Analysis/NameSpaceMap.o )
[ 2 of 39] Compiling Language.C.Data.InputStream ( src/Language/C/Data/InputStream.hs, dist/build/Language/C/Data/InputStream.o )
[ 3 of 39] Compiling Language.C.Data.Name ( src/Language/C/Data/Name.hs, dist/build/Language/C/Data/Name.o )
[ 4 of 39] Compiling Language.C.Data.Position ( src/Language/C/Data/Position.hs, dist/build/Language/C/Data/Position.o )
[ 5 of 39] Compiling Language.C.Data.Node ( src/Language/C/Data/Node.hs, dist/build/Language/C/Data/Node.o )
[ 6 of 39] Compiling Language.C.Data.Ident ( src/Language/C/Data/Ident.hs, dist/build/Language/C/Data/Ident.o )
[ 7 of 39] Compiling Language.C.Data.Error ( src/Language/C/Data/Error.hs, dist/build/Language/C/Data/Error.o )
[ 8 of 39] Compiling Language.C.Data ( src/Language/C/Data.hs, dist/build/Language/C/Data.o )
[ 9 of 39] Compiling Language.C.Data.RList ( src/Language/C/Data/RList.hs, dist/build/Language/C/Data/RList.o )
[10 of 39] Compiling Language.C.Parser.Builtin ( src/Language/C/Parser/Builtin.hs, dist/build/Language/C/Parser/Builtin.o )
[11 of 39] Compiling Language.C.Syntax.Constants ( src/Language/C/Syntax/Constants.hs, dist/build/Language/C/Syntax/Constants.o )
[12 of 39] Compiling Language.C.Parser.Tokens ( src/Language/C/Parser/Tokens.hs, dist/build/Language/C/Parser/Tokens.o )
[13 of 39] Compiling Language.C.Parser.ParserMonad ( src/Language/C/Parser/ParserMonad.hs, dist/build/Language/C/Parser/ParserMonad.o )
[14 of 39] Compiling Language.C.Parser.Lexer ( dist/build/Language/C/Parser/Lexer.hs, dist/build/Language/C/Parser/Lexer.o )
[15 of 39] Compiling Language.C.Syntax.Ops ( src/Language/C/Syntax/Ops.hs, dist/build/Language/C/Syntax/Ops.o )
[16 of 39] Compiling Language.C.Syntax.AST ( src/Language/C/Syntax/AST.hs, dist/build/Language/C/Syntax/AST.o )
[17 of 39] Compiling Language.C.Syntax ( src/Language/C/Syntax.hs, dist/build/Language/C/Syntax.o )
[18 of 39] Compiling Language.C.Pretty ( src/Language/C/Pretty.hs, dist/build/Language/C/Pretty.o )
src/Language/C/Pretty.hs:60:40: error:
Ambiguous occurrence â<>â
It could refer to either âPrelude.<>â,
imported from âPreludeâ at src/Language/C/Pretty.hs:15:8-24
(and originally defined in âGHC.Baseâ)
or âText.PrettyPrint.HughesPJ.<>â,
imported from âText.PrettyPrint.HughesPJâ at src/Language/C/Pretty.hs:23:1-32
|
60 | attrlistP attrs = text "__attribute__" <> parens (parens (hcat . punctuate comma . map pretty $ attrs))
| ^^
The entire log is here: https://pastebin.com/5Vhc8GGk
Packages:
~> gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
~> ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.3
~> cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library
I get this error on linux, too (even after renaming).
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
Configuring corrode-0.1.0.0...
Building corrode-0.1.0.0...
Failed to install corrode-0.1.0.0
Build log ( .../.cabal/logs/corrode-0.1.0.0.log ):
cabal: Entering directory '.'
Configuring corrode-0.1.0.0...
Building corrode-0.1.0.0...
Preprocessing library corrode-0.1.0.0...
src/Language/Rust/Corrode/C.lhs:1:1: error:
File name does not match module name:
Saw: âMainâ
Expected: âLanguage.Rust.Corrode.Câ
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
corrode-0.1.0.0 failed during the building phase. The exception was:
ExitFailure 1
~> gcc --version
gcc (Gentoo 8.3.0-r1 p1.1) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~> ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.0.2
~> cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
Hi @jameysharp
FIrst off, I think this is an amazing project and a great contribution to community - Thanks đ
I wanted to try this on some small
c
files but I'm unable tostack install
corrode properly.Could you please help me out?
This project can be a life saver for me right now.