accelerate-llvm icon indicating copy to clipboard operation
accelerate-llvm copied to clipboard

Error building accelerate-llvm-native

Open ethan-ccs-github opened this issue 5 years ago • 2 comments

sorry, it should have been:

I am submitting a...

  • [x] bug report
  • [ ] feature request
  • [ ] support request => you might also like to ask your question on the mailing list or gitter chat.

Description

when trying to install accelerate on Ubuntu building the llvm-native back end fails. It fails in different ways depending on the back end version

Expected behaviour

It should build successfully.

Current behaviour

It fails. See error below. [14 of 36] Compiling Data.Array.Accelerate.LLVM.Native.Distribution.Simple.Build ( src/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/Build.hs, dist/build/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/Build.o )

src/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/Build.hs:312:23: error: • Couldn't match expected type ‘LibraryName’ with actual type ‘Maybe a0’ • In the ‘libName’ field of a record In the expression: Library {libName = Nothing, exposedModules = [m], reexportedModules = [], signatures = [], libExposed = True, libBuildInfo = bi} In an equation for ‘lib’: lib = Library {libName = Nothing, exposedModules = [m], reexportedModules = [], signatures = [], libExposed = True, libBuildInfo = bi}

src/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/Build.hs:322:19: error: • Variable not in scope: computeCompatPackageName :: PackageName -> Maybe UnqualComponentName -> t • Perhaps you meant one of these: ‘componentCompatPackageName’ (imported from Distribution.Simple.LocalBuildInfo), ‘computeCompatPackageId’ (imported from Distribution.Types.MungedPackageId), ‘computeCompatPackageKey’ (imported from Distribution.Simple.Configure)

src/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/Build.hs:329:40: error: • Data constructor not in scope: CSubLibName :: UnqualComponentName -> ComponentName • Perhaps you meant one of these: ‘LSubLibName’ (imported from Distribution.Simple.LocalBuildInfo), ‘CFLibName’ (imported from Distribution.Simple.LocalBuildInfo), ‘CLibName’ (imported from Distribution.Simple.LocalBuildInfo)

src/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/Build.hs:340:76: error: • Variable not in scope: unMungedPackageName :: t0 -> String • Perhaps you meant data constructor ‘MungedPackageName’ (imported from Distribution.Types.MungedPackageName)

src/Data/Array/Accelerate/LLVM/Native/Distribution/Simple/Build.hs:362:43: error: • Variable not in scope: unMungedPackageName :: MungedPackageName -> t • Perhaps you meant data constructor ‘MungedPackageName’ (imported from Distribution.Types.MungedPackageName) cabal-3.2: Failed to build accelerate-llvm-native-1.2.0.1. See the build log above for details.

Possible solution (optional)

Steps to reproduce (for bugs)

So this fails for Ubuntu and mx linux. I have ubuntu running in a vm (fresh install) so that it should be isolated. install cabal 3.2 (from hvr repository) install ghc 8.0.2 (apt-get ghc) install g++ (apt-get g++) install llvm-8 (apt-get llvm-8) run /opt/cabal/bin/cabal-3.2 install accelerate-llvm-native successfully build a lot of packages but fails on llvm-native backend with the error messages above.

Your environment

  • Version used:
  • Backend(s) used and version: cabal 3.2 accelerate-llvm-native 1.2.0.1 ghc 8.0.2 llvm-8
  • Operating system and version: Ubuntu 64 bit 18.04.3 (both running from inside virtualbox and native although currently just in virtualbox)
  • Link to your project: Don't have one yet because I cant install this.
  • If this is a bug with the GPU backend, include the output of nvidia-device-query: This is a cpu bug. Note that when I was running nativly I once managed to get the ptx backend to install but got the same error messsage from above.

ethan-ccs-github avatar Jan 09 '20 02:01 ethan-ccs-github

I think the (old now) 1.2 release of accelerate-llvm-native isn't going to work with Cabal-3.x. The current GitHub version should avoid this problem though, can you try installing that? I plan to make a new release as soon as possible...

tmcdonell avatar Feb 03 '20 16:02 tmcdonell

(Also, sorry for the very late reply! I've been swamped and only just saw this)

tmcdonell avatar Feb 03 '20 16:02 tmcdonell

At some point I'll cut a new package release, but at least this is fixed on master now, so closing. Thanks for your patience!

tmcdonell avatar Aug 22 '23 11:08 tmcdonell