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

Failed to install HPDF-1.4.10 #198

Closed
sladdythebrain opened this issue Dec 30, 2018 · 12 comments
Closed

Failed to install HPDF-1.4.10 #198

sladdythebrain opened this issue Dec 30, 2018 · 12 comments

Comments

@sladdythebrain
Copy link

Hello,

I tried to install the tttool on MacOS Mojave (10.14.1) but it fails during install of the HPDF-1.4.10 package... I install Haskell 8.6.3...

Any idea what's wrong here?

Failed to install HPDF-1.4.10
Build log ( /Users/andreas/.cabal/logs/ghc-8.6.3/HPDF-1.4.10-1TQUk5a8UhGKOZP0h7wTTi.log ):
cabal: Entering directory '/var/folders/tf/gsr9_7ld0m19fzc1jsgky1yh0000gp/T/cabal-tmp-26666/HPDF-1.4.10'
Configuring HPDF-1.4.10...
Preprocessing library for HPDF-1.4.10..
Building library for HPDF-1.4.10..
[ 1 of 31] Compiling Graphics.PDF.Data.Trie ( Graphics/PDF/Data/Trie.hs, dist/build/Graphics/PDF/Data/Trie.o )
[ 2 of 31] Compiling Graphics.PDF.Documentation ( Graphics/PDF/Documentation.hs, dist/build/Graphics/PDF/Documentation.o )
[ 3 of 31] Compiling Graphics.PDF.Hyphenate.LowLevel ( Graphics/PDF/Hyphenate/LowLevel.hs, dist/build/Graphics/PDF/Hyphenate/LowLevel.o )
[ 4 of 31] Compiling Graphics.PDF.Hyphenate.English ( Graphics/PDF/Hyphenate/English.hs, dist/build/Graphics/PDF/Hyphenate/English.o )
[ 5 of 31] Compiling Graphics.PDF.Hyphenate ( Graphics/PDF/Hyphenate.hs, dist/build/Graphics/PDF/Hyphenate.o )
[ 6 of 31] Compiling Graphics.PDF.LowLevel.Kern ( Graphics/PDF/LowLevel/Kern.hs, dist/build/Graphics/PDF/LowLevel/Kern.o )
[ 7 of 31] Compiling Graphics.PDF.LowLevel.Serializer ( Graphics/PDF/LowLevel/Serializer.hs, dist/build/Graphics/PDF/LowLevel/Serializer.o )
[ 8 of 31] Compiling Graphics.PDF.LowLevel.Types ( Graphics/PDF/LowLevel/Types.hs, dist/build/Graphics/PDF/LowLevel/Types.o )

Graphics/PDF/LowLevel/Types.hs:220:12: warning: [-Wdeprecations]
In the use of ‘foldWithKey’ (imported from Data.Map):
Deprecated: "As of version 0.4, replaced by 'foldrWithKey'."
|
220 | M.foldWithKey convertItem mempty a
| ^^^^^^^^^^^^^
[ 9 of 31] Compiling Graphics.PDF.Data.PDFTree ( Graphics/PDF/Data/PDFTree.hs, dist/build/Graphics/PDF/Data/PDFTree.o )
[10 of 31] Compiling Graphics.PDF.Coordinates ( Graphics/PDF/Coordinates.hs, dist/build/Graphics/PDF/Coordinates.o )
[11 of 31] Compiling Graphics.PDF.Action ( Graphics/PDF/Action.hs, dist/build/Graphics/PDF/Action.o )
[12 of 31] Compiling Graphics.PDF.Resources ( Graphics/PDF/Resources.hs, dist/build/Graphics/PDF/Resources.o )
[13 of 31] Compiling Graphics.PDF.Draw ( Graphics/PDF/Draw.hs, dist/build/Graphics/PDF/Draw.o )

Graphics/PDF/Draw.hs:256:5: error:
• No instance for (Control.Monad.Fail.MonadFail Draw)
arising from a do statement
with the failable pattern ‘(x : xs)’
• In a stmt of a 'do' block: (x : xs) <- gets supplyNames
In the expression:
do (x : xs) <- gets supplyNames
modifyStrict $ \ s -> s {supplyNames = xs}
return x
In an equation for ‘supplyName’:
supplyName
= do (x : xs) <- gets supplyNames
modifyStrict $ \ s -> ...
return x
|
256 | (x:xs) <- gets supplyNames
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/var/folders/tf/gsr9_7ld0m19fzc1jsgky1yh0000gp/T/cabal-tmp-26666/HPDF-1.4.10'

Thanks and have a nice day,
Andreas

@nomeata
Copy link
Member

nomeata commented Dec 30, 2018

GHC-8.6 is not yet supported, because one of our dependencies seems to be unmaintained, see alpheccar/HPDF#21

You should be able to build with GHC-8.4.

@nomeata
Copy link
Member

nomeata commented Jan 2, 2019

Also see #191 (comment)

@raisken
Copy link

raisken commented Jan 4, 2019

So, apparently all of this discussion becomes obsolete when instead of directly compiling tttool one goes to the tttool directory and does:

stack init
stack build

What happens is that "stack" compiles tttool and just goes back to working versions of all packages.

@nomeata
Copy link
Member

nomeata commented Jan 4, 2019

I guess that is true. I don't use stack myself, but it might be the better option to give to newcomers. I am happy to accept pull requesta that update the docs to use stack.

@raisken
Copy link

raisken commented Jan 4, 2019

After trying to use it: it seems that tttool is only partially functional after using stack in the described way. Apropos "newcomer": I'm pretty much clueless about Haskell, but I can add more comments if I figure out something more pertaining to tttool.

@nomeata
Copy link
Member

nomeata commented Jan 5, 2019

What do you mean with “partially functional”? What goes wrong?

@raisken
Copy link

raisken commented Jan 6, 2019

There are four commands I tried. Help works. Reading the header of a gme file works. Reading other contents of a gme file does not work.
Command:
tttool export Bilderlexikon\ Tiere.gme
Output:
tttool: Bilderlexikon Tiere.gme: openBinaryFile: does not exist (No such file or directory)

Playing a gme file does not work either.
Command:
tttool play Bilderlexikon\ Tiere.gme
Output:
Initial state (not showing zero registers): $0=1
Playing audio sample 824
Could not play audio file.
Do you have "sox" installed?

@nomeata
Copy link
Member

nomeata commented Jan 6, 2019

That looks very suspicious, and I have doubts that the way you build tttool could be responsible.

@raisken
Copy link

raisken commented Jan 7, 2019

Indeed, the first issue was resolved by reinstalling Haskell Platform. The Export and Media commands work now. Play still does not work, but that's not as essential, I guess.

@nomeata
Copy link
Member

nomeata commented Jan 7, 2019

Judging from the error message, you just need to install the sox package. apt install sox on Debian or Ubuntu.

@raisken
Copy link

raisken commented Jan 7, 2019

Seems everything works now. Thanks!

@nomeata
Copy link
Member

nomeata commented Nov 30, 2019

Official build instructions now use nix, which should avoid this problem.

@nomeata nomeata closed this as completed Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants