The compilation of coq:list-string failed at "ruby pp.rb" - coq

I am following a coq tutorial, which requires a basic coq OPAM library coq:io:system. But I got errors with OPAM. (This is with Ubuntu14.04, coq 8.4pl6 and opam1.2.1)
I googled around and didn't find any solution.
Does anyone know what the problem might be and how to fix this error?
Thanks.
=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗ installed coq:function-ninjas.1.0.0
∗ installed coq:error-handlers.1.0.0
∗ installed coq:io.3.0.0
∗ installed coq:list-plus.1.1.0
[ERROR] The compilation of coq:list-string failed at "ruby pp.rb".
∗ installed ppx_tools.0.99.2
∗ installed lwt.2.4.8
∗ installed coq:io:system:ocaml.2.2.0
#=== ERROR while installing coq:list-string.2.1.0 =============================#
# opam-version 1.2.1
# os linux
# command ruby pp.rb
# path /home/zhen/.opam/system/build/coq:list-string.2.1.0
# compiler system (4.02.1)
# exit-code 127
# env-file /home/zhen/.opam/system/build/coq:list-string.2.1.0/coq:list-string-2159-326a35.env
# stdout-file /home/zhen/.opam/system/build/coq:list-string.2.1.0/coq:list-string-2159-326a35.out
# stderr-file /home/zhen/.opam/system/build/coq:list-string.2.1.0/coq:list-string-2159-326a35.err
### stdout ###

It turns out that (as the error message suggests), this particular package seems to depend on ruby.
I was able to finish the installation after installing ruby with sudo apt-get install ruby.

Related

Install why3-coq on MacBook Pro

When I try to install why3-coq on my MacBook Pro, I got the following error message
userde-MacBook-Pro:~ user$ opam install why3-coq
[WARNING] Opam package conf-python-3.1.0.0 depends on the following system
package that can no longer be found: python#3
The following actions will be performed:
↻ recompile dune 2.9.3 [upstream or system changes]
↻ recompile ocamlfind 1.9.3 [upstream or system changes]
↻ recompile stdlib-shims 0.3.0 [uses dune]
...
===== ∗ 2 ↻ 23 ↗ 1 =====
Do you want to continue? [Y/n] y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
...
⬇ retrieved why3-coq.1.5.1 (cached)
[ERROR] The compilation of dune.2.9.3 failed at "./dune.exe build -p dune
--profile dune-bootstrap -j 7".
Processing 32/102: [ocamlfind: ./configure]
#=== ERROR while compiling dune.2.9.3 =========================================#
# context 2.1.2 | macos/x86_64 | ocaml.4.13.1 | https://opam.ocaml.org#ac449189
# path ~/.opam/default/.opam-switch/build/dune.2.9.3
# command ~/.opam/opam-init/hooks/sandbox.sh build ./dune.exe build -p dune --profile dune-bootstrap -j 7
# signalled -7
# env-file ~/.opam/log/dune-4900-2cb712.env
# output-file ~/.opam/log/dune-4900-2cb712.out
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
┌─ The following actions failed
│ λ build dune 2.9.3
└─
╶─ No changes have been performed
But when I try to install dune along, it says dune is already installed
userde-MacBook-Pro:~ user$ opam install dune
[WARNING] Opam package conf-python-3.1.0.0 depends on the following system
package that can no longer be found: python#3
[NOTE] Package dune is already installed (current version is 2.9.3).
Does anyone know what is the potential problem and how to solve it?
UPDATE
I tried to go to the path and build manually (when use a new opam switch, it upgrades to dune.3.4.1, but all behaviors remain the same). This give me a killed 9 response.
userde-MacBook-Pro:~ user$ cd ~/.opam/4.14.0/.opam-switch/build/dune.3.4.1
userde-MacBook-Pro:dune.3.4.1 user$ ~/.opam/opam-init/hooks/sandbox.sh build ./dune.exe build dune.install --release --profile dune-bootstrap -j 7
Killed: 9

Which missing library results in the message '/usr/bin/ld: cannot find -lglib-2.0'?

I am cross compiling a Lazarus program, creating a 32bit program on a 64bit Ubuntu 14.04 Trusty Tahr system, and everything apparently compiles to the very end when I get this messsage
/usr/bin/ld: cannot find -lglib-2.0
What is the full name of the library whose absence results in this error mesage?
libc6-dev:i386 appears to be the most likely library, but when I try to install it with apt indicates build-essential g++ gcc gcc-multilib will be removed so I abort it.
sudo apt-get install libc6-dev:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-libc-dev linux-libc-dev:i386
Suggested packages:
glibc-doc:i386 manpages-dev:i386
Recommended packages:
gcc:i386 c-compiler:i386
The following packages will be REMOVED
build-essential g++ gcc gcc-multilib
The following NEW packages will be installed
libc6-dev:i386 linux-libc-dev:i386
The following packages will be upgraded:
linux-libc-dev
1 to upgrade, 2 to newly install, 4 to remove and 18 not to upgrade.
Need to get 3,126 kB of archives.
After this operation, 12.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
It turns out it was the libglib2.0-0:i386 package. It was already installed earlier, but it had not been fully configured.
It was present in the /lib/i386-linux directory and I had to create a symlink to it include it to the fpc.cfg configuration file used by Free Pascal.
locate libglib | grep ^/lib produced:
/lib/i386-linux-gnu/libglib-2.0.so.0
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0
I symlinked it with the expected name:
ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /lib/i386-linux-gnu/libglib-2.0.so
then added to the Lazarus installations fpc.cfg file
#ifdef cpui386
-Fl/usr/lib32
-Fl/lib/i386-linux-gnu
#endif

cabal install scion-browser fails on Ubuntu 12.04 because haskeline needs Cabal library version >= 1.16

I installed EclipseFP, the Haskell plugin for Eclipse, on my Ubuntu 12.04 machine running Eclipse 3.7.2 and ghc(i) 7.4.1. Everytime I start Eclipse, EclipseFP asks me to install the helper executable scion-browser (0.2.12) and buildrunner (0.7.2) but ultimately fails installing both.
Trying cabal install scion-browser (or cabal install haskeline) on the command line fails with
Resolving dependencies...
cabal: Error: some packages failed to install:
haskeline-0.7.1.2 failed during the configure step. The exception was:
user error (The package requires Cabal library version -any && >=1.16 but no
suitable version is installed.)
Whereas cabal install buildwrapper fails with
Resolving dependencies...
Configuring buildwrapper-0.7.7...
Building buildwrapper-0.7.7...
Preprocessing library buildwrapper-0.7.7...
[1 of 7] Compiling Language.Haskell.BuildWrapper.Base ( src/Language/Haskell/BuildWrapper/Base.hs, dist/build/Language/Haskell/BuildWrapper/Base.o )
[2 of 7] Compiling Language.Haskell.BuildWrapper.GHCStorage ( src/Language/Haskell/BuildWrapper/GHCStorage.hs, dist/build/Language/Haskell/BuildWrapper/GHCStorage.o )
src/Language/Haskell/BuildWrapper/GHCStorage.hs:542:22:
Couldn't match expected type `scientific-0.2.0.1:Data.Scientific.Scientific'
with actual type `Number'
In the pattern: I l
In the pattern: Number (I l)
In the pattern: Just (Number (I l))
cabal: Error: some packages failed to install:
buildwrapper-0.7.7 failed during the building phase. The exception was:
ExitFailure 1
Any help would be greatly appreciated as I don't seem to be able to find any Google hits on either error.
EDIT:
After reinstalling Haskell (it seems I had two versions of containers installed which runhaskell Setup.hs configure --user rightly complained about), I can now configure BuildWrapper but building it fails with the following error:
[3 of 7] Compiling Language.Haskell.BuildWrapper.GHC ( src/Language/Haskell/BuildWrapper/GHC.hs, dist/build/Language/Haskell/BuildWrapper/GHC.o )
src/Language/Haskell/BuildWrapper/GHC.hs:522:37:
The function `showPpr' is applied to two arguments,
but its type `a0 -> String' has only one
In the second argument of `(++)', namely `showPpr dflags bname'
In the expression: "show " ++ showPpr dflags bname
In an equation for `exprS': exprS = "show " ++ showPpr dflags bname
The issue with BuildWrapper is due to a breaking change in Aeson. See https://github.com/JPMoresmau/BuildWrapper/issues/20. You can get the buildwrapper source code from github (which fixes the bounds and adapts the code) or force the install of Aeson 0.6.
For Haskeline I'm not sure, can you try to install haskeline on its own?
i think you should install newer cabal library acoording message: The package requires Cabal library version -any && >=1.16.
cabal update
cabal install cabal
cabal install cabal-install
cabal --version
should be:
using version 1.20.0.0 of the Cabal library
if not fix your PATH. new cabal binary is probably in ~/.cabal/bin
then:
cabal install haskeline
I had the same error (The function `showPpr' is applied to two arguments), both while installing with cabal and building from source.
I tried with an older version of aeson,
cabal install buildwrapper --constraint=aeson==0.6.2.1
Be careful to replace the aeson version with the version you have closer to 0.6.2.1
It produced lot of warning, still it could build successfully.

installing ruby 1.9.3 in michael hartl's ruby on rails tutorial

I'm working on Michael Hartl's ruby on rails tutorial http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-development_tools.
I installed Git, updated my OS to 10.8.2 and downloaded XCode 4.5.2.
when I type in
rvm install 1.9.3
this long thing comes up...
Ruby (and needed base gems) for your selection will be installed shortly.
Before it happens, please read and execute the instructions below.
Please use a separate terminal to execute any additional commands.
Notes for Mac OS X 10.8.2, Xcode 4.5.2.
For JRuby: Install the JDK. See http://developer.apple.com/java/download/ # Current Java version "1.6.0_26"
For IronRuby: Install Mono >= 2.6
For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
For Opal: Install Nodejs with NPM. See http://nodejs.org/download/
To use an RVM installed Ruby as default, instead of the system ruby:
rvm install 1.8.7 # installs patch 357: closest supported version
rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system.gems # migrate your gems
rvm alias create default 1.8.7
And reopen your terminal windows.
Xcode and gcc:
Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.
Xcode 4.1 and earlier:
- Ruby will build fine.
Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
* Install apple-gcc42 from Homebrew
* Install osx-gcc-installer
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
Xcode 4.2+ install or/and Command Line Tools for Xcode is required to provide make and other tools.
osx-gcc-installer:
If you don't use Homebrew, you can download and install osx-gcc-installer: https://github.com/kennethreitz/osx-gcc-installer.
Warning: Installing osx-gcc-installer on top of a recent Xcode is known to cause problems, so you must uninstall Xcode before installing osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line Tools for Xcode if you desire.
** NOTE: Currently, Node.js is having issues building with osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
Press 'q' to continue.
~
(END)
Originally I had to get homebrew and
brew install libksba
but I did that already and it works. That leads to "Xcode and gcc:" and everything below it.
So, I have homebrew, and the following three commands work:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
But when I try
rvm pkg install openssl
this is what happens
Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives
Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log
And this is what happens when I try what it says...
Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm reinstall all --force
Adam-Zerners-MacBook-Pro:~ adamzerner$
some other information...
I don't see a .rvm folder under adamzerner, so I can't read what it tells me to (not that I would understand what I'd be reading anyway).
It seems that I have 1.8.7 installed:
Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
So... to summarize... when I try to run
rvm install 1.9.3
I get the gcc/Xcode problem. To fix that it says to download apple-gcc42 from Homebrew. When I do that, I get a problem after doing
rvm pkg install openssl
The problem being that I need to reinstall all rubies. When I do that:
rvm reinstall all --force
it seems that nothing happens.
Thanks in advance to anyone willing to help me with this problem!
EDIT: I forgot to say this before. For the "long thing" up above, when I press q to continue, this is what happens...
Searching for binary rubies, this might take some time.
https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p327.tar.bz2 - #configure
ruby-1.9.3-p327 - #download
ruby-1.9.3-p327 - #extract
ruby-1.9.3-p327 - #validate
Libraries missing for ruby-1.9.3-p327: env. Refer to your system manual for installing libraries
Mounting remote ruby failed, trying to compile.
Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives
Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running 'make', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327 (already extracted)
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
EDIT: What happens when I follow the github link OliverAtkinson posted
Last login: Wed Dec 26 15:55:12 on ttys000
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew update
Updated Homebrew from 751a0d6e to c67c126c.
==> New Formulae
ume
==> Updated Formulae
akka global markdown ruby slrn
basex gnuplot mu ruby-build ttytter
casperjs gradle qt shiboken vice
cassandra groonga qt5 shocco wine
discount jenkins rakudo-star signing-party xvid
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew tap homebrew/dupes
Error: Already tapped!
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew install autoconf automake apple-gcc42
Error: autoconf-2.69 already installed
Error: automake-1.12.6 already installed
Error: apple-gcc42-4.2.1-5666.3 already installed
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew remove autoconf automake apple-gcc42
Uninstalling /usr/local/Cellar/autoconf/2.69...
Uninstalling /usr/local/Cellar/automake/1.12.6...
Uninstalling /usr/local/Cellar/apple-gcc42/4.2.1-5666.3...
Adam-Zerners-MacBook-Pro:~ adamzerner$ brew install autoconf automake apple-gcc42
==> Downloading http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
Already downloaded: /Library/Caches/Homebrew/autoconf-2.69.tar.gz
==> Patching
patching file bin/autoreconf.in
==> ./configure --prefix=/usr/local/Cellar/autoconf/2.69
==> make install
/usr/local/Cellar/autoconf/2.69: 69 files, 2.0M, built in 13 seconds
==> Downloading http://ftpmirror.gnu.org/automake/automake-1.12.6.tar.gz
Already downloaded: /Library/Caches/Homebrew/automake-1.12.6.tar.gz
==> ./configure --prefix=/usr/local/Cellar/automake/1.12.6
==> make install
/usr/local/Cellar/automake/1.12.6: 130 files, 2.1M, built in 16 seconds
==> Downloading http://r.research.att.com/tools/gcc-42-5666.3-darwin11.pkg
Already downloaded: /Library/Caches/Homebrew/apple-gcc42-4.2.1-5666.3.pkg
==> Caveats
NOTE:
This formula provides components that were removed from XCode in the 4.2
release. There is no reason to install this formula if you are using a
version of XCode prior to 4.2.
This formula contains compilers built from Apple's GCC sources, build
5666.3, available from:
http://opensource.apple.com/tarballs/gcc
All compilers have a `-4.2` suffix. A GFortran compiler is also included.
==> Summary
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 5 seconds
Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm pkg install openssl
Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives
Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c
Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
Updating openssl certificates
Error running 'update_openssl_certs', please read /Users/adamzerner/.rvm/log/openssl.certs.log
Adam-Zerners-MacBook-Pro:~ adamzerner$ CC=/usr/local/bin/gcc-4.2 rvm reinstall 1.9.3 --patch falcon --force-autoconf -j 3
Removing /Users/adamzerner/.rvm/src/ruby-1.9.3-p327...
/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 has already been removed.
Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives
Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
Error running 'make -j3', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log
Installing Ruby from source to: /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327
Applying patch /Users/adamzerner/.rvm/patches/ruby/1.9.3/p327/falcon.diff
ruby-1.9.3-p327 - #autoreconf-f
ruby-1.9.3-p327 - #configuring
Error running './configure --enable-shared --disable-install-doc --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 --with-opt-dir=/Users/adamzerner/.rvm/usr', please read /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.
Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Adam-Zerners-MacBook-Pro:~ adamzerner$
I've successfully downloaded Ruby 1.9.3 now!
I think the problem was that I hadn't downloaded Command Line Tools from XCode. See http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
note that for whoami, it's using the backtick key, which is right above the tab key. It is NOT using quotes.
After I downloaded Command Line Tools, I then typed in rvm install 1.9.3. I got the same "long thing" as before, but at that point I had everything I needed, so I just pressed q to continue, and ruby 1.9.3 was successfully installed!
note: although it was successfully installed, when I typed ruby -v, it still said it was 1.8.7 even though it wasn't. However, after closing and reopening the terminal, it then said that the version was indeed 1.9.3.

Compiling MongoDB r2.0.2 on ubuntu 10.04 resulted in error

I am compiling MongoDB from source with instructions from http://www.mongodb.org/display/DOCS/Building+for+Linux
I ran into this error after ran "scons all":
rty/js-1.7/jsscan.c
third_party/js-1.7/jsscan.c:112:22: error: jsautokw.h: No such file or directory
third_party/js-1.7/jsscan.c: In function 'FindKeyword':
third_party/js-1.7/jsscan.c:122: warning: label 'test_guess' defined but not used
third_party/js-1.7/jsscan.c:119: warning: label 'got_match' defined but not used
scons: *** [third_party/js-1.7/jsscan.o] Error 1
scons: building terminated because of errors
I am on a 64 bit ubuntu 10.04. gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5), scons version is:
script: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
engine: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
Does anyone have the same problem? There are similar errors reported for this jsscan file in earlier versions, but has been fixed since.
Dude it worked! Do this:
sudo apt-get remove xulrunner-1.9.2-dev xulrunner-1.9.2
curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
tar zxvf js-1.7.0.tar.gz
cd js/src
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
sudo JS_DIST=/usr make -f Makefile.ref export
Then run scons all again
There is no need to uninstall "xulrunner-1.9.2-dev" and "xulrunner-1.9.2" as it's also uninstalls other packages you may need later.
Just install the newer version of scons package (I used for it scons-2.1.0).
Download scons-2.1.0.tar.gz
Install it and use the installed one instead of the scons v1.2.0 repository package for Ubuntu 10.04.
It worked for me without any additional tricks.