Open david-hoze opened 8 years ago
Hi there,
How did you build and install diagrams?
If you fix the "real bug" and then compile using the cairo backend does it work, or does it still give the same errors about not being able to find certain modules?
I don't know whether https://groups.google.com/forum/#!topic/diagrams-discuss/DY3M38X0dbA is the same problem. The difference there was the version of GHC used, and the error message received from GHC 7.10 would not have been an error with GHC 7.8, it is due to some changes in the way inferred types are handled.
I'm running into this sample problem while trying to use org-babel-diagrams
. When I hit C-c C-c
to evaluate the code block, I get the same error as above. When I use "trick" to capture the bug.hs
file and then run ghc --make bug.hs
from within Emacs, it seems to compile just fine. I'm not quite sure, therefore, what the disconnect is that's triggering the failed build.
That is:
~ $ diagrams-builder-cairo /var/folders/ds/nt2q1_s57cqgt9g94_vmkjcw0000gn/T/babel-nYlDkB/diagrams-inputPBWNyb
Error while compiling /var/folders/ds/nt2q1_s57cqgt9g94_vmkjcw0000gn/T/babel-nYlDkB/diagrams-inputPBWNyb
/var/folders/ds/nt2q1_s57cqgt9g94_vmkjcw0000gn/T/Diagram70190-0.hs:4:1: error:
Could not find module ‘Diagrams.Prelude’
Use -v to see a list of the files searched for.
/var/folders/ds/nt2q1_s57cqgt9g94_vmkjcw0000gn/T/Diagram70190-0.hs:5:1: error:
Could not find module ‘Diagrams.Backend.Cairo’
Use -v to see a list of the files searched for.
~ $ ghc --make /var/folders/ds/nt2q1_s57cqgt9g94_vmkjcw0000gn/T/bug.hs
[1 of 1] Compiling Diagram67467 ( /var/folders/ds/nt2q1_s57cqgt9g94_vmkjcw0000gn/T/bug.hs, /var/folders/ds/nt2q1_s57cqgt9g94_vmkjcw0000gn/T/bug.o ) [flags changed]
Where bug.hs
should be a capture of what diagrams-builder-cairo
is trying to compile.
Hi, when I compile my latex file using the cairo backend I get
Which was not the real bug. I had to catch the temporary file using a hacky loop in
/tmp
:remove the duplicates (the time it takes to remove the temporary file), and then compile it using:
to get the real error message. Happened also to this guy: https://groups.google.com/forum/#!topic/diagrams-discuss/DY3M38X0dbA.
Thanks.
versions used diagrams-builder: 0.7.2.0 ghc: 7.10.2 diagrams-core: 1.3.0.3 diagrams-cairo: 1.3.0.5 NixOS: https://github.com/nixos/nixpkgs/commit/819a375382dc86bcc3ee685bb54eafbf449f0c1f