I need to install from source files the haskell platform so as indicated in the instructions installed cabal, ghc and other libraries for Ubuntu that are needed.
When I try to install the haskell platform with the command:
./platform.sh /home/myuser/haskell/ghc-7.10.2-x86_64-unknown-linux-deb7.tar.bz2 -j 3
I get the following error:
***
*** Building hptool
***
Building hptool-0.1...
Preprocessing executable 'hptool' for hptool-0.1...
***
*** Running hptool
***
Error when running Shake build system:
* 3
Error, file does not exist and no rule available:
3
and I don't find anyone with same error. The haskell platform version that I have downloaded is haskell-platform-7.10.2-a
When using the ./platform.sh script you can't pass a build option like -j 3.
Try building and running hptool manually like this:
cd hptool
cabal sandbox init
cabal install -j3
cd ..
./hptool/.cabal-sandbox/bin/hptool PATH-TO-GHC-BINDIST SHAKE-TARGET
Run hptool with no arguments to get a list of valid values for SHAKE-TARGET.
Related
I installed Haskell stack in WSL (Ubuntu 20.04.3 LTS on Windows 10).
After that, I successfully installed stack using command curl -sSL https://get.haskellstack.org/ | sh
However, after I tried to run gchi I got this error:
et#DESKTOP-D0DE6C4:~$ stack ghci
Writing implicit global project config file to: /home/et/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-18.16
Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-tinfo6-8.10.7.
ghc-pkg: Couldn't open database /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7/package.conf.d for modification: {handle: /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7/package.conf.d/package.cache.lock}: hLock: invalid argument (Invalid argument)
make[1]: *** [ghc.mk:985: install_packages] Error 1
make: *** [Makefile:51: install] Error 2
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7.temp/ghc-8.10.7/
Error: Error encountered while installing GHC with
make install
run in /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7.temp/ghc-8.10.7/
The following directories may now contain files, but won't be used by stack:
- /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7.temp/
- /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/
For more information consider rerunning with --verbose flag
Installing GHC ...
et#DESKTOP-D0DE6C4:~$
--verbose flag did not help as it shows the same error again.
I did not manage to Google anything useful on that.
I installed WSL 2 as explained here WSL | Ubuntu and after that I successfully installed stack ghci. Thanks Joseph for the idea.
I followed NSS build instructions and built NSS successfully.
Then I follow JSS build instructions and building fails with error:
In file included from CryptoManager.c:6:0:
../../../../dist/public/nss/secitem.h:15:21: fatal error: plarena.h: No such file or directory
compilation terminated.
This result is on Ubuntu 16.04 LTS.
On WIndows I get:
All directories (dist, jss, nspr and nss) are on the same level.
What am I doing wrong?
Check my post here. Basically it's due to missing packages. If not working, this file is somewhere under nspr. Copy it and place it beside the .c file which needs it.
EDIT:
To sum it up:
1. Install build-essential and gcc with g++.
2. Try to install zlib1g-dev and libc6-dev, if they are absent.
3. And, install zlib1g-dev.
4. cd into the nss directory, and run the build like this:
gmake nss_build_all NSS_SSL_ENABLE_ZLIB=
if you are under a x64 environment, add USE_64=1, too.
It should work.
I am using:
linux openSUSE Tumbleweed
octave-4.0.1
gdcm-2.6.3
I have recently gotten into using linux for my research in university. For this research, I have been trying to install the dicom package into octave from the octave forge. When I submit the code pkg install -forge dicom into octave, I get fatal error: gdcm-2.0/gdcmReader.h: No such file or directory causing the installation to fail.
I have searched around for fixes to this problem which appears to have happened to several people in the past (see Dependency library not recognized during installation octave forge dicom package in debian linux). However, since I am new to linux, I really don't understand what these users have done to solve their problem. Additionally, both octave and gdcm have updated since these posts. I also, have not been able to find an updated version of the dicom package while I have been trying to troubleshoot this. If anyone has any input on this I would greatly appreciate it.
Below is what I am seeing in the command window log.
>> pkg install -forge dicom
dicomread.cpp:27:38: fatal error: gdcm-2.0/gdcmImageReader.h: No such file or directory
compilation terminated.
make: *** [Makefile:44: dicomread.oct] Error 1
make: *** Waiting for unfinished jobs....
dicominfo.cpp:45:33: fatal error: gdcm-2.0/gdcmReader.h: No such file or directory
compilation terminated.
dicomlookup.cpp:23:31: fatal error: gdcm-2.0/gdcmDict.h: No such file or directory
compilation terminated.
make: *** [Makefile:51: dicominfo.o] Error 1
dicomdict.cpp:30:31: fatal error: gdcm-2.0/gdcmDict.h: No such file or directory
compilation terminated.
make: *** [Makefile:60: dicomlookup.o] Error 1
make: *** [Makefile:57: dicomdict.o] Error 1
make: Entering directory '/tmp/oct-5jTUbJ/dicom/src'
mkoctfile -c -g dicominfo.cpp
mkoctfile -c -g dicomdict.cpp
mkoctfile -L/usr/local/lib -lgdcmcharls -lgdcmjpeg8 -lgdcmjpeg12 -lgdcmjpeg16 -lgdcmCommon -lgdcmDICT -lgdcmDSED -lgdcmIOD -lgdcmMSFF -g dicomread.cpp
mkoctfile -c -g dicomlookup.cpp
make: Leaving directory '/tmp/oct-5jTUbJ/dicom/src'
pkg: error running `make' for the dicom package.
error: called from 'configure_make' in file /usr/share/octave/4.0.1/m/pkg/private/configure_make.m near line 96, column 9
>>
This is due to the dicom package being very outdated (2011).
Recently, a number of researchers have updated the package to use the latest version of gdcm and removed some of the hardcodings that made installing gdcm beyond 2.0 uncompatable with the dicom library.
A thread on this is available here
http://octave.1599824.n4.nabble.com/Can-t-install-dicom-package-0-1-1-and-0-1-2-user-version-in-octave-4-0-2-and-ubuntu-14-0-td4681648.html
In short, their instructions are to use a repo of an updated version of dicom package installed. This assumes that gdcm has been installed with headers (i.e built from source).
hg clone http://hg.code.sf.net/p/octave/dicom
cd dicom
make install
If I start up a new project, add hfsevents to the list of dependencies in the .cabal file, and run stack build, I get an error (on Mac OSX Yosemite):
-- While building package hfsevents-0.1.6 using:
/Users/Me/.stack/setup-exe-cache/setup-Simple-Cabal-1.22.4.0-x86_64-osx-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ build --ghc-options -hpcdir .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/hpc/.hpc/ -ddump-hi -ddump-to-file
Process exited with code: ExitFailure 1
Logs have been written to: /Users/Me/Desktop/code/haskell/test/.stack-work/logs/hfsevents-0.1.6.log
Configuring hfsevents-0.1.6...
Building hfsevents-0.1.6...
Preprocessing library hfsevents-0.1.6...
[1 of 1] Compiling System.OSX.FSEvents ( System/OSX/FSEvents.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/System/OSX/FSEvents.o )
gcc: error: language objective-c not recognized
gcc: error: language objective-c not recognized
I already followed the advice of calling brew install gcc48 --with-all-languages and I uninstalled all Haskell versions, only using the ghc within stack. Xcode is on version 7.1.1. What else can I try to fix this problem?
Eventually got this working. The steps that led me to the solution are documented here: https://github.com/commercialhaskell/stack/issues/1563
Basically, I had two different gcc's installed, one in /usr/bin/ installed by Xcode and one in /usr/local/bin/ from somewhere I don't remember. /usr/bin/gcc was the one being used by cabal, so cabal install hfsevents worked, while /usr/local/bin/gcc, which was the one apparently being used by stack, had this issue. What I did to resolve this was delete /usr/local/bin/gcc and only keep /usr/bin/gcc.
I was trying to install wxHaskell into a machine running Windows XP64, with MinGW/MSYS and wxWidget 3.0 built from source using gcc. I did:
cabal install wx
and got an error:
...
Configuring wxc-0.90.0.4...
setup.exe: wx-config: does not exist
Failed to install wxc-0.90.0.4
cabal.exe: Error: some packages failed to install:
wx-0.90.0.1 depends on wxc-0.90.0.4 which failed to install.
wxc-0.90.0.4 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.90.0.3 depends on wxc-0.90.0.4 which failed to install.
I had successfully used wxWidgets to write an sample application in C++ (gcc). So I do have a working wxWidget installation. And I have wx-config at:
$ which wx-config
/usr/local/bin/wx-config
The problem is that wx-config is a unix shell script, and cabal (called from MSYS) somehow refuses to recognize it even if it's on the system path. If I run wx-config in MSYS, I get something like:
$ wx-config --cxxflags
-I/usr/local/lib/wx/include/msw-unicode-3.0 -I/usr/local/include/wx-3.0 -D_LARGE
FILE_SOURCE=unknown -DWXUSINGDLL -D__WXMSW__ -mthreads
I have asked a question https://stackoverflow.com/questions/21998763/how-to-convert-msys-shell-scripts-to-windows-exe-files to see if it's possible to convert the script to an exe, but no one responded with any solutions.
There is also a related question here, wxHaskell installation on windows , and another here wx 0.90.0.1 fails to install on Haskell Platform 2012.2.0.0 (WinXP). In fact, I couldn't found an answer that's confirmed to work. Also, the errors/settings here seem to be different, or the answers therein don't seem solve my problem. In particular, I downloaded an external wx-config.exe from https://sourceforge.net/projects/wxhaskell/files/wx-config-win/ per http://www.haskell.org/haskellwiki/WxHaskell/Windows. But running wx-config.exe can't recognize my wxWidget installation and always gives me an error about cannot find wxWidgets, like this:
$ ./wx-config.exe --prefix=/usr/local/
wx-config Error: wxWidgets hasn't been found installed at 'C:\MinGW\msys\1.0\loc
al'.
Please use the --prefix flag (as in wx-config --prefix=C:\wxWidgets)
or set the environment variable WXWIN (as in WXWIN=C:\wxWidgets)
to specify where is your installation of wxWidgets.
Any idea how to work around this issue?
Thanks,
-- Update --
#JP I tried:
C:\temp\wxdirect-0.90.0.1>runhaskell Setup configure --extra-lib-dirs=c:\MinGW\lib --extra-include-dirs=c:\MinGW\include --extra-include-dirs=c:\MinGW\msys\1.0\local\include
Configuring wxdirect-0.90.0.1...
and got
Setup: At least the following dependencies are missing:
containers >=0.2 && <0.5, strict -any
I tweaked wxdirect.cabal to bypass containers >=0.2 && <0.5, but can't get pass strict.
I've written a powershell script that automates the setup of MinGW and the downloading/building of wxWidgets in order to build wxHaskell for Windows 7.
https://github.com/cessationoftime/wxHaskell-Windows-Builder