typelead / eta-hackage

A set of patches to make Hackage compatible with the Eta language.
64 stars 31 forks source link

Time 1.6.0.1 installation error #17

Closed noughtmare closed 7 years ago

noughtmare commented 7 years ago

Here's the error I get when running epm install time-1.6.0.1 -v:

/home/jaro/.local/bin/cpphs --version
/usr/bin/gcc -dumpversion
/usr/bin/ghc --numeric-version
/usr/bin/ghc-pkg --version
/usr/bin/git --version
/usr/bin/haddock --version
/usr/bin/hpc version
/home/jaro/.local/bin/hsc2hs --version
/usr/bin/pkg-config --version
/usr/bin/tar --help
Reading available packages...
Choosing modular solver.
Resolving dependencies...
Ready to install time-1.6.0.1
Waiting for install task to finish...
Extracting
/home/jaro/.epm/packages/hackage.haskell.org/time/1.6.0.1/time-1.6.0.1.tar.gz
to /tmp/cabal-tmp-22921...
/usr/bin/git --version
Found patch in eta-hackage for time-1.6.0.1
/usr/bin/git -C /tmp/cabal-tmp-22921/time-1.6.0.1 init
/usr/bin/git -C /tmp/cabal-tmp-22921/time-1.6.0.1 apply --ignore-space-change --ignore-whitespace /home/jaro/.epm/patches/patches/time-1.6.0.1.patch
Updating time.cabal with the latest revision from the index.
Configuring time-1.6.0.1...
Dependency base ==4.8.2.0: using base-4.8.2.0
Dependency deepseq ==1.4.2.0: using deepseq-1.4.2.0
Using Cabal-1.22.8.0 compiled by ghc-7.10
Using compiler: eta-0.0.5
Using install prefix: /home/jaro/.epm
Binaries installed in: /home/jaro/.epm/bin
Libraries installed in:
/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/time-1.6.0.1
Private binaries installed in: /home/jaro/.epm/libexec
Data files installed in:
/home/jaro/.epm/share/x86_64-linux-eta-0.0.5-ghc7_10_3/time-1.6.0.1
Documentation installed in:
/home/jaro/.epm/share/doc/x86_64-linux-eta-0.0.5-ghc7_10_3/time-1.6.0.1
Configuration files installed in: /home/jaro/.epm/etc
No alex found
Using ar found on system at: /usr/bin/ar
No c2hs found
Using cpphs version 1.20.2 found on system at: /home/jaro/.local/bin/cpphs
Using eta version 0.0.5 found on system at: /home/jaro/.local/bin/eta
Using eta-pkg version 0.0.5 found on system at: /home/jaro/.local/bin/eta-pkg
Using gcc version 6.2.1 found on system at: /usr/bin/gcc
Using ghc version 8.0.1 found on system at: /usr/bin/ghc
Using ghc-pkg version 8.0.1 found on system at: /usr/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
Using git version 2.11.0 found on system at: /usr/bin/git
No greencard found
Using haddock version 2.17.2 found on system at: /usr/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: /usr/bin/hpc
Using hsc2hs version 0.68.1 found on system at: /home/jaro/.local/bin/hsc2hs
No hscolour found
Using java version 1.7.0.111 found on system at: /usr/bin/java
Using javac version 1.7.0.111 found on system at: /usr/bin/javac
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
Using pkg-config version 0.29.1 found on system at: /usr/bin/pkg-config
Using strip version 2.27 found on system at: /usr/bin/strip
Using tar found on system at: /usr/bin/tar
No uhc found
Component build order: library
creating dist/build
creating dist/build/autogen
Building time-1.6.0.1...
/home/jaro/.local/bin/eta-pkg init dist/package.conf.inplace
Preprocessing library time-1.6.0.1...
creating dist/build/Data/Time/Clock
creating dist/build/Data/Time
creating dist/build/Data
creating dist/build/Data/Time
creating dist/build/Data/Time/Clock
/home/jaro/.local/bin/hsc2hs '--cc=/usr/bin/gcc' '--ld=/usr/bin/gcc' '--cflag=-Ilib/include' '--cflag=-DLANGUAGE_Rank2Types' '--cflag=-DLANGUAGE_DeriveDataTypeable' '--cflag=-DLANGUAGE_StandaloneDeriving' '--cflag=-Idist/build/autogen' '--cflag=-include' '--cflag=dist/build/autogen/cabal_macros.h' '--cflag=-I/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/base-4.8.2.0/include' '--lflag=-L/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/deepseq-1.4.2.0' '--lflag=-Wl,-R,/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/deepseq-1.4.2.0' '--lflag=-L/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/array-0.5.1.1' '--lflag=-Wl,-R,/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/array-0.5.1.1' '--lflag=-L/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/base-4.8.2.0' '--lflag=-Wl,-R,/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/base-4.8.2.0' '--lflag=-L/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/integer-0.5.1.0' '--lflag=-Wl,-R,/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/integer-0.5.1.0' '--lflag=-L/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/ghc-prim-0.4.0.0' '--lflag=-Wl,-R,/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/ghc-prim-0.4.0.0' '--lflag=-L/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/rts-0.1.0.0' '--lflag=-Wl,-R,/home/jaro/.epm/lib/x86_64-linux-eta-0.0.5-ghc7_10_3/rts-0.1.0.0' -o dist/build/Data/Time/Clock/CTimespec.hs lib/Data/Time/Clock/CTimespec.hsc
No template specified, and template-hsc.h not located.

Usage: hsc2hs [OPTIONS] INPUT.hsc [...]

  -o FILE          --output=FILE          name of main output file
  -t FILE          --template=FILE        template file
  -c PROG          --cc=PROG              C compiler to use
  -l PROG          --ld=PROG              linker to use
  -C FLAG          --cflag=FLAG           flag to pass to the C compiler
  -I DIR                                  passed to the C compiler
  -L FLAG          --lflag=FLAG           flag to pass to the linker
  -i FILE          --include=FILE         as if placed in the source
  -D NAME[=VALUE]  --define=NAME[=VALUE]  as if placed in the source
                   --no-compile           stop after writing *_hsc_make.c
  -x               --cross-compile        activate cross-compilation mode
                   --cross-safe           restrict .hsc directives to those supported by --cross-compile
  -k               --keep-files           do not remove temporary files
  -v               --verbose              dump commands to stderr
  -?               --help                 display this help and exit
  -V               --version              output version information and exit
Failed to install time-1.6.0.1
World file is already up to date.
epm: Error: some packages failed to install:
time-1.6.0.1 failed during the building phase. The exception was:
ExitFailure 1
psibi commented 7 years ago

What's your version of eta ?

noughtmare commented 7 years ago

The Eta programming language compiler, version 0.0.5 epm version 0.0.1 using version 1.22.8.0 of the Cabal library

psibi commented 7 years ago

Which OS ?

psibi commented 7 years ago

Also can you do epm update and try again.

noughtmare commented 7 years ago

Archlinux 64 bit

rahulmutt commented 7 years ago

Also, it's easier for us to debug if you do epm install time-1.6.0.1 -v so we can trace the code path in epm.

noughtmare commented 7 years ago

@rahulmutt I've updated the description. @psibi epm update says already up to date.

psibi commented 7 years ago

Is this specific with 1.6.0.1 or is the latest time installing properly ?

noughtmare commented 7 years ago

1.7.0.1 does install

rahulmutt commented 7 years ago

@noughtmare It looks like your hsc2hs installation is broken, it's unable find some template. But that's besides the point - hsc2hs should never be called with epm in the first place. The patch is to remove Data.Time.Clock.CTimespec from other-modules: so it doesn't try to compile an .hsc file.

noughtmare commented 7 years ago

I ran stack install hsc2hs and now epm install time-1.6.0.1 works correctly, thank you!

hsc2hs should never be called with epm in the first place. The patch is to remove Data.Time.Clock.CTimespec from other-modules: so it doesn't try to compile an .hsc file.

Does this mean I should leave this issue open?

rahulmutt commented 7 years ago

Yes, please!

psibi commented 7 years ago

@rahulmutt Why do you feel this issue should be left open ? Is there anything we should do on epm side to fix this ?

rahulmutt commented 7 years ago

We should fix the time patches so they don't include any .hsc modules in the cabal file, that way it won't trigger hsc2hs. epm can be left alone.

rahulmutt commented 7 years ago

Done. It turns out that time-1.7.0.1 has no .hsc files while time-1.6.0.1 did, which is why the former worked and the latter didn't. Thanks for the report @noughtmare!