Installing EclipseFp 2.3.2. / SourceGraph

Help
audle
2012-11-21
2012-12-06
  • audle
    audle
    2012-11-21

    Hello,

    when I open EclipseFp for the first time, installing the SourceGraph package fails:

    Resolving dependencies…
    cabal: cannot configure Cabal-1.14.0. It requires containers >=0.1 && <0.5
    For the dependency on containers >=0.1 && <0.5 there are these packages:
    containers-0.1.0.0, containers-0.1.0.1, containers-0.2.0.0,
    containers-0.2.0.1, containers-0.3.0.0, containers-0.4.0.0,
    containers-0.4.1.0, containers-0.4.2.0 and containers-0.4.2.1. However none of
    them are available.

    cabal install Cabal-1.14.0 gives

    Resolving dependencies…
    No packages to be installed. All the requested packages are already installed.

    .cabal/lib/ contains containers-0.4.2.1 as well as containers-0.5.1.0

    Could you tell me how to fix this?

    Greetings,
    audle

     
  • audle
    audle
    2012-11-21

    Probably this isn't EclipseFp specific, but I thought maybe someone came across this too- thanks!

     
  • JP Moresmau
    JP Moresmau
    2012-11-23

    Well, I don't know sorry. I have the latest platform with GHC 7.4.2, Cabal 1.14.0 and SourceGraph installs. You may want to send a mail to the maintainer of SourceGraph Ivan.Miljenovic@gmail.com

     
  • audle
    audle
    2012-11-26

    Thanks, this error somehow disappeared.

    Now, whenever I open eclipse, a dialoge appears which says this:

    I click on "Install" and after some time the installation process of a lot package, among others hlint, stylish-haskell and SourceGraph, ends. The last thing the console says is:
    "Linking dist/build/SourceGraph/SourceGraph …
    Installing executable(s) in /home/X/.cabal/bin"

    I don't think that scion-browser-0.2.12 got installed. How can this be installed?
    "cabal install scion-browser"
    gives
    "cabal: cannot configure scion-browser-0.2.12. It requires ghc >=7
    There is no available version of ghc that satisfies >=7"

    I read here ( http://code.google.com/p/scion-lib/issues/detail?id=53 ) that to install  scion-browser, you have to use the automatic package installation procedure, I assumed that this is what happens after I clicked "Install". However, as I said I think that scrion-browser did not get installed this way. What do I have to do?

     
  • JP Moresmau
    JP Moresmau
    2012-11-26

    The install seems to have worked fine, but maybe your PATH is not set up properly in EclipseFP? Are you on Mac OS, that's a common pitfall… You can check in /home/X/.cabal/bin that the executable scion-browser and buildwrapper are present. If they are (and recent) don't bother reinstalling, it's only that EclipseFP can't find them. Check your path, or click cancel and try to add them manually in the preferences.
    Hope this helps

     
  • audle
    audle
    2012-11-26

    No,  /home/X/.cabal/bin contains for example SourceGraph and stylish-haskell, but it does not contain scion-browser or buildwrapper.

    I am on Ubuntu 12.04 LTS.

     
  • JP Moresmau
    JP Moresmau
    2012-11-26

    Then in the install dialog, uncheck "install optional helper executable" and try again to install buildwrapper and scion-browser, you must have some proper errors about them (the ghc error should not happen, you have GHc 7.x, right?)

     
  • audle
    audle
    2012-11-26

    Yes, "ghc -version" gives "The Glorious Glasgow Haskell Compilation System, version 7.4.2".

    Um, I get the same error as if I would do it via cabal install:
    "Resolving dependencies…
    cabal: cannot configure scion-browser-0.2.12. It requires ghc >=7
    There is no available version of ghc that satisfies >=7"

     
  • JP Moresmau
    JP Moresmau
    2012-11-26

    try with -verbose to see if there isn't a deeper reason?
    Also, check http://code.google.com/p/scion-lib/issues/detail?id=53 which describes a similar issue; Run ghc-pkg -list to check that the ghc library is actually present.

     
  • audle
    audle
    2012-11-26

    -verbose doesn't yield a different error.

    ghc-pkg list: http://hpaste.org/78303
    ghc-pkg check: http://hpaste.org/78305

    another thing I noticed:
    $PATH is

    /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/X/.cabal/bin

    /usr/local/bin contains a cabal file which was last modified Fri 01 Jun 2012
    /home/X/.cabal/bin contains a cabal file which was last modified Thu 22 Nov 2012

    As above said, during the installation I got

    Linking dist/build/SourceGraph/SourceGraph … Installing executable(s) in /home/X/.cabal/bin

    but when I uncheck "install optional helper executable" I see in the progress bar:
    "Running executable /usr/local/bin/cabal" (while executing cabal update)
    Don't know if this is important., but 'm wondering why different pathes are used?

    Another thing I noticed, "Installing executable buildwrapper" in the progress bar seems to work, after "Installing executable scion-browser" the error appears

    Thank for your effort.

     
  • JP Moresmau
    JP Moresmau
    2012-11-26

    Mmh, I don't see ghc in your output so I'd say buildwrapper didn't install either. Something's really wrong, given the number of broken packages. You haven 't installed the full haskell platform for your OS, that's the recommended way. Also you seem to have two versions of Cabal library installed… And of course you need the "ghc" library to be able to use the ghc code as a library, not just the ghc executable.

     
  • audle
    audle
    2012-11-28

    Ok, I set up a new Haskell Platform. Now there are no error messages when I open Eclise. Autocompletion, syntax highlighting and source graph work. But I could not manage to get the follwoing to work:

    - Hlint (like when I save a file with main = do print "test" there is no warning to omit the do)
    - Hoogle (I can set the local and hackage crosses but it says 'No database loaded or Hoogle not present')
    In Window > Preferences > Haskell > Helper executables I set Hoogle executable to '/home/X/.cabal/bin/hoogle', I also did this for HLint, Snap, SourceGraph and Sytlish Haskell with the corresponding pathes.

    - I tried to use profiling, but I get 'Most RTS options are disabled. Link with -rtsopts to enable them' in the console. Where do I have to set this flag? I tried to set it in Window > Preferences > Haskell > Haskell Implementations > GHC Options > in the extra compiler options field.

     
  • JP Moresmau
    JP Moresmau
    2012-11-28

    HLint: runs only when you build the project, are you sure the project is built or you're on auto build? Then maybe your code is perfect (-:

    Does Hoogle work on the command line? Sometimes there's permission issue on the hoogle database. Otherwise in the preferences for scion browser you can turn on debug mode and see if there's some more info in the scion-browser console.

    Add ghc-options: -rtsopts in your cabal file on your executable section and rebuilt the project to enable profiling. The preferences are only for new projects.

     
  • audle
    audle
    2012-11-28

    Thanks, your hint regarding Hoogle put me on the right track.

    ghc-options: As I see it I have three lines which have to do something with executable:
    - executable-dynamic: False
    - executable-profiling: False
    - executable-stripping: True
    where do I have to put  -rtsopts exactly?

    No I'm not sure if I am building the project. Building means compiling the files into an executable, doesn't it? I have "Build Automatically" enabled, and whenever I save the file I see "building the project" in the right corner for a short time, but I don't see any executable files / files computed during compiliation in my workspace / project folder. Also, as I said there are no Warnings when I put redundant "do"s before single-IO-Actions or add addtional brackets and save the file.

     
  • JP Moresmau
    JP Moresmau
    2012-11-28

    In the Cabal source, you should have a ghc-options field, just add -rtsopts at the end. the others things you have there are other options for GHC.
    Yes, if you have the automatic build checked in, your project is built automatically. The executable is in .dist-buildwrapper/dist/build/<project-name> inside your project. HLint should run if you've create the project as an Haskell project, in the project properties you should see the HLint builder in the list of builders.

     
  • audle
    audle
    2012-11-29

    This is my cabal file, I cannot find this field there: http://hpaste.org/78441

    I made a video in which I create a Haskell project, check that the Hlint Builder is there and that the path is set. I don't know what I am doing wrong, there are no warnings displayed: https://vimeo.com/54486436

     
  • audle
    audle
    2012-11-29

    Sorry, I just saw that I looked at the wrong cabal file :)