HMatrix (Haskell) => Cannot run Numeric.LinearAlgebra.Tests.runTests on Windows 7 - haskell

I installed hmatrix, hmatrix-tests using the instruction given on Installation page. However I always get this error:
i386-windows-ghc-7.8.3\hmatrix-0.16.0.6\HShmatrix-0.16.0.6.o: unknown symbol `_asinh'
Please let me know how this can be fixed.

Related

How can I compile simpleScalar in cygwin using alpha configuration?

I need to install simplescalar on windows 7. For that reason, I installed cygwin. I need to use simplescalar because I need to do a lab about Benchmarks.
I already installed SimpleScalar on Debian and I compiled it using the alpha configuration without any problem. However, when I try to do the same on windows using cygwin, I'm having issues.
I am trying to compile simplescalar using alpha configuration. since I'm using windows 7, cygwin and I used the following steps:
make config-alpha
make
When I run the make command to compile the simulator, it shows me a lot of errors.
syscall.c: 805:25: error: 'TCP_NODELAY' undeclared here (not in a function); did you mean 'O_NDEALY'?
804 { OSF_TCP_NODELAY, TCP_NODELAY},
O_NDEALY
syscall.c: 805:25: error: 'TCP_MAXSEG' undeclared here (not in a function); did you mean 'TMP_MAX'?
804 { OSF_TCP_MAXSEG, TCP_MAXSEG},
TMP_MAX
syscall.c:2636:56 error: invalid use of undefined type 'struct dirent' i++, cnt < regs -> regs_R[MD_REG_V0] && p->d_reclen > 0;
syscall.c:2637:35 error: invalid use of undefined type 'struct dirent' i++, cnt = p->d_reclen, p=(struct dirent *)(buf+cn 2637)
However, if I use pisa configuration, I can compile the simulator without any problem.
Is there any additional steps I need to do or any additional packages I need to download in cygwin in order to compile simplescala using alpha configuration?
Some of the packages that I have downloaded to do my lab in cygwin have been wget, nano and devel.

Can't import Lean 4 packages

I've made a Leanprover installation on Ubuntu 22.04 and used the stable toolchain. The elan toolchain list shows the following default
leanprover/lean4:stable (default)
I've made a test file called test.lean that contains the following
import Leanpkg
#eval Leanpkg.leanVersionString
When I run lean test.lean I get
test.lean:1:0: error: unknown package 'Leanpkg'
test.lean:2:6: error: unknown identifier 'Leanpkg.leanVersionString'
test.lean:2:0: error: unknown constant 'sorryAx'
What should I do to make it work?

Unable to install criterion package

When I attempt to install the criterion package I get the following error message: error: #error Unsupported OS/architecture/compiler!. I believe the fix is here: Restore support for 32 bit Intel CPUs . However how do I install that fix?
As I can tell from http://hackage.haskell.org/package/criterion-1.1.4.0/src/cbits/cycles.c, v1.1.4.0 includes the fix you linked to.
To use that version or a later one, add a lower bound to your dependency on criterion:
build-depends:
...
, criterion >= 1.1.4.0
...

Swift 3 preview 2 linux error: use of unresolved identifier

Building my app on Linux get an error:
$ swift build
Compile Swift Module 'finder' (1 sources)
main.swift:24:15: error: use of unresolved identifier 'URLSession'
let session = URLSession.shared
$ swiftc main.swift
main.swift:24:15: error: use of unresolved identifier 'URLSession'
let session = URLSession.shared
It's working in XCODE 8 on my Mac.
I'm trying Swift on Ubuntu:
$ swift --version
Swift version 3.0 (swift-3.0-PREVIEW-2)
Target: x86_64-unknown-linux-gnu
Two issues:
1: On Linux, even up to 3.0-PREVIEW-2, the "NS" prefix hasn't been dropped in Foundation yet. You still need to use NSURLSession, rather than URLSession. This will change in Foundation with 3.0-PREVIEW-3 based on the GitHub branches.
2: And this is a showstopper, URLSession/NSURLSession doesn't work on Linux. It hasn't been implemented yet. If you look at the source code for URLSession right now:
https://github.com/apple/swift-corelibs-foundation/blob/93d0018a0891f876065651c3ee8c63f256a38de4/Foundation/NSURLSession/NSURLSession.swift#L200
You'll see that calling sharedSession() returns NSUnimplemented()
At some point, URLSession will come to Linux - but it hasn't been implemented yet.
I believe the reason is that on OS X, URLSession for Swift simply a bridge to the Objective C implementation that already existed. On Linux, Foundation is being implemented entirely in Swift and they just haven't got around to re-writing this yet.

Error in attempting to create a new Stack project with GHCJS compiler

I am attempting to set up a new Stack project on NixOS with GHCJS as the compiler following the instructions at http://docs.haskellstack.org/en/stable/ghcjs.html
I have included in my stack.yaml file the following lines of code (all on one line because tab spaces seem to give issues):
# Compiler specifying the GHCJS compiler for this project (using improved base).
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
setup-info:
ghcjs: source:
ghcjs-0.2.0.20151230.3_ghc7.10.2:
url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"
and I have retrieved the following error message when I ran stack setup
Could not parse '/home/lorkaan/pandocJS/stack.yaml':
InvalidYaml (Just (YamlParseException {yamlProblem = "mapping values are not allowed in this context", yamlContext = "", yamlProblemMark = YamlMark {yamlIndex = 487, yamlLine = 12, yamlColumn = 17}}))
See https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md.
Additionally, I tried removing the setup-info field because Stack was complaining about it, leaving my stack.yaml file like:
# Compiler specifying the GHCJS compiler for this project (using improved base).
compiler: ghcjs-0.2.0.20151230.3_ghc-7.10.2
compiler-check: match-exact
which produces this output with the stack setup command:
Warning: /home/lorkaan/pandocJS/stack.yaml: Unrecognized field in ProjectAndConfigMonoid: compiler
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.
The following executables are missing and must be installed: make
Does anybody have any idea why this would be happening?
the first error is because of a basic syntax error in your YAML configuration. The correct version would be:
setup-info:
ghcjs:
source:
ghcjs-0.2.0.20151230.3_ghc7.10.2:
url: "https://github.com/nrolland/ghcjs/releases/download/v.0.2.0.20151230.3/ghcjs-0.2.0.20151230.3.tar.gz"
The second error is because of exactly what it says: you are lacking the make utility. You need to use your Linux distribution's package management system to install make. Since I don't know which distribution you are on, I can only recommend simply executing the $ make command and seeing if the environment is smart enough to point out which package it can be found in. Ubuntu typically does that. Then it's only a matter of apt-get install-ing the package, or possibly yum install-ing on e.g. CentOS and Fedora, etc.
P.S. questions like yours normally get a downvote for not having shown sufficient effort in diagnosing the problem (or for putting 2 totally separate problems under a single question) but I'm giving you the benefit of the doubt and just hoping you'll be tidier next time.

Resources