Installation error with haskell cabal - windows

I'm installing haskell platform for windows 10 for the first time (https://www.haskell.org/platform/windows.html) for my laptop and pc.
My PC installs fine and I can run cabal install hsdev without any issues. However, when I do the exact same process on my laptop the following error is raised:
Resolving dependencies...
Configuring old-time-1.1.0.3...
Failed to install old-time-1.1.0.3
Build log ( C:\Users\user\AppData\Roaming\cabal\logs\old-time-1.1.0.3.log ):
Configuring old-time-1.1.0.3...
configure: error: invalid package name: 0
\old-time-1.1.0.3'
cabal: Leaving directory 'C:\Users\user\AppData\Local\Temp\cabal-tmp-7388\old-time-1.1.0.3'
cabal: Error: some packages failed to install:
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure
The log just repeats the stdout shown above
Any ideas?

Typically this is caused by not adding the following lines to your cabal config (discoverable by running cabal user-config init) as the platform instructions suggest:
extra-prog-path: C:\Program Files\Haskell Platform\8.2.2\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\include
(with the paths set for the appropriate version of the platform.)

Related

Creating\Updating conda venv with yml file fails in pip dependencies part with gym[rom]

Im trying to create a virtual enviorment based on an enviorment.yml file with the command:
"mamba env update -f environment.yml -n cs236781-hw".
The yml file contains this part:
- pip:
- nbmerge
- gym[atari,accept-rom-license,box2d]==0.21.0
which seems to fail as I get this error in my minicinda prompt:
Building wheel for AutoROM.accept-rom-license (pyproject.toml): started
Building wheel for AutoROM.accept-rom-license (pyproject.toml): finished with status 'error'
Failed to build AutoROM.accept-rom-license
Pip subprocess error:
error: subprocess-exited-with-error
× Building wheel for AutoROM.accept-rom-license (pyproject.toml) did not run successfully.
ImportError: DLL load failed while importing libtorrent: The specified module could not be found.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for AutoROM.accept-rom-license
ERROR: Could not build wheels for AutoROM.accept-rom-license, which is required to install pyproject.toml-based projects
failed
CondaEnvException: Pip failed
Ive tried so many things to fix this (reinstalling conda, python even vscode and its c++ build tools) with no success.
Does anyone have any clue?
I assume you are working on Windows x64?
If yes, you will probably need OpenSSL 1.1.x.
Please try to install e.g. Win64OpenSSL_Light-1_1_1s.exe first, to get the required SSL libraries.
https://slproweb.com/products/Win32OpenSSL.html
Regards,
Konstantin

During Openssl build: How to fix "fatal error: apps/app_rand.d: no such file or directory, compilation terminated"

I am attempting to update openssl to 1.1.1 on centos 7 in order to start building OpenLDAP.
After pulling the openssl installation package and unzipping it in /usr/local/src/ I ran ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib. This command successfully configured openssl.
I then ran the make command to build openssl and got the following error:
cc1: fatal error: apps/app_rand.d: no such file or directory
compilation terminated
make(1): *** (apps/app.rand.o) Error 1
make(1): Leaving directory '/usr/local/src/openssl-1.1.1d'
make: *** (all) Error 2
The apps directory was created and does exist, but the app_rand.d file is not present inside of the apps directory.
I have downloaded all dependencies (i believe)
I am decent in linux, I have my rhcsa, but am not familiar with manually building software libraries like openssl. I have tried to do some research online but have not come up with any solutions. Any advice would be very much appreciated!

Tidal Cycles cabal install failure

I'm trying to install tidal cycles to program live music - but am running into errors when running cabal install tidal via cmd
Logs:
Resolving dependencies...
Downloading mwc-random-0.14.0.0
Starting network-3.0.1.0
Downloaded mwc-random-0.14.0.0
Starting mwc-random-0.14.0.0
Failed to install network-3.0.1.0
Build log ( C:\Users\Moz\AppData\Roaming\cabal\logs\ghc-8.6.3\network-3.0.1.0-KyWTN8R07Nk13a65qAf8xd.log ):
Configuring network-3.0.1.0...
cabal.exe: The package has a './configure' script. If you are on Windows, This
requires a Unix compatibility toolchain such as MinGW+MSYS or Cygwin. If you
are not on Windows, ensure that an 'sh' command is discoverable in your path.
cabal: Leaving directory 'D:\Temp\TMP\cabal-tmp-7496\network-3.0.1.0'
Building mwc-random-0.14.0.0
Completed mwc-random-0.14.0.0
cabal: Error: some packages failed to install:
hosc-0.17-Gak1PuEPYn3IoGtbGyt03X depends on hosc-0.17 which failed to install.
network-3.0.1.0-KyWTN8R07Nk13a65qAf8xd failed during the configure step. The
exception was:
ExitFailure 1
tidal-1.0.7-G7PMBDSlH0ZK2qQ3UODU3y depends on tidal-1.0.7 which failed to
install.
Cheers for any help
All good, needed to add these lines to config file:
extra-prog-path: C:\Program Files\Haskell Platform\8.6.3\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.6.3\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.6.3\mingw\include
Cheers anyhow

Building QScintilla on Windows fails

I was able to build the most recent version of QScintilla (2.9.1) on Ubuntu 15.10. I have tried building the same version on Windows 10 using Qt 5.6. QMake run to completion without giving errors. A call to Make gives the following error message:
make -f Makefile.Release
make[1]: Entering directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
Makefile.Release:822: *** missing separator. Stop.
make[1]: Leaving directory 'G:/Sources/QScintilla/QScintilla_gpl-2.9.2/Qt4Qt5'
makefile:34: recipe for target 'release' failed
make: *** [release] Error 2
What am I doing wrong? How can I solve it?
I ran into similar issues. I eventually got a working 'QScintilla' on my Windows 10 machine as described below.
My PC has the following specifications:
Windows 10, 64-bit OS
Anaconda package installed (Python 3.5)
PyQt5 installed (download the .exe installer from https://www.riverbankcomputing.com/software/pyqt/download5)
STEP 1:
Download the file QScintilla-2.9.2-cp35-none-win_amd64.whl from the site https://pypi.python.org/pypi/QScintilla .
Put the file in the folder:
C: \ .. \ Anaconda \ Scripts \
We will use this .whl file to do the installation of QScintilla.
_
STEP 2:
Open the Windows cmd tool with Administrator privileges! Now type the following command:
> cd "C:\..\Anaconda\Scripts"
This brings the cmd shell to the right spot. Now type the following command:
> pip3 install QScintilla
If all goes well, you get the following message:
> pip3 install QScintilla
Collecting QScintilla
Downloading QScintilla-2.9.2-cp35-none-win_amd64.whl (1.6MB)
100% |################################| 1.6MB 984kB/s
Collecting PyQt5 (from QScintilla)
Downloading PyQt5-5.6-cp35-none-win_amd64.whl (74.7MB)
100% |################################| 74.7MB 23kB/s
Collecting sip (from PyQt5->QScintilla)
Downloading sip-4.18-cp35-none-win_amd64.whl (46kB)
100% |################################| 51kB 5.7MB/s
Installing collected packages: sip, PyQt5, QScintilla
..
Successfully installed PyQt5-5.6 QScintilla-2.9.2 sip-4.18
_
STEP 3:
I did not get the message "Successfully installed" from the first shot. Instead I got the following error message:
PermissionError: [Errno 13] Permission denied: 'C:\..\anaconda\Lib\site-packages\sip.pyd'
Apparently the file sip.pyd sitting in the directory C:\..\anaconda\Lib\site-packages could not be accessed. So I opened another Windows command shell (of course again with Administrator privileges!) and typed the following command:
> icacls "C:\..\Anaconda\Lib\site-packages" /grant "Administrators":(OI)(CI)F /T
This command will give full access rights (read - modify and write) to all "Administrator" users for all the files in the site-packages folder, and all the files in its subfolders. While this command executes, you should get the following messages:
...
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\readline.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\simplegeneric.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\six.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_path.cpython-35.pyc
processed file: C:\..\Anaconda\Lib\site-packages\__pycache__\test_pycosat.cpython-35.pyc
...
Successfully processed 38589 files; Failed processing 0 files
Now you can repeat STEP 2, and it should work!

Error building openssl-sys crate on Windows

I am trying to compile a Rust program on Windows, but I get this error message:
Compiling openssl-sys v0.6.4
failed to run custom build command for `openssl-sys v0.6.4`
[...]
failed to execute command: The system couldn't find the specified file. (os error 2)
Is `gcc` not installed? (see https://github.com/alexcrichton/gcc-rs#windows-notes for help)
--- stderr
thread '<main>' panicked at 'explicit panic', C:\Users\User\.cargo\registry\src\github.com-0a35038f75765ae4\gcc-0.3.12\src\lib.rs:510
Cargo compiled every other package without problem, but it can't compile the openssl package.
I searched for help with this specific error and found a github issue for hyperium. The first answer references the openssl building guide for Windows.
I don't understand exactly how I have to build openssl in Windows. I installed MinGW and added the bin path to the global PATH variable, so gcc is reachable, but this did not solve the error.
I use Rust 1.2 and Cargo 0.4.0. My project is an example for a Telegram API wrapper.
1) Download ssl
Installs Win32 OpenSSL v1.0.2d
Install it here: C:\OpenSSL-Win32,C:\OpenSSL-Win32\include,C:\OpenSSL-Win32\lib
2) Install MinGW,and add system env path ,,C:\MinGW\bin,important,MinGW's installed path contain char 'MinGW '
3) cmd run env OPENSSLLIBDIR=C:/OpenSSL-Win32/lib OPENSSLINCLUDEDIR=C:/OpenSSL-Win32/include cargo build

Resources