-
Notifications
You must be signed in to change notification settings - Fork 31
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
diagrams-contrib install error on Haskell Platform 2013.2.0.0 on Windows #14
Comments
This seems like a problem with the dependency numeric-extras-0.0.3 on Windows and not a bug/problem in diagrams-contrib per se. |
Hmm, strange. I see you have also filed a bug report at ekmett/numeric-extras#1 . I think you're probably right that this is not a diagrams problem per se, but I'm happy to leave this issue open for now since it affects In the meantime, note that you can use
|
numeric-extras-0.0.3 is a dependency of SVGFonts-1.3.0.2 diagrams-svg-0.7 diagrams-lib-0.7 and intervals-0.2.2. So this issue seems to effectively prevent windows users from using diagrams. I don't know how to resolve this, but since the numeric-extras is quite small, it should be relatively easy to overcome for example by reimplementing with pure methods. I will see what I can do. |
Ah, I see, I didn't realize it was also a dependency of |
After some testing I have discovered that while this issue prevents diagrams-contrib from installing, it is indeed possible to use the other packages mentioned - as long as they are used in a compiled program and not within ghci. I have successfully installed the other packages and compiled and ran some examples from the tutorial with the SVG backend. The same small tutorial examples does not run when laoded into ghci. For me, this solves the issue (i.e. allows me to do what I wanted to do). At least until I stumble upon something i diagrams-contrib I really need. |
Has anyone made a fix or found a workaround for this? |
I have a possible workaround in mind I never got around to trying because I didn't need the extra packages. I will test it today or tomorrow. |
I've done some testing, but I don't have a workaround. I verified that this bug exists in the version of Diagrams on Hackage and in HEAD, when using Haskell Platform 2013.10 / GHC 7.6.3. I haven't yet build GHC HEAD on Windows to test, but see below. The most general solution to the numeric-extras / ghci problem is for ghci to load dynamic libraries, and not use the current "GHCi linker". This is the future of GHC. It looks like it will be standard behavior of 7.8 on linux, and probably 7.8.? on BSD. See the first two URLs below. http://ghc.haskell.org/trac/ghc/wiki/DynamicGhcPrograms http://ghc.haskell.org/trac/ghc/ticket/3658 The next link makes it look pretty unlikely that 7.8.1 will have DYNAMIC_TOO on Windows; hence Windows probably won't have DYNAMIC_GHC_PROGRAMS, hence GHCi will still break on ffi. http://ghc.haskell.org/trac/ghc/ticket/7134#comment:23 I think the |
|
That sounds like a very good effort-to-benefit ratio. I think it would also be not-very-hard to fork |
Or you could just ask me to remove it, send me a patch, or patch it to drop the dependency on windows. I'm open to these options, too Sent from my iPhone
|
OK, I'll write a patch and see if I can get it working on Windows. |
is this bug in play with GHC HEAD too? many GHCI linking woes should end with 7.8 ... |
They have a fairly long support window, so even if it was working on HEAD On Thu, Oct 24, 2013 at 1:34 PM, Carter Tazio Schonwald <
|
good point :) |
I did not succeed in my main attempt at a workaround today, but I got another workaround to work. I will describe both here for some input. The descriptions are verbose to give novices a chance to make this work for them. First, my main attempt, where the goal was to ge the package installed. This failed: My thought was to just download the hackage package diagrams-contrib.tar.gz, unzip, untar, manually compile Tree.hs to Tree.o with ghc (which works fine), copy the result from src to the same directory under dist, and then run cabal build. Sadly, cabal build insists on rebuilding Tree.o anyway and still fails in exactly the same way. Then, second attempt, where goal was just to get to actually use diagrams-contrib and get on with building diagrams. This was successfull. Just download the source package, unzip+untar and copy the contents of the src directory (i.e. the Diagrams directory and everything below) to your project directory. The package is not installed, but everything seems to work fine as long as you compile your project. Prerequisite: install diagrams-svg (which works fine). Example: import Diagrams.Backend.SVG.CmdLine ghc Logo.hs note that Logo.hs actually imports Diagrams.TwoD.Layout.Tree which was the (perhaps random) offending part and still works. |
This should be fixed by building against @fegu @3dGrabber Can you confirm that? If so, I'll bump the lower bound and close this issue. |
No, I did cabal update and cabal install intervals just now. It installed intervals-0.3 ok. I even did a ghc-pkg hide intervals-0.2.2 but cabal install diagrams-contrib still gives [..] |
Did you remove any direct numeric-extras dependency from diagrams-contrib? You shouldn't need it any more at all. Sent from my iPhone
|
I should have mentioned that it's necessary to rebuild |
OK, so I unregistered diagrams-lib, diagrams-core and intervals-0.2.2. I then downloaded the cabal file of diagrams-lib and changed the line intervals >= 0.2.2 && < 0.3 to intervals >= 0.2.2 && <= 0.3. From there on, install of all diagrams-packages went smoothly. The dependency of diagrams-lib on intervals should be changed (perhaps even to >=3.0?) |
@fegu Thank you, that's good to hear! I will bump the intervals constraint to >= 3.0 in HEAD. That will be in our upcoming 1.0 release, at least. |
I am sorry for first posting this issue in diagrams/diagrams, but I guess diagrams/diagrams-contrib (here) is better, so here goes.
My quite fresh haskell platform works in every other way, I have several projects compiling and running fine with a lot of dependencies. However, on cabal install diagrams-contrib (or just diagrams) I have an error I haven't been able to resolve:
Could anyone shed some light on this? diagrams-core and diagrams-lib installed fine, as well as svgfonts.
The text was updated successfully, but these errors were encountered: