GithubHelp home page GithubHelp logo

webghc / ghc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ghc/ghc

13.0 13.0 1.0 213.7 MB

Mirror of the Glasgow Haskell Compiler. Patches are best submitted to GHC's Phabricator (https://phabricator.haskell.org/), bugs and feature-requests are best filed to GHC's Trac (https://ghc.haskell.org/trac/ghc), or sent to the mailing list ([email protected]). First time contributors are encouraged to get started by just sending a Pull Request.

Home Page: http://www.haskell.org/ghc/

License: Other

Python 0.43% Makefile 2.16% Haskell 82.57% Shell 0.34% Perl 0.07% C 10.66% Logos 0.49% Yacc 0.23% Pascal 0.49% TeX 0.01% M4 0.21% Emacs Lisp 0.01% Objective-C 0.03% C++ 0.42% Terra 1.82% Batchfile 0.01% HTML 0.02% CSS 0.01% Assembly 0.03% DTrace 0.01%

ghc's People

Contributors

andygill avatar autc04 avatar batterseapower avatar benl23x5 avatar bgamari avatar dcoutts avatar donsbot avatar dreixel avatar dterei avatar ezyang avatar ggreif avatar hvr avatar igfoo avatar julian-seward1 avatar mchakravarty avatar mistuke avatar mpickering avatar niteria avatar nomeata avatar osa1 avatar pcapriotti avatar pepeiborra avatar rrthomas avatar rwbarton avatar ryanglscott avatar simonmar avatar thomie avatar treeowl avatar twanvl avatar yav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

dfordivam

ghc's Issues

The `primitive` haskell lib does not build

Seems we still have a codegen problem.

$ nix-build -A nixpkgsWasm.haskell.packages.ghcHEAD.primitive

@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
setupCompilerEnvironmentPhase
Build with /nix/store/sr37s1m1c1wjlfbw3fbz2m4xy5bnk8d8-wasm32-unknown-unknown-wasm-ghc-8.5.20180424.
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/jn648vh2xy6iqxph86b6nryzjrlpzc2l-primitive-0.6.4.0.tar.gz
source root is primitive-0.6.4.0
setting SOURCE_DATE_EPOCH to timestamp 1527705516 of file primitive-0.6.4.0/test/primitive-tests.cabal
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
Replace Cabal file with edited version from http://hackage.haskell.org/package/primitive-0.6.4.0/revision/1.cabal.
Run jailbreak-cabal to lift version restrictions on build inputs.
@nix { "action": "setPhase", "phase": "compileBuildDriverPhase" }
compileBuildDriverPhase
setupCompileFlags: -package-db=/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/setup-package.conf.d -j4 -threaded
[1 of 1] Compiling Main             ( Setup.hs, /tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/Main.o )
Linking Setup ...
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
configureFlags: --verbose --prefix=/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm --libdir=$prefix/lib/$compiler --libsubdir=$pkgid --with-gcc=wasm32-unknown-unknown-wasm-clang --package-db=/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/package.conf.d --ghc-option=-j4 --disable-split-objs --enable-library-profiling --profiling-detail=all-functions --disable-profiling --disable-shared --disable-coverage --disable-executable-dynamic --disable-tests --enable-library-vanilla --enable-library-for-ghci --configure-option=--host=wasm32-unknown-unknown-wasm --with-ghc=wasm32-unknown-unknown-wasm-ghc --with-ghc-pkg=wasm32-unknown-unknown-wasm-ghc-pkg --with-gcc=wasm32-unknown-unknown-wasm-cc --with-ld=wasm32-unknown-unknown-wasm-ld --with-hsc2hs=wasm32-unknown-unknown-wasm-hsc2hs --with-strip=wasm32-unknown-unknown-wasm-strip --hsc2hs-option=--cross-compile --ghc-option=-optl --ghc-option=-Wl,--export=main --extra-include-dirs=/nix/store/ykykk9gjk2h6za56hzl2d4ys9q6wh15c-libiconv-1.15-wasm32-unknown-unknown-wasm/include --extra-lib-dirs=/nix/store/ykykk9gjk2h6za56hzl2d4ys9q6wh15c-libiconv-1.15-wasm32-unknown-unknown-wasm/lib
Using Parsec parser
Configuring primitive-0.6.4.0...
Dependency base -any: using base-4.12.0.0
Dependency ghc-prim -any: using ghc-prim-0.5.2.0
Dependency transformers -any: using transformers-0.5.5.0
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
Source component graph: component lib
Configured component graph:
    component primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7
        include base-4.12.0.0
        include ghc-prim-0.5.2.0
        include transformers-0.5.5.0
Linked component graph:
    unit primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7
        include base-4.12.0.0
        include ghc-prim-0.5.2.0
        include transformers-0.5.5.0
        Control.Monad.Primitive=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Control.Monad.Primitive,Data.Primitive=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive,Data.Primitive.Addr=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.Addr,Data.Primitive.Array=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.Array,Data.Primitive.ByteArray=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.ByteArray,Data.Primitive.MVar=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.MVar,Data.Primitive.MachDeps=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.MachDeps,Data.Primitive.MutVar=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.MutVar,Data.Primitive.PrimArray=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.PrimArray,Data.Primitive.Ptr=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.Ptr,Data.Primitive.SmallArray=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.SmallArray,Data.Primitive.Types=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.Types,Data.Primitive.UnliftedArray=primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7:Data.Primitive.UnliftedArray
Ready component graph:
    definite primitive-0.6.4.0-2YnD1Z7OxvBF6KH7JR7JY7
        depends base-4.12.0.0
        depends ghc-prim-0.5.2.0
        depends transformers-0.5.5.0
Using Cabal-2.1.0.0 compiled by ghc-8.5
Using compiler: ghc-8.5.20180424
Using install prefix:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm
Executables installed in:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm/bin
Libraries installed in:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm/lib/ghc-8.5.20180424/primitive-0.6.4.0
Dynamic Libraries installed in:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm/lib/ghc-8.5.20180424/wasm32-unknown-wasm-ghc-8.5.20180424
Private executables installed in:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm/libexec/wasm32-unknown-wasm-ghc-8.5.20180424/primitive-0.6.4.0
Data files installed in:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm/share/wasm32-unknown-wasm-ghc-8.5.20180424/primitive-0.6.4.0
Documentation installed in:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm/share/doc/wasm32-unknown-wasm-ghc-8.5.20180424/primitive-0.6.4.0
Configuration files installed in:
/nix/store/bw7qmsj0r0pw4pi7k2rm8362gh3g6218-primitive-0.6.4.0-wasm32-unknown-unknown-wasm/etc
No alex found
Using ar found on system at:
/nix/store/8da6py0i79w7qhx0zicqyd7icm1kqdq2-llvm-binutils-7.0.0/bin/wasm32-unknown-unknown-wasm-ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 4.2.1 given by user at:
/nix/store/y8ykrnqgq04a9d08niyd8zfcpvi5hgzf-wasm32-unknown-unknown-wasm-clang-cross-wrapper/bin/wasm32-unknown-unknown-wasm-cc
Using ghc version 8.5.20180424 given by user at:
/nix/store/sr37s1m1c1wjlfbw3fbz2m4xy5bnk8d8-wasm32-unknown-unknown-wasm-ghc-8.5.20180424/bin/wasm32-unknown-unknown-wasm-ghc
Using ghc-pkg version 8.5.20180424 given by user at:
/nix/store/sr37s1m1c1wjlfbw3fbz2m4xy5bnk8d8-wasm32-unknown-unknown-wasm-ghc-8.5.20180424/bin/wasm32-unknown-unknown-wasm-ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.18.2 found on system at:
/nix/store/cvsnpd2jj0395k08vwidfjbqxv64586g-ghc-8.5.20180118/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at:
/nix/store/cvsnpd2jj0395k08vwidfjbqxv64586g-ghc-8.5.20180118/bin/hpc
Using hsc2hs version 0.68.3 given by user at:
/nix/store/sr37s1m1c1wjlfbw3fbz2m4xy5bnk8d8-wasm32-unknown-unknown-wasm-ghc-8.5.20180424/bin/wasm32-unknown-unknown-wasm-hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/q0cprnyqwwlfmvqaamd1l4fka2h0xp0k-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld given by user at:
/nix/store/y8ykrnqgq04a9d08niyd8zfcpvi5hgzf-wasm32-unknown-unknown-wasm-clang-cross-wrapper/bin/wasm32-unknown-unknown-wasm-ld
No lhc found
No lhc-pkg found
No pkg-config found
Using runghc version 8.5.20180118 found on system at:
/nix/store/cvsnpd2jj0395k08vwidfjbqxv64586g-ghc-8.5.20180118/bin/runghc
Using strip given by user at:
/nix/store/8da6py0i79w7qhx0zicqyd7icm1kqdq2-llvm-binutils-7.0.0/bin/wasm32-unknown-unknown-wasm-strip
Using tar found on system at:
/nix/store/wpdkxjpwj0yihaixbmamdlzrpw5vn944-gnutar-1.30/bin/tar
No uhc found
@nix { "action": "setPhase", "phase": "buildPhase" }
building
Preprocessing library for primitive-0.6.4.0..
Building library for primitive-0.6.4.0..
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
[ 1 of 15] Compiling Control.Monad.Primitive ( Control/Monad/Primitive.hs, dist/build/Control/Monad/Primitive.o )
clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
[ 2 of 15] Compiling Data.Primitive.Internal.Compat ( Data/Primitive/Internal/Compat.hs, dist/build/Data/Primitive/Internal/Compat.o )
clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
[ 3 of 15] Compiling Data.Primitive.Array ( Data/Primitive/Array.hs, dist/build/Data/Primitive/Array.o )
clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
[ 4 of 15] Compiling Data.Primitive.MVar ( Data/Primitive/MVar.hs, dist/build/Data/Primitive/MVar.o )
clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
[ 5 of 15] Compiling Data.Primitive.MachDeps ( Data/Primitive/MachDeps.hs, dist/build/Data/Primitive/MachDeps.o )
clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]
[ 6 of 15] Compiling Data.Primitive.Internal.Operations ( Data/Primitive/Internal/Operations.hs, dist/build/Data/Primitive/Internal/Operations.o )
clang-7: warning: argument unused during compilation: '-fno-strict-overflow' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-nostdlib++' [-Wunused-command-line-argument]
clang-7: warning: argument unused during compilation: '-rtlib=compiler-rt' [-Wunused-command-line-argument]

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:652:15: error:
     error: conflicting types for 'hsprimitive_memset_Word8'
    |
652 | {extern void (hsprimitive_memset_Word8)(void *, I_, W_, I_);
    |               ^
{extern void (hsprimitive_memset_Word8)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:97:15: error:
     note: previous declaration is here
   |
97 | {extern void (hsprimitive_memset_Word8)(void *, I_, W_, W_);
   |               ^
{extern void (hsprimitive_memset_Word8)(void *, I_, W_, W_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:763:15: error:
     error: conflicting types for 'hsprimitive_memset_Word16'
    |
763 | {extern void (hsprimitive_memset_Word16)(void *, I_, W_, I_);
    |               ^
{extern void (hsprimitive_memset_Word16)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:208:15: error:
     note: previous declaration is here
    |
208 | {extern void (hsprimitive_memset_Word16)(void *, I_, W_, W_);
    |               ^
{extern void (hsprimitive_memset_Word16)(void *, I_, W_, W_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:874:15: error:
     error: conflicting types for 'hsprimitive_memset_Word32'
    |
874 | {extern void (hsprimitive_memset_Word32)(void *, I_, W_, I_);
    |               ^
{extern void (hsprimitive_memset_Word32)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:319:15: error:
     note: previous declaration is here
    |
319 | {extern void (hsprimitive_memset_Word32)(void *, I_, W_, W_);
    |               ^
{extern void (hsprimitive_memset_Word32)(void *, I_, W_, W_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:985:15: error:
     error: conflicting types for 'hsprimitive_memset_Word64'
    |
985 | {extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgInt64);
    |               ^
{extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgInt64);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:430:15: error:
     note: previous declaration is here
    |
430 | {extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgWord64);
    |               ^
{extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgWord64);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:1096:15: error:
     error: conflicting types for 'hsprimitive_memset_Word'
     |
1096 | {extern void (hsprimitive_memset_Word)(void *, I_, W_, I_);
     |               ^
{extern void (hsprimitive_memset_Word)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:541:15: error:
     note: previous declaration is here
    |
541 | {extern void (hsprimitive_memset_Word)(void *, I_, W_, W_);
    |               ^
{extern void (hsprimitive_memset_Word)(void *, I_, W_, W_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:2206:15: error:
     error: conflicting types for 'hsprimitive_memset_Word8'
     |
2206 | {extern void (hsprimitive_memset_Word8)(void *, I_, W_, I_);
     |               ^
{extern void (hsprimitive_memset_Word8)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:97:15: error:
     note: previous declaration is here
   |
97 | {extern void (hsprimitive_memset_Word8)(void *, I_, W_, W_);
   |               ^
{extern void (hsprimitive_memset_Word8)(void *, I_, W_, W_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:2317:15: error:
     error: conflicting types for 'hsprimitive_memset_Word16'
     |
2317 | {extern void (hsprimitive_memset_Word16)(void *, I_, W_, I_);
     |               ^
{extern void (hsprimitive_memset_Word16)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:208:15: error:
     note: previous declaration is here
    |
208 | {extern void (hsprimitive_memset_Word16)(void *, I_, W_, W_);
    |               ^
{extern void (hsprimitive_memset_Word16)(void *, I_, W_, W_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:2428:15: error:
     error: conflicting types for 'hsprimitive_memset_Word32'
     |
2428 | {extern void (hsprimitive_memset_Word32)(void *, I_, W_, I_);
     |               ^
{extern void (hsprimitive_memset_Word32)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:319:15: error:
     note: previous declaration is here
    |
319 | {extern void (hsprimitive_memset_Word32)(void *, I_, W_, W_);
    |               ^
{extern void (hsprimitive_memset_Word32)(void *, I_, W_, W_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:2539:15: error:
     error: conflicting types for 'hsprimitive_memset_Word64'
     |
2539 | {extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgInt64);
     |               ^
{extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgInt64);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:430:15: error:
     note: previous declaration is here
    |
430 | {extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgWord64);
    |               ^
{extern void (hsprimitive_memset_Word64)(void *, I_, W_, StgWord64);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:2650:15: error:
     error: conflicting types for 'hsprimitive_memset_Word'
     |
2650 | {extern void (hsprimitive_memset_Word)(void *, I_, W_, I_);
     |               ^
{extern void (hsprimitive_memset_Word)(void *, I_, W_, I_);
              ^

/tmp/nix-build-primitive-0.6.4.0-wasm32-unknown-unknown-wasm.drv-0/ghc128545_0/ghc_46.hc:541:15: error:
     note: previous declaration is here
    |
541 | {extern void (hsprimitive_memset_Word)(void *, I_, W_, W_);
    |               ^
{extern void (hsprimitive_memset_Word)(void *, I_, W_, W_);
              ^
10 errors generated.
`wasm32-unknown-unknown-wasm-cc' failed in phase `C Compiler'. (Exit code: 1)

Panic while linking/ creating static lib for integer-logarithms

Add ghc-options= -staticlib to reproduce

Linking liba.a ...
ghc: panic! (the 'impossible' happened)
  (GHC version 8.5.20180424 for wasm32-unknown-unknown-wasm):
        Data.Binary.Get.runGet at position 136953: Invalid archive header end marker
CallStack (from HasCallStack):
  error, called at libraries/binary/src/Data/Binary/Get.hs:351:5 in binary-0.8.5.1:Data.Binary.Get

From this code compiler/main/AR.hs

Linking stage randomly stops

I have observed this many times now that the compilation stops at linking stage.

First it happened a few times during compiling the ghc libraries, while creating the wasm-cross nixpkgs (this was very annoying, as I had to restart the whole process again)

And this behavior can be easily reproduced while running the ghc testsuite. The compilation stops at the linking stage for random testcases. On recompiling / retrying it mostly works fine.

Here is a simple testsuite runner I created to run the ghc testsuite.
https://github.com/dfordivam/webghc-testsuite-runner

The occurence of this issue is particularly high with this, like 10% -20 % test cases.

fprintCCS_stderr signature mismatch

/nix/store/nmpgb5chlsxb6jdjwl70vqa8wbms3mly-llvm-binutils-7.0.0/bin/wasm32-unknown-unknown-wasm-ld: warning: function signature mismatch: fprintCCS_stderr
>>> defined as (I32, I32, I32) -> void in Profiling.p_o
>>> defined as (I32) -> void in PrimOps.p_o

This is our last signature mismatch!!

Unregisterised code size is two orders of magnitude too large

Just opening an issue for something we've known about for a couple weeks now. Binary sizes are on the order of 100M, which is clearly absurd. @dfordivam thinks this is due to a lack of DCE. This problem is present both with the wasm backend and the native unregisterised backend, so maybe this should be an issue on GHC trac.

As for solutions, it seems reasonable that we could implement some kind of DCE despite the trampolining the C code does. But another idea we had was to switch to the LLVM backend before wasm has tail calls. We could write an implementation for the GHC calling convention (ghccc) that lowers calls into a trampoline ABI. If we enable LTO in LLVM, we might get DCE in the linker before lowering out of bitcode, just based on the ghccc calls.

C FFI Compilation bug

For this code (from bytestring) clang gives error

foreign import ccall unsafe "static stdlib.h &free" c_free_finalizer
    :: FunPtr (Ptr Word8 -> IO ())


./ghc25458_0/ghc_4.hc:153:42: error: use of undeclared identifier 'free'
(W_)&base_GHCziPtr_FunPtr_con_info, (W_)&free

It is solved by adding the appropriate includes in ghc_4.hc

 #include <stdlib.h>

GHC cannot create output dir tree

mkdir tmp
ghc -c csrc/code.c -outputdir tmp/
# This works fine, creates tmp/csrc/code.o
wasm32-unknown-unknown-wasm-ghc -c csrc/code.c -outputdir tmp/
error: unable to open output file 'tmp/csrc/code.o': 'No such file or directory'

Due to this cannot compile cabal projects with c-sources.

Add stage=1 in mk/build.mk

With Stage1Only flag stage2 is still built...

# You may wonder why Stage1Only=YES still builds compiler/stage2. Quoting # simonmar in #7639:
#
#     "strictly speaking building compiler/stage2 is correct, because it is
#     the ghc package that can be used with [ghc-stage1]. If you don't
#     want to build it, then setting stage=1 in your mk/build.mk should
#     disable it."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.