Error Installing GLFW-b on OS X - macos

So I'm trying to install Lamdu, and because it relies on GLFW (brew install glfw3)I've had to install that, and the GLFW bindings for Haskell. I cloned the Lamdu repository, cd lamdu, cabal configure, and the only dependencies that it says I don't have are GLFW-b. cabal install glfw-b gets the same error, every time (I've tried reinstalling the Haskell Platform with a binary and rebuilding from source, nothing changed)
What I think are the most important lines of the error:
3.0.3.2.o: unknown symbol '__objc_empty_vtable'
ghc: unable to load package 'bindings-GLFW-3.0.3.2'
You can find the full error here

Related

./configure doesn't find Qt5Core, QT5GUI, QT5Widgets

I've recently replaced Win10 by Linux Debian 11.2 on my PC (hence I'm a newbee in Linux). Now, not all programs are available as deb-Files.
I tried to compile source code - here a synthesizer ams-2.2.0 - from a tar.gz files (after unzipping into a separate folder) with steps (as written in the INSTALL.TXT to this source, and obviously usual)
./configure
make
make install
I get a bunch of error messages for missing files, when running ./congigure most resolved by installation of missing packages, but at last it fails with error message:
checking for QTCore Qt5Gui Qt5Widgets >= 5.0... no
configure: error: cannot find Qt5 library >= 5.0
(hope to get all written correctly, because I can't copy from the terminal ... Ctrl-Shift-C doesn't seem to work)
I checked the installation in synaptics and found that Qt-Version is 5.12. So what's wrong here?
I'm afraid to have this error message everytime I try to compile different source codes.
You need to install libqtcore and libqtwidgets with development headers, they are in qtbase5-dev package.
sudo apt install build-essential qtbase5-dev qtchooser

Problems installing Haskell with Atom on a Mac

I want to program in Haskell using Atom on a Mac. Therefore I installed the following packages in Atom:
haskell-ghc-mod
ide-haskell
ide-haskell-cabal
language-haskell
After that I installed the Haskell Platform 8.2.1 from here:
https://www.haskell.org/platform/#osx-none
This did not seem to work as I cannot compile and during every start of Atom there is this error message:
Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT
Then I tried installing the necessary packages manually as described on https://atom-haskell.github.io/installation/installing-binary-dependencies/ which also failed (even unregistering failed):
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal uninstall ghc-mod stylish-haskell
cabal: This version of 'cabal-install' does not support the 'uninstall'
operation. It will likely be implemented at some point in the future; in the
meantime you're advised to use either 'ghc-pkg unregister ghc-mod' or 'cabal
sandbox hc-pkg -- unregister ghc-mod'.
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ ghc-pkg unregister ghc-mod
ghc-pkg: cannot find package ghc-mod
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal sandbox hc-pkg -- unregister ghc-mod
ghc-pkg: cannot find package ghc-mod
Daniels-MacBook-Pro:ghc-mod-sandbox daniel$ cabal install ghc-mod stylish-haskell
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: ghc-mod-5.8.0.0 (user goal)
next goal: base (dependency of ghc-mod-5.8.0.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: ghc-mod => base<4.10 &&
>=4.6.0.1)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
I already searched stackoverflow for answers but nothing really worked for me. Can anybody tell me what I am missing?
I can advise you on one part of the problem. The error message from cabal is very confusing, but what it means is:
ghc-mod does not work with a version 4.10.0.0 of the base
The base library ships with GHC and cannot be changed
GHC 8.2.1 ships with base 4.10.0.0
Therefore: you cannot build ghc-mod with the version of the Haskell Platform you downloaded
You can work around this by downloading an older Haskell Platform (8.0.2). In my opinion: it's premature for the promoted Haskell Platform version to be 8.2.1.
Another approach is using Stack, which will manage the installation of GHC installations for you. In this case, running stack install ghc-mod should just work. But since you'll still be using GHC 8.2.1 from the Haskell Platform, it won't do you much good, since ghc-mod is tied to your GHC version.
Personally: I never had success setting up ghc-mod. I've also never used either Atom or VS Code, but I've heard people sharing good experiences with VS Code + Haskero, so if you're looking for an IDE-like experience, that may be something worth considering. I've switched over to using emacs+intero mode, which may be something to consider.
Here are some links that may be helpful on getting started with tooling:
https://haskell-lang.org/get-started
https://haskell-lang.org/intero

Haskell cabal issue with Mac OS X 10.11? (cannot satisfy -package-id)

I used the latest Haskell Platform 7.10.2-a (https://www.haskell.org/platform/mac.html) on Mac OS X 10.11 for El-capitan.
When I tried to install yesod with cabal install yesod, I have multiple error messages such as:
Building email-validate-2.1.3...
Building http-api-data-0.2.1...
Building fast-logger-2.4.1...
Building http-date-0.0.6.1...
Failed to install crypto-random-0.0.9
Build log ( /Users/smcho/.cabal/logs/crypto-random-0.0.9.log ):
Configuring crypto-random-0.0.9...
Building crypto-random-0.0.9...
Preprocessing library crypto-random-0.0.9...
<command line>: cannot satisfy -package-id vector-0.11.0.0-730f99979d41c11c3a1ef069844b5f57
(use -v for more information)
Failed to install email-validate-2.1.3
Build log ( /Users/smcho/.cabal/logs/email-validate-2.1.3.log ):
Configuring email-validate-2.1.3...
The error pattern is pretty much the same: cannot satisfy -package-id.
For example, cabal install aeson gives cannot satisfy -package-id attoparse... error.
Resolving dependencies...
Configuring aeson-0.10.0.0...
Building aeson-0.10.0.0...
Failed to install aeson-0.10.0.0
Build log ( /Users/smcho/.cabal/logs/aeson-0.10.0.0.log ):
Configuring aeson-0.10.0.0...
Building aeson-0.10.0.0...
Preprocessing library aeson-0.10.0.0...
<command line>: cannot satisfy -package-id attoparsec-0.13.0.1-99b4df28644e63383f308c810764a8bb
(use -v for more information)
cabal: Error: some packages failed to install:
aeson-0.10.0.0 failed during the building phase. The exception was:
ExitFailure 1
However, attoparsec library seems to be installed without problem.
smcho#macho ~> cabal install attoparsec
Resolving dependencies...
All the requested packages are already installed:
attoparsec-0.13.0.1
Use --reinstall if you want to reinstall anyway.
What might be wrong?
As suggested here, the cannot satisfy -package-id error you're seeing might be due to an out of date cache.
If running ghc-pkg check warns you that your cache is out of date, then running ghc-pkg recache might resolve your issues.
I've been running into the cannot satisfy -package-id problem all morning (not with yesod, but with various other packages). ghc-pkg recache resolved my issues. Hope this helps.
This might be controversial, but imho the haskell platform and cabal (when used directly) are both essentially deprecated now with the advent of stack.
Stack will:
Automatically install haskell for you (stack setup)
Automatically sandbox (and intelligently share sandboxes between projects)
Completely avoid cabal hell (in my experience)
I could install yesod from brew.
Uninstall haskell-plaftorm
/Library/Haskell/bin/uninstall-hs thru 7.10.2
Install ghc
brew install ghc
brew link ghc
Install stackage
brew install haskell-stack
Install Yesod
stack install yesod
stack install yesod-bin
Use Yesod
Getting "Could not find module `Yesod'" when I try to run first example from Yesod book
stack runghc hello-world.hs
Use Yesod for development
I'm not sure, but I had to run stack exec yesod build first.
stack exec yesod devel.
Yesod deployment with keter
Remove the first line in config/keter.yaml
stack exec yesod keter, and you will get one binary in dist/bin that contains most of the necessary files to run.
Execute the binary as a standalone server.

Agave dependency error

I am trying to install Agave under Fedora, but I got this error:
configure: error: gnome-doc-utils >= 0.3.2 not found
I tried to compile and install the gnome-doc-utils from this page, but i still got this error,and when i try the
yum list installed gnome-doc-utils*
command, I can't find the package. Do I have to register the package after installing? I don't think I have a error for the make install, because I don't see any the text error in the process, or I could be wrong.
In general, package managers (tools like yum) don't know that something has been installed on your machine unless it was installed as a package. If an agave package for Fedora exists, I would suggest using that instead of compiling from source.

How do I get the Haskell Platform's ghc-pkg to work on MAC OSX

I have installed the latest Haskell Platform for MAC OSX and I get the error "Setup: failed to parse output of 'ghc-pkg dump'" when I do anything with Cabal.
So I looked at my versions:
ralphtq$ ghc-pkg list Cabal
/Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d
Cabal-1.8.0.2
ralphtq-mac-mini:cabal-install-0.6.4 ralphtq$ cabal --version
cabal-install version 0.6.2
using version 1.6.0.3 of the Cabal library
This is telling me that even though I have Cabal 1.8 the cabal-instal is at version 0.6.2. I have tried to correct that using darcs to get the latest version of cabal-install, but I cannot get passed the error:
ralphtq$ sh bootstrap.sh
Checking installed packages for ghc-6.12.1...
parsec is already installed and the version is ok.
network is already installed and the version is ok.
Cabal is already installed and the version is ok.
mtl is already installed and the version is ok.
HTTP is already installed and the version is ok.
zlib is already installed and the version is ok.
cleaning...
Linking Setup ...
Configuring cabal-install-0.9.1...
Setup: At least the following dependencies are missing:
Cabal ==1.9.*
It is expecting Cabal to be >= 1.9.
I tried to install a previous version of Cabal but got the following error:
...
...
[50 of 51] Compiling Distribution.Simple ( Distribution/Simple.hs, Distribution/Simple.o )
[51 of 51] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
Configuring Cabal-1.6.0.2...
Setup: failed to parse output of 'ghc-pkg dump'
I am back to the same problem.
I have also tried a complete re-install of the platform.
What are my next options? Help appreciated, thx.
Either you have installed an old version of the Haskell Platform, or you have a mixed up environment where you have installed over the top of an existing, older install, and so now have a mixture of ghc-pkg versions from 6.10.x and 6.12.x
Try removing those ghc-pkg and cabal binaries, and then installing the Platform. That way you won't have those old executables lying around.

Resources