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

Use shared atlas in liblapack for hmatrix #3547

Merged
merged 1 commit into from
Aug 12, 2014

Conversation

errge
Copy link
Contributor

@errge errge commented Aug 12, 2014

With the following test program:

{-# LANGUAGE TemplateHaskell #-}

import Language.Haskell.TH
import Numeric.GSL

$(do
  runIO $ setErrorHandlerOff
  return []
  )

main = return ()

I get the following compilation error only with NixOS GHC:

...
Loading package hmatrix-0.15.2.1 ... 

GHCi runtime linker: fatal error: I found a duplicate definition for symbol
   __x86.get_pc_thunk.bx
whilst processing object file
   /nix/store/y6fxny6iwhb8apxf5sfgqx4f4mzk692b-liblapack-3.4.1/lib/liblapack.a
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
GHCi cannot safely continue in this situation.  Exiting now.  Sorry.

This is because of the GHC 7.8 dynamic by default change interacting with template haskell and the fact that it tries to use liblapack.a instead of liblapack.so. Forcing liblapack.so fixes the issue for me.

Please note that Debian/Ubuntu also uses liblapack.so for hmatrix, not liblapack.a.

peti added a commit that referenced this pull request Aug 12, 2014
Use shared atlas in liblapack for hmatrix
@peti peti merged commit 27c17fb into NixOS:master Aug 12, 2014
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

Successfully merging this pull request may close these issues.

2 participants