[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: doctest + libghc-lens-dev (and other debian haskell libs I guess, on ghc8/testing) = unhandled ELF relocation(RelA) type 42



To answer my own question:

translating my own doctests.hs program (which relies on
libghc-doctest-dev) with -dynamic solved my problem, like so

  ghc -no-user-package-db -package-db .cabal-sandbox/*-packages.conf.d -isrc -itests -dynamic -o doctests tests/doctests.hs
  ./doctests

the idea for compiling with -dynamic I found at https://ghc.haskell.org/trac/ghc/ticket/12147:
there is a mention of a cabal flag --enable-executable-dynamic

The precompiled debian doctest program is still causing the aforementioned "unhandled ELF relocation(RelA) type 42"
error, and it would be nice, if this could eventually be sorted out.

Please find once more below the kind of error I am getting


Thanks in advance.
  Andreas


--------------------
$ doctest -isrc src/Pire/Desugar.hs
doctest: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.0.1/lens-4.14-9dVzUyOAXSjIX3UgJ3NnoU/libHSlens-4.14-9dVzUyOAXSjIX3UgJ3NnoU.a: unhandled ELF relocation(RelA) type 42

doctest: Could not on-demand load symbol 'lenszm4zi14zm9dVzzUyOAXSjIX3UgJ3NnoU_ControlziLensziTH_makeLenses_closure'

doctest: 
ByteCodeLink.lookupCE
During interactive linking, GHCi couldn't find the following symbol:
  lenszm4zi14zm9dVzzUyOAXSjIX3UgJ3NnoU_ControlziLensziTH_makeLenses_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
  glasgow-haskell-bugs@haskell.org


Reply to: