Cabal installing HsOpenSSL w/ 64-bit OpenSSL libs on Windows Server 2008 - windows

I have a haskell project that I'm trying to build on Windows 2008 64-bit. One of the dependencies is HsOpenSSL (not be to confused w/ hopenssl). Per the GHC docs, in order for this install to go smoothly one must install a binary distribution of openssl from here: http://slproweb.com/products/Win32OpenSSL.html and link during the cabal install process like this:
cabal install HsOpenSSL --extra-include-dirs="c:/OpenSSL-Win32/include" --extra-lib-dirs="c:/OpenSSL-Win32"
Now the problem arises when I attempt to install the 64-bit binary distribution and install HsOpenSSL w/ it.
cabal install HsOpenSSL --extra-include-dirs="c:/OpenSSL-Win64/include" --extra-lib-dirs="c:/OpenSSL-Win64"
This still throws the error of:
Resolving dependencies...
Configuring HsOpenSSL-0.10.3.5...
cabal.exe: Missing dependencies on foreign libraries:
* Missing C libraries: eay32, ssl32
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install HsOpenSSL-0.10.3.5
cabal.exe: Error: some packages failed to install:
HsOpenSSL-0.10.3.5 failed during the configure step. The exception was:
ExitFailure 1
After inspecting the directories (OpenSSL-Win32 and OpenSSL-Win64) the directories are apparently the exact same with one small difference. There is no MinGW folder in OpenSSL-Win64/libs/, but there is one in OpenSSL-Win32/libs/. After removing this directory from the OpenSSL-Win32 install directory, HsOpenSSL still installs fine when linked w/ the 32-bit libs. So I don't think that difference seems to matter. All that to ask, Is HsOpenSSL compatible with openssl's 64-bit libs? Is there anything obviously wrong about what I'm doing?
I'm using Cygwin, cabal 1.18.0.2, ghc 7.6.3, openSSL version 1.0.1e

It's four years later, but I just encountered the same problem so I guess its still relevant.
I solved it by downloading the latest Win64OpenSSL binaries, and manually cloning the HsOpenSSL repo at https://github.com/vshabanov/HsOpenSSL.
Then I opened the HsOpenSSL.cabal file and changed line 94 from
Extra-Libraries: eay32 ssl
to:
Extra-Libraries: libeay32 ssleay32
Finally, open cmd and make the repo your current directory. Then use cabal configure --extra-include-dirs="c:/OpenSSL-Win64/include" --extra-lib-dirs="c:/OpenSSL-Win64/lib" and cabal install to install the library.

Related

I can't install the library gloss, in Mac OS Catalina (Haskell)

I am trying to install the Haskell gloss library, on Mac OS Catalina, but I have a lot of problems.
I download the tar.gz file from that page.
The first thing I did was follow this steps to install Haskell.
Already with cabal installed (the previous link downloads it), I used this command cabal install gloss. But report the following error:
❯ cabal install gloss
Resolving dependencies...
cabal: Cannot build the executables in the package gloss because it does not
contain any executables. Check the .cabal file for the package and make sure
that it properly declares the components that you expect.
I already did cabal update. And then again cabal install gloss, but nothing.
Then I did cabal v2-update, all okey. And cabal v2-install --lib gloss, but here the report was:

Error installing control v3.0.0 package on El Capitan for Octave

I recently installed Octave using the binary installer found on this site: http://wiki.octave.org/Octave_for_MacOS_X
I then tried to install the control package using 'pkg install -forge control' but it gave me the error 'pkg: error running `make' for the control package.'. I have gone through most of the threads regarding this error but with no success.
I then tried to use MacPorts to install the control package, I followed the instructions on the wiki page above with some help from this thread: Installing general package in octave has error. I believe I succeeded installing the packages because I can see them in the folder tree for Octave and MacPorts says it is installed when using the console.
The problem is that when i run some code in Octave it cannot build as it doesn't know that I have installed any additional packages. Using 'pkg list' in Octave it says that no additional packages installed. I feel like I need to link the two together but I don't know how?
I'll happily explain more if I need to and I hope you can help me out.
Many Thanks,
Sam.
You cannot "link the two together" (assuming you mean the binary version of octave and the MacPorts version).
If you have packages installed via MacPorts for the MacPorts version of octave, then they will only be available from the the MacPorts version of octave, so make sure you are running that.
Otherwise, figure out how to install the package with the octave binary version. It seems you require a build environment for this, but installing the command line tools (which you must have done for MacPorts to work) might have already solved this problem.
It seems to be a problem with gfortan compiler built-in with Octave. To solve this you should install an external fortran compiler.
Try this:
Install Xcode and command line tools for Xcode
Download and install a fortran compiler for MacOS, for example: http://coudert.name/software/gfortran-6.1-ElCapitan.dmg
Change the fortran compiler path in your octave, to this if you installed the compiler that I suggested in point number 2 you only must to open Octave and type: setenv('F77', '/usr/local/gfortran/bin/gfortran').
And Enjoy Octave for MacOS
Octave with control package 3.0.0 on MacOS
You haven't provided enough information for a precise diagnostic, but I had the same error message (and a few more), and re-installing octave from source solved it; see this link for more info, but essentially you can do it by running brew reinstall --build-from-source octave.

installing yesod on windows 7

I want to install yesod on windows 7 64 bits. It fails on the network package. This is what I've done:
I purged ghc and all packages and reinstalled the haskell platform.
Then I updated cabal which worked. The new cabal.exe is not in the path and the systems keeps using the old version.
I added the path to the new cabal.exe and erased the old version. Same issue with alex and happy.
Then I installed yesod-platform and yesod-bin. It failed on the network library (2.5.0.0). I installed mingw and msys (for some reason the msys part of the haskell platform is ignored).
I installed network in Msys with the new version of cabal. Network 2.5.0.0. is installed. Then installed yesod-platform and yesod-bin again as in http://www.yesodweb.com/page/quickstart. Okay... this works fine.
Now I have yesod 1.2.6, ghc version 7.6.3 and cabal 1.20.0.3.
Started yesod init, used 'simple' and changed directory to the new project.
Then I did cabal sandbox init. No errors.
Then: cabal install --enable-tests . yesod-platform yesod-bin --max-backjumps=-1 --reorder-goals
.....
cabal: Error: some packages failed to install:
authenticate-1.3.2.8 depends on network-2.5.0.0 which failed to install.
conduit-extra-1.1.0.4 depends on network-2.5.0.0 which failed to install.
connection-0.2.1 depends on network-2.5.0.0 which failed to install.
....
I think the problem is that installing network works in msys, but not as part of yesod.
Any idea what could be wrong?
Kees

Exe's compilation on Solaris 11 env using gcc

I am on Solaris 11 environment and gcc-3.4.6 is installed on it. The problem is that I am not able to compile exe's there, The error is
-sh: gcc: gcc: cannot execute [Invalid argument]
even if I write gcc only it gives the same error. Kindly help.
Unlike in Solaris 10, on Solaris 11 the GCC is not installed by default.
Fear not.
By far the easiest is to use IPS to install it using the commands below (while being root or other superuser):
pkg install pkg://solaris/developer/build/gnu-make
pkg install pkg://solaris/developer/build/make
pkg install pkg://solaris/developer/gcc-45
pkg install pkg://solaris/system/header
pkg install pkg://solaris/developer/build/autoconf
pkg install pkg://solaris/developer/build/automake-110
This will give you all the tools you typically need to build various open source software packages.
Note that some of the packages have a version number in the package name itself, e.g. gcc-45. You may be able to find even later versions in the package repository, for example for Solaris 11.2 Beta you'll find you have a choice of GCC 4.5, 4.7 or 4.8. The same applies to automake which is now also available in v1.11.
(recipe from my posting here)

libpng not linked on Mac OSX 10.9.2

I installed matrix2png on my Mac and had used it without problem before last week when I installed another image manipulating tool "circos". Circos requires me to install a different version of libpng, and I did. After that, I am no longer able to run matrix2png, which gives me the following error. I think the old ligpnb is not linked any more. Does anyone know how to fix this error? - appreciate your help.
dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/matrix2png
Reason: image not found
Those step solve my problem:
brew versions libpng
You will see some versions of libpng, but unfortunately not 1.5.15, so next you should install 1.5.18.
git checkout 7bec702 Library/Formula/libpng.rb
brew install libpng
You'll will find version 1.5.18 and some another versions.
ln -s /usr/local/Cellar/libpng/1.5.18/lib/libpng15.15.dylib /usr/local/lib/libpng15.15.dylib`
See https://github.com/Homebrew/homebrew-php/issues/1055
Some more info on installing certain versions of brew formulas can be found at https://coderwall.com/p/lqphzg.
Your new version of libpng has probably changed the name of its dyld files. This often happens with upgrades (especially following a major release). To verify this, open up the terminal and type:
ls /usr/local/lib/libpng*
What do you see?
From your error message we know that matrix2png is looking for libpng15 but if you've upgraded when instaling circos then you may now have libpng16 on your system. Consequently matrix2png won't be able to find the files that it's looking for and will be unhappy.
Fixing it this time:
Try re-installing matrix2png and see whether it notices the dependency issues and fixes it for you. You don't really want to downgrade libpng nor do you want to have two versions of it on your system, so having an up-to-date version of matrix2png would be good.
It looks like matrix2png comes from C source code, so you'll want to rebuild it. Download the source code or and then open a terminal. Navigate to the folder with the source code and run configure and then make. Configure will generate a Makefile for your system, and then make will use that file to generate a new binary. I've tested this on my Mac (with libpng16), and found that matrix2png built without any errors.
Suggested future approach:
To prevent future linking problems, you may want to use a package manager like homebrew or macports. In case you're using (or want to use) homebrew, it has circos and lib2png (but not matrix2png, sorry!). Once brew is installed, type the following into the terminal:
brew install libpng
And it should detect linking issues / version conflicts and guide you through fixing them. Brew places all of it's files in a 'cellar' location in /usr/local/Cellar and then symbolically links them into your system.
In case you're already using brew, try brew doctor and follow the instructions to resolve problems.
My experience (I've been dealing with a lot of version conflicts in the past few weeks) is that package managers make life much easier. Occasionally I've had to remove and reinstall packages to fix version issues, but in general brew keeps things neat and working.

Resources