How to install ThreadScope on GHC 6.12 in Ubuntu - haskell

I've try to install treadScope on my computer for Haskell parallel profiling, I'm using Ubuntu 10 and GHC 6.12. The problem it that I unfortunatlly came out with the following problem. I can't install glade, and the command pkg-config -modversion libglade2.2 return an error, which mean that the glade's .pc file is not found by the system. How can I fix this problem on ubuntu,
Thank you a lot for any answer
More details
here is the error message return by the command cabal install threadscope
Linking /tmp/glade-0.12.02992/glade-0.12.0/dist/setup/setup ...
Configuring glade-0.12.0...
setup: The pkg-config package libglade-2.0 version >=2.0.0 is required but it
could not be found.
cabal: Error: some packages failed to install:
glade-0.12.0 failed during the configure step. The exception was: ExitFailure 1
threadscope-0.1.2 depends on glade-0.12.0 which failed to install.
And here is the error message return by the command _pkg-config --modversion libglade-2.0
Package libglade-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libglade-2.0.pc' to the PKG_CONFIG_PATH environment variable
No package 'libglade-2.0' found
Thanks for your reply

Lot of thanks to TomMD,
I've install libglade2-dev and thinks goes well
thanks a lot for your reply

Related

Unable to Install glpk-hs

I've installed the Haskell Compiler and glpk-hs using the instructions here. Further, I've used cabal install glpk-hs to install required files in an attempt to compile a Haskell Program.
However, the cabal installation of glpk is not working. The following message keeps popping up:
Resolving dependencies...
Configuring glpk-hs-0.5...
Failed to install glpk-hs-0.5
Build log :
cabal: Entering directory '/var/folders/cr/9f1ltj7d4b31hmkfn03hjl_r0000gn/T/cabal-tmp-12521/glpk-hs-0.5'
Configuring glpk-hs-0.5...
cabal.real: Missing dependency on a foreign library:
Missing C library: glpk
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal:
Leaving directory '/var/folders/cr/9f1ltj7d4b31hmkfn03hjl_r0000gn/T/cabal-tmp-12521/glpk-hs-0.5'
cabal: Error: some packages failed to install:
glpk-hs-0.5 failed during the configure step. The exception was:
ExitFailure 1
As above, I have tried both installing glpk in a nonstandard location and the standard location, but in all cases, has been unable to find the glpk.
The glpsol solver, which uses GLPK is installed though, as it shows the version of which it is currently running: GLPSOL: GLPK LP/MIP Solver, v4.62
Figured it out! hmatrix-glpk had the extra directories for OS X in the .cabal file:
if os(OSX)
extra-lib-dirs: /usr/lib
extra-lib-dirs: /opt/local/lib/
include-dirs: /opt/local/include/
extra-lib-dirs: /usr/local/lib/
include-dirs: /usr/local/include/
if arch(i386)
cc-options: -arch i386
Copying this into the glpk-hs.cabal allows the installation to work.

Haskell cabal: C compiler cannot create executables

I'm trying to install ghc-mod for GHC 8.0.1 on windows/x64. When I try to install ghc-mod via cabal install ghc-mod I get an error saying my C compiler isn't working (it is using the c-compiler bundled with ghc).
Here is the output (of the second time I ran the command. Its basically what the first one says but reduced to the error message):
C:\Users\******>cabal install ghc-mod
Resolving dependencies...
Configuring old-time-1.1.0.3...
Failed to install old-time-1.1.0.3
Build log ( C:\Users\******\AppData\Roaming\cabal\logs\old-time-1.1.0.3.log ):
Configuring old-time-1.1.0.3...
bash.exe: warning: could not find /tmp, please create!
configure: WARNING: unrecognized options: --with-compiler
checking for gcc... C:\PROGRA~1\Haskell Platform\8.0.1\mingw\bin\gcc.exe
^ I think the error lies here, as you can see the file path is corrupted but I wasn't able to locate the cause for this
checking whether the C compiler works... no
configure: error: in `/cygdrive/c/Users/******/AppData/Local/Temp/cabal-tmp-6084/old-time-1.1.0.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\Users\******\AppData\Local\Temp\cabal-tmp-6084\old-time-1.1.0.3'
cabal: Error: some packages failed to install:
cpphs-1.20.2 depends on old-time-1.1.0.3 which failed to install.
ghc-mod-5.6.0.0 depends on old-time-1.1.0.3 which failed to install.
haskell-src-exts-1.17.1 depends on old-time-1.1.0.3 which failed to install.
hlint-1.9.35 depends on old-time-1.1.0.3 which failed to install.
old-time-1.1.0.3 failed during the configure step. The exception was:
ExitFailure 77
Could you please help me to install ghc-mod or provide any other way of installing it.
I already trieded reinstalling Haskell since I'm just starting off but this didn't make any difference.
And YES I added the 3 lines provided on the haskell homepage.
I can't know for certain, but thought I'd write an answer with what I think is going on.
The old-time package contains a configure script, which is a Unix shell script used to (surprise!) configure the package. The Cabal build system allows packages to automatically integrate configure, and will run the script for them. On POSIX systems, there's always a shell easily available. However, on Windows, that's not the case. I believe that's the problem you're running into.
Now the tricky part: why don't you have a shell? In theory, the Haskell Platform ships a shell. Well, here are my guesses:
For Stack usage, there's a Haskell Platform bug where Stack cannot find the MSYS tools, which include the shell script. Newer versions of Stack work around this bug, but passing in --no-system-ghc tells Stack to ignore any installed toolchain and manage the installation itself, which is more reliable than using HP's copy.
For Cabal usage, I'm less certain. I think the HP team decided to require you to use a special batch program to set environment variables correctly, so if you just run cabal install foo from a normal command window, Cabal won't find MSYS and it will fail. However, without more information, I can't be certain this is the case.
My personal recommendation: uninstall Haskell Platform, and use the recommended Stack installation instructions. In your case, that's just downloading and running the 64-bit Windows installer.
Finally: your suspected problem is not actually a problem; on Windows, pathnames longer than 8 characters can be compressed in the way you see (with ~1 at the end). There's nothing buggy in that path display.

cabal installation failure for llvm-general

I am attempting to install the llvm-general Cabal package on OS X. When I do, I get the following error:
$ cabal install llvm-general
Resolving dependencies...
[1 of 1] Compiling Main ( /var/folders/PP/PP+wAuBcGWuqzt-Iekiipk+++TI/-Tmp-/llvm-general-3.4.4.2-38424/llvm-general-3.4.4.2/Setup.hs, /var/folders/PP/PP+wAuBcGWuqzt-Iekiipk+++TI/-Tmp-/llvm-general-3.4.4.2-38424/llvm-general-3.4.4.2/dist/setup/Main.o )
Linking /var/folders/PP/PP+wAuBcGWuqzt-Iekiipk+++TI/-Tmp-/llvm-general-3.4.4.2-38424/llvm-general-3.4.4.2/dist/setup/setup ...
setup: The program llvm-config version ==3.4.* is required but the version
found at /usr/local/bin/llvm-config is version 3.2
cabal: Error: some packages failed to install:
llvm-general-3.4.4.2 failed during the configure step. The exception was:
ExitFailure 1
What it's doing is running /usr/local/bin/llvm-config; this, I believe, is the version of LLVM installed by the OS X developer tools that I installed a while ago. I do have the current version of LLVM, but it's installed with Homebrew as a local (keg-only) installation. Is there any way I can point cabal to that version of LLVM for the purposes of this installation?
I believe that cabal simply looks in your PATH for llvm-config, so just adjust your path accordingly. Otherwise you can try:
modify the file llvm-general.cabal to reference an absolute path for llvm-config (line 52)
temporarily move aside /usr/local/bin/llvm-config and replace it with the llvm-config for the llvm installation you want to use
For reference, I found llvm-config for version 3.4 at /usr/local/Cellar/llvm34/3.4.2/lib/llvm-3.4/bin/llvm-config on my OSX system.

How to install wxHaskell on Windows with MinGW/MSYS

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

Using Curl in Haskell Platform on Windows 7

I'm trying to use 'import Text.XML.HXT.Curl' in my project so I can have access to online files (some xml files).
So the error I get is :
Could not find module `Text.XML.HXT.Curl':
Use -v to see a list of the files searched for.
I tried :
:! cabal install curl
but I get an error that it must be on unix or cygwin, so I go on installing cygwin, now it says:
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
cabal: Error: some packages failed to install:
curl-1.3.7 failed during the configure step. The exception was:
ExitFailure 77
:! gcc -version
Access is denied
I tried to download the curl package and install it with cmd : runHaskell Setup.hs configure but I get this :
Setup.hs: Missing dependency on a foreign library:
Missing C library: curl
This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version)
Tried installing gcc,g++,libcurl,make in cygwin, still fails.
Tried installing mingw/mysis and I failed too. Something about curl/curl.h missing.
Does anyone succeeded and can tell me how he did it ?
Installing curl on windows can be tricky. But you can try hxt-http package. It is based on native HTTP package, and doesn't require external dependencies. AFAIK it will just work out of the box on windows.
Small note: to use curl with hxt, you need to install hxt-curl package. But, yes, it will not help, cos it depends of curl package :(
So, my answer actually is about "using hxt on windows", not about "using curl on windows". You can ignore it in case it doesn't help you.

Resources