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

Trouble installing on Mac OS X #1

Closed
mohanzhang opened this issue Aug 7, 2015 · 5 comments
Closed

Trouble installing on Mac OS X #1

mohanzhang opened this issue Aug 7, 2015 · 5 comments

Comments

@mohanzhang
Copy link

Hi, just wondering if you or anyone else out there has tried using this on OS X. I read the installation instructions and tried all the flags in order. Here's what happens:

No flag:

ghc:
lookupSymbol failed in relocateSection (RELOC_GOT)
/Users/mohanzhang/code/hq/.stack-work/install/x86_64-osx/lts-2.17/7.8.4/lib/x86_64-osx-ghc-7.8.4/hlibsass-0.1.4.0/libsass.a: unknown symbol `___dso_handle'
ghc: unable to load package `hlibsass-0.1.4.0'

with sharedLibsass:

<command line>: can't load .so/.DLL for: /Users/mohanzhang/code/hq/.stack-work/install/x86_64-osx/lts-2.17/7.8.4/lib/x86_64-osx-ghc-7.8.4/hlibsass-0.1.4.0/libHShlibsass-0.1.4.0-ghc7.8.4.dylib (dlopen(/Users/mohanzhang/code/hq/.stack-work/install/x86_64-osx/lts-2.17/7.8.4/lib/x86_64-osx-ghc-7.8.4/hlibsass-0.1.4.0/libHShlibsass-0.1.4.0-ghc7.8.4.dylib, 9): Library not loaded: lib/libsass.so
  Referenced from: /Users/mohanzhang/code/hq/.stack-work/install/x86_64-osx/lts-2.17/7.8.4/lib/x86_64-osx-ghc-7.8.4/hlibsass-0.1.4.0/libHShlibsass-0.1.4.0-ghc7.8.4.dylib
  Reason: image not found)

with externalLibsass (it builds much quicker since it's not building its own libsass, but still fails in the same way as building with no flags. I used homebrew to install libsass. Is it expecting to find it in a specific place?):

ghc:
lookupSymbol failed in relocateSection (RELOC_GOT)
/Users/mohanzhang/code/hq/.stack-work/install/x86_64-osx/lts-2.17/7.8.4/lib/x86_64-osx-ghc-7.8.4/hlibsass-0.1.4.0/libsass.a: unknown symbol `___dso_handle'
ghc: unable to load package `hlibsass-0.1.4.0'

Any ideas? Thanks!

@mohanzhang
Copy link
Author

As you can see from my path, I was using stackage LTS 2.17. Going to the nightly stackage snapshots got rid of these errors. Note that this also meant going to GHC 7.10.2.

@jakubfijalkowski
Copy link
Owner

GHC has a bug that, under some circumstances, prevents from linking with some C++ libraries. Unfortunately, Libsass is one of them. GHC 7.10.1 seems to solve it.

I was able to make it work on Linux with GHC 7.8.4, but I don't have Mac to test it there.

With sharedLibsass it should work even with GHC 7.8.4, but it might be that it needs some specific configuration during linking to make it work properly on Mac.

@StevenXL
Copy link

StevenXL commented Aug 8, 2017

I hope it is OK that I am posting here, but I also have a problem that seems very similar to this on a mac.

    [ 1 of 25] Compiling Model            ( src/Model.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Model.o )
    ghc:
    lookupSymbol failed in relocateSection (RELOC_GOT)
    /Users/stevenleiva/.stack/snapshots/x86_64-osx/lts-8.21/8.0.2/lib/x86_64-osx-ghc-8.0.2/hlibsass-0.1.6.0-CpmKM1tLe615KNqbecq5cI/libsass.a: unknown symbol `___dso_handle'
    ghc: Could not on-demand load symbol '__ZN4Sass10VectorizedINS_10SharedImplINS_15Simple_SelectorEEEE20adjust_after_pushingES3_'

I am on macOS Sierra v 10.12.6

@jakubfijalkowski
Copy link
Owner

@StevenXL I think this is exactly the same problem. Does it occur when using GHCi only? If so, that's a known bug ( https://github.com/jakubfijalkowski/hlibsass#ghci-not-able-to-load-hlibsass ) and I have no idea on how to solve it.

@StevenXL
Copy link

@jakubfijalkowski Thank you for the response. An individual from the project I am trying to build which uses hlibsass as a dependency in looking into it. If anything comes of that, I'll let you know. Maybe we find a general solution.

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