EclipseFP/Mac OS X 10.6.8

Help
Anonymous
2011-10-25
2012-12-06
1 2 3 > >> (Page 1 of 3)
  • Anonymous - 2011-10-25

    Thanks for all the work that you have don on EclipseFP. I am using it for Haskell development on both Ubuntu and Mac OS X. The Ubuntu install works well. But Mac OS X 10.6.8 has one problem that I have encountered. The Hoogle view displays "No database loaded or Hoogle … It also prompts at the beginning of an Eclipse session with Haskell with the "Hoogle data not present window." I don't have this problem on Ubuntu. Hoogle works from the command line in the shell. I've run "hoogle data" several times (from the shell) and hoogle <search-pattern> works from the shell on both Ubuntu and Mac OS X. I've reinstalled hoogle several times on my Mac, deleted local.db in the workspace, rebuilt it, answered yes to "download data" for the "hoogle data not present window…" and nothing changes. I'm stumped. I'm guessing that it has something to do with path name differences between Ubuntu and Mac OS X.

    Can you help? Thanks.

     
  • Anonymous - 2011-11-03

    I have hoogle working with EclipseFP on every platform except Mac OS X (Snow Leopard 10.6.8). It does work from the shell but not with EclipseFP. Please provide some guidance fixing this problem. Is there some obvious configuration error that might explain it.

     
  • Anonymous - 2011-11-03

    Is there any information that I could provide to help? (configuration files, …)

     
  • JP Moresmau

    JP Moresmau - 2011-11-03

    I don't have access to a Mac so I can't really help you. Do you see anything in the console (there should be a scion-browser console in Eclipse that dumps what's happening with scion-browser)?

     
  • Anonymous - 2011-11-04

    Yes, it. It displays a series a messages on the "scion-browser "console. At the start of the eclipse session, it prompts with a "Hoogle data not present" dialog box, despite the fact that I ran "hoogle data" from the command line and am able to "hoogle <pattern>" from the command with no problem. I have run EclipseFP answering both "yes" and "no" to the hoogle data not present prompt. All I get in the Hoogle view is "No database loaded or Hoogle not present". Other than  this problem, EclipseFP seems to function well.

    Here is the "Scion browser " console:

    >> {"filepath":"/Users/pkrupp/Documents/workspace/.metadata/.plugins/net.sf.eclipsefp.haskell.browser/scion-browser-0.1-dbs/local.db","command":"load-local-db","rebuild":true}
    Database loaded
    Adding
    Download http://hackage.haskell.org/packages/archive/ghc/7.0.3/doc/html/ghc.txt
    Sending:
    GET /packages/archive/ghc/7.0.3/doc/html/ghc.txt HTTP/1.1
    Host: hackage.haskell.org
    Content-Length: 0
    User-Agent: hs-HTTP-4000.0.9

    Creating new connection to hackage.haskell.org
    Received:
    HTTP/1.1 404 Not Found
    Date: Fri, 04 Nov 2011 14:22:10 GMT
    Server: Apache/2.2.9 (Debian) mod_python/3.3.1 Python/2.5.2
    Vary: Accept-Encoding
    Content-Length: 355
    Content-Type: text/html; charset=iso-8859-1

    Download http://www.haskell.org/ghc/docs/7.0.3/html/libraries/ghc-7.0.3/ghc.txt
    Sending:
    GET /ghc/docs/7.0.3/html/libraries/ghc-7.0.3/ghc.txt HTTP/1.1
    Host: www.haskell.org
    Content-Length: 0
    User-Agent: hs-HTTP-4000.0.9

    Creating new connection to www.haskell.org
    Received:
    HTTP/1.1 200 OK
    Date: Fri, 04 Nov 2011 14:22:11 GMT
    Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch
    Last-Modified: Sun, 27 Mar 2011 18:33:30 GMT
    ETag: "229634a-e08d7-49f7b104b3280"
    Accept-Ranges: bytes
    Content-Length: 919767
    Vary: Accept-Encoding
    Content-Type: text/plain

    Saving on /Users/pkrupp/Documents/workspace/.metadata/.plugins/net.sf.eclipsefp.haskell.browser/scion-browser-0.1-dbs/local.db
    "ok"
    >> {"new-db":"_all","command":"set-current-db"}
    "ok"
    >> {"module":"","command":"get-modules"}
    >> {"new-db":"_all","command":"set-current-db"}
    "ok"
    >> {"query":"fmap","command":"hoogle-query"}
    >> {"command":"hoogle-data"}
    "ok"
    >> {"new-db":"_all","command":"set-current-db"}
    "ok"
    >> {"query":"fmap","command":"hoogle-query"}

     
  • Anonymous - 2011-11-14

    I have the same problem, also on OSX. Scion-browser console output is a bit different now with the latest EclipseFP:
    After a sequence of successful wgets from hackage…

    Uncompressing Hoogle database
    Hoogle database is now in /var/folders/b2/b2ArjK62GrWEDHy2WL9cOk+++TI/-Tmp-/.scion27258/hoogle-db
    ……………………………………………………………………………………………………………………………………………………………………………………………………<truncated>……………………………………………………………………………………………………………………………………………………………………………………………Hackage database loaded
    "ok"
    >> {"command":"hoogle-check"}
    false

     
  • Anonymous - 2011-11-14

    How does the scion-browser use hoogle, does it need to find the executable (in path?) or does it use hoogle cabal package? If it needs hoogle executable, is there a way to specify in preferences where scion-browser can find it? Or maybe somewhere we can put a symlink for hoogle?

     
  • Anonymous - 2011-11-15

    I had some other issues when upgrading EclipseFP on OS X (Two different machines). When EclipseFP tries to build the scion-browser and build-wrapper automatically, there are packages that fail to install (I think because it tried to install as root, when I was not). I got this to work by manually doing "cabal reinstall X" on some of the dependencies, sometimes specifying the exact version number needed.

    Selecting "install only for this user" worked on the second machine (After initially failing to install for all)

     
  • JP Moresmau

    JP Moresmau - 2011-11-15

    scion-browser is using the hoogle executable, that it tries to find by looking at the package database and the library path. On windows it looks also under the cabal app directory. I suppose it should also look for it in the path, I suppose. Where is the hoogle executable on your machine?

     
  • Anonymous - 2011-11-15

    My hoogle is in ~/.cabal/bin/hoogle

     
  • JP Moresmau

    JP Moresmau - 2011-11-15

    And what does getAppUserDataDirectory "cabal" return (try it for example in ghci, System.Directory is the module name)?

     
  • Anonymous - 2011-11-17

    ghci
    GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
    Loading package ghc-prim … linking … done.
    Loading package integer-gmp … linking … done.
    Loading package base … linking … done.
    Loading package ffi-1.0 … linking … done.
    Prelude> import System.Directory
    Prelude System.Directory> getAppUserDataDirectory "cabal"
    Loading package filepath-1.2.0.0 … linking … done.
    Loading package old-locale-1.0.0.2 … linking … done.
    Loading package old-time-1.0.0.6 … linking … done.
    Loading package unix-2.4.2.0 … linking … done.
    Loading package directory-1.1.0.0 … linking … done.
    "/Users/jcb/.cabal"

     
  • JP Moresmau

    JP Moresmau - 2011-11-18

    I take it your user is jcb, so (getAppUserDataDirectory "cabal") "/bin/hoogle", would give us hoogle. which is exactly the path we use on windows, so it's just a matter of looking there even if we're not on windows.

     
  • Anonymous - 2011-11-30

    I'm having problems on OS X as well. Your comments lead me to believe that this is due to eclipsefp not finding binaries such as hoogle even though they are installed. In particular, it would seem that for Mac OS X, the haskell platform and eclipsefp presently use two different conventions. Excerpt from .cabal/config installed by haskell platform:

    • This is the configuration file for the 'cabal' command line tool.
    • The available configuration options are listed below.
    • Some of them have default values listed.

    • Lines (like this one) beginning with '-' are comments.

    • Be careful with spaces and indentation because they are
    • used to indicate layout for nested sections.

    • This configuration follows the layout of Haskell Platform on Mac OS X,

    • placing all installed package parts in the directories
      -   /Library/Haskell for packages installed -global
      -   ~/Library/Haskell for packages installed -user (the default)

    • === Built executables will be installed in:
      -     ~/Library/Haskell/bin

    while at the same time (on the same machine):

    GHCi, version 7.0.3: http://www.haskell.org/ghc/  :? for help
    Loading package ghc-prim … linking … done.
    Loading package integer-gmp … linking … done.
    Loading package base … linking … done.
    Loading package ffi-1.0 … linking … done.
    Prelude> import System.Directory
    Prelude System.Directory> getAppUserDataDirectory "cabal"
    Loading package filepath-1.2.0.0 … linking … done.
    Loading package old-locale-1.0.0.2 … linking … done.
    Loading package old-time-1.0.0.6 … linking … done.
    Loading package unix-2.4.2.0 … linking … done.
    Loading package directory-1.1.0.0 … linking … done.
    "/Users/me/.cabal"

     
  • Anonymous - 2011-11-30

    Whereas

    $ which hoogle
    /Users/me/Library/Haskell/bin/hoogle

     
  • JP Moresmau

    JP Moresmau - 2011-12-09

    I've added that path to my version of scion-browser on GitHub, so hopefully the next release will work better for you

     
  • Anonymous - 2012-01-17

    Mac OSX 10.7.2
    Eclipse 3.7.1
    EclipseFP 2.2.1

    I also experience this problem.  Opening Eclipse after installing EclipseFP does successfully install scion-browser.  However, EclipseFP never finds the scion-browser installation. 

    I understand from above that it is a path issue.  What is the hack to get it working for now?

     
  • JP Moresmau

    JP Moresmau - 2012-01-17

    If it's EclipseFP that doesn't find scion-browser, just go to Preferences->Haskell->Helper executables and put the scion-browser path in there.

     
  • JP Moresmau

    JP Moresmau - 2012-01-17

    kienjakenobi, where is scion-browser installed by Cabal on your machine? Of course EclipseFP should be able to find what it asked cabal to install…

     
  • Anonymous - 2012-01-18

    Trying to install scion-browser from the console says it is already installed:

    $ sudo cabal install scion-browser
    Resolving dependencies...
    No packages to be installed. All the requested packages are already installed.
    If you want to reinstall anyway then use the --reinstall flag.
    

    ghc-pkg list agrees that it is installed. 

    It is found at /Library/Haskell/ghc-7.0.4/lib/scion-browser-0.2.3/bin/scion-browser on my computer.

    Upon opening Eclipse, EclipseFP says that scion-browser could not be found and asks to install it.  I tell it yes, and Eclipse's Console gives the same message that I see in Terminal.  That is, scion-browser is already installed. 

    Going to Eclipse -> Preferences -> Haskell -> Helper executables and pressing the Autodetect button in the Scion Browser or BuildWrapper section does not find anything. 

    It appears to work after specifying the paths manually.  However, it does not detect any of the packages which I have manually installed.  So, for example, if I import Data.List.Split, it will give me an error because the split package is not installed, but it actually is.  I think this is the same problem.  It simply does not know where to look for my GHC stuff. 

    split is also installed in /Library/Haskell/ghc-7.0.4/lib/

    Perhaps this is because the Haskell Preferences -> Haskell Implementations page detects the executable at /usr/bin/, which is correct, but then it automatically assigns the library folder to /Library/Frameworks/GHC.framework/Versions/7.0.4-x86_64/usr/lib/.  Inside that folder is a ghc-7.0.4/ folder, and inside that it looks like there are the standard libraries, such as array. 

     
  • JP Moresmau

    JP Moresmau - 2012-01-18

    We actually use ghc itself to know where the library is. The library folder in the preference page is read from running
    ghc -print-libdir
    Is that giving the correct location on your machine?
    And the code that performs the analysis is GHC API running using the "libdir" function defined in GHC Paths. So it doesn't look like it's EclipseFP that chooses the wrong path…

     
  • Anonymous - 2012-01-18

    ghc -print-libdir gives essentially the same directory that EclipseFP chooses:
    /Library/Frameworks/GHC.framework/Versions/7.0.4-x86_64/usr/lib/ghc-7.0.4

    However, when I run ghc or ghci on the concerned file, they are both capable of finding all the libraries I have installed in /Library/Haskell/ghc-7.0.4/lib/.  This is where sudo cabal install puts everything.  I just installed Haskell Platform and have not changed any of these settings.

    Are there any settings anywhere you can think of that would align where all of these things are looking for the libraries?  ghc, ghci, and cabal seem to work find together, but EclipseFP does not find those libraries installed via cabal. 

    Thanks.

     
  • Anonymous - 2012-01-22

    Well, clicking on the warning symbol of the left-hand side of the editor pops up a window that offers the option of adding the missing library to the cabal file.  I choose that, and then it no longer acts like the library is missing. 

     
  • Michael Jones

    Michael Jones - 2012-01-29

    Greetings.  I'm interested in getting EclipseFP up and running on OSX as well.  I have OSX 10.7.2 and GHC 7.2.2 installed, and I managed to build the buildwrapper project and the scion-browser… though with the latter I had to restrict scion-browser to use an older version of persistent in order to build.  I grabbed the git version of all of the projects as of today.  Perhaps our differences are as a result of my using the later ghc.

    I don't want to hijack the thread, but I have somewhat different osx bugs (build failure, debugging failure)… jpmoresmau, kienjakenobi, I'd love to help you ferret out these problems, so would you prefer several threads?  Or may I add my list of weird behaviour here?

     
  • Michael Jones

    Michael Jones - 2012-01-29

    Ah, it looks like there are lots of people in here already.  So I'll contribute my quarter-byte.

    In building using 7.2.2, I end up having to add FlexibleInstances to Json.hs and Query.hs because of about half a dozen complaints apiece.  I think 7.2.2 is being more restrictive.

    By default, scion-browser ends up trying to build the 0.7+ version of the persistent library, because DbTypes.h uses Database.Persist.Base which doesn't exist in the new persistent library.

    These errors prevented scion-browser from building from the git sources, so I presume they were what also prevented them from building inside EclipseFP.

    I, too, am running into the problem of Hoogle not downloading data, so that's consistent with previous bugs in this thread.

    So far, other features of EclipseFP seemed to work… project creation, syntax highlighting, info mouseovers, etc.  I was able to run a simple project from within EclipseFP using the compiler. 

    However, when I went to use the debugger, things went wrong again (and I ended up installing the java plugin architecture to try to hunt down the problem in case it was easy… perhaps it isn't.

    1) On launching ghci, the pathnames you build up for the primary file to run and the include paths have double-quotes wrapped around them in GhciLaunchOperationDelegate.java:

        for( String sourcePath: srcs ) {
          IResource r=hsProject;
          if (!sourcePath.equals( "." )){ //$NON-NLS-1$
            r=hsProject.getFolder( sourcePath );
          }
          // getRawLocation gives us the real FS path even if the resource is linked
          IPath loc = new Path( r.getLocationURI().getPath() );
          //cmdLine.add( "-i\"" + loc.toOSString() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
          cmdLine.add( "-i" + loc.toOSString() ); //$NON-NLS-1$
        }

    and later…

      private void addAll( final List<String> cmdLine, final IFile selectedFiles ) {
        for( int i = 0; i < selectedFiles.length; i++ ) {
          String path = selectedFiles.getLocation().toOSString();
          cmdLine.add( path );
          //cmdLine.add( "\"" + path + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
        }
      }

    These are apparently not necessary when submitting the parameters launch ghci.  When you leave them in, ghci receives a filename on its command line wrapped in quotes which it doesn't know what to do with (they aren't apparently stripped out when you launch this way), and the -i include path has quotes wrapped around the path part, which then screws with loading any imported modules (ghci can't find them).

    I don't know what would happen with a space in the path, which is presumably why you usually wrap the parameters in quotes, and on the command line such a thing would likely fail without quotes, but maybe when you're launching the way you are on OSX it doesn't matter.  All I know is that getting rid of the quote wrapping there at the very least got GHCI to launch and load the project.

    Then, we stall at the command-prompt for GHCI.  I'm not sure why this is, but I suspect scion-browser isn't working.  When I tried to trace back why, I also found out that the setting of breakpoints doesn't work, and I suspect nothing else involving debugging does either.  Attempting to set a breakpoint results in a dialog box popping up with:  "The chosen operation is not enabled."  

    I *think* this has something to do with the Outline window not being populated, but it's a little hard to trace through the code when breakpoints *aren't* being hit.

    HaskellLineBreakpointAdaptor.canToggleLineBreakpoints was always returning false because HaskellEditor.isInOutline was returning false because there's no content in the loop provided by "for (OutlineDef od:outlinePage.getInput())"

    I'd love to have an opportunity to dig deeper but I'm rapidly getting out of my element here.  :D

    I'm looking forward to hearing from you, jpmoresmau.

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks