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

Failed to load interface for ‘ObjLink’ #5

Open
stefan-schweiger opened this issue Oct 6, 2016 · 3 comments
Open

Failed to load interface for ‘ObjLink’ #5

stefan-schweiger opened this issue Oct 6, 2016 · 3 comments

Comments

@stefan-schweiger
Copy link

When I try to install remote-debugger via cabal install remote-debugger I get the following error:

Resolving dependencies...
Configuring remote-debugger-0.2.2...
Building remote-debugger-0.2.2...
Failed to install remote-debugger-0.2.2
Build log ( /Users/Staeff/.cabal/logs/remote-debugger-0.2.2.log ):
cabal: Entering directory '/var/folders/05/zf4px1zd38b_7gv_wc34v18m0000gn/T/cabal-tmp-6680/remote-debugger-0.2.2'
Configuring remote-debugger-0.2.2...
Building remote-debugger-0.2.2...
Preprocessing executable 'remote-debugger' for remote-debugger-0.2.2...
[1 of 7] Compiling DebuggerMonad    ( src/DebuggerMonad.hs, dist/build/remote-debugger/remote-debugger-tmp/DebuggerMonad.o )

src/DebuggerMonad.hs:15:1: error:
    Failed to load interface for ‘ObjLink’
    Use -v to see a list of the files searched for.
cabal: Leaving directory '/var/folders/05/zf4px1zd38b_7gv_wc34v18m0000gn/T/cabal-tmp-6680/remote-debugger-0.2.2'
cabal: Error: some packages failed to install:
remote-debugger-0.2.2 failed during the building phase. The exception was:
ExitFailure 1

For your information I'm on GHC 8.0.1 and cabal 1.24.0.0

@mantasg
Copy link

mantasg commented Oct 21, 2016

I too get the same error

@maceopark
Copy link

Me too. I'm on this version of MacOSX and ghc. Thanks.

Darwin Nochul-ui-MacBook-Pro.local 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016; root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64

Nochul-ui-MacBook-Pro:~ merritt$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.0.1

@ghost
Copy link

ghost commented Nov 16, 2017

I found the ObjLink is a module named GHCi.ObjLink. So I modified the source code from
import ObjLink
to
import GHCi.ObjLink
and
mb_stdout <- liftIO $ ObjLink.lookupSymbol "base_GHCziIOziHandleziFD_stdout_closure" mb_stderr <- liftIO $ ObjLink.lookupSymbol "base_GHCziIOziHandleziFD_stderr_closure"
to
mb_stdout <- liftIO $ GHCi.ObjLink.lookupSymbol "base_GHCziIOziHandleziFD_stdout_closure" mb_stderr <- liftIO $ GHCi.ObjLink.lookupSymbol "base_GHCziIOziHandleziFD_stderr_closure"
And then, this error has been soluted.
But I got a new error, which means that initDynLinker's parameter must be the type of HscEnv, however there's a DynFlags type parameter was used. The DynFlags type parameter is returned from the function GHC.getSessionDynFlags. I don't know how to deal with this problem, because I'm a Haskell beginner. I searched the GHC document, and found that I can't understand the information of these functions, due to I know nothing of the knowledge of GHC.

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