Can't run utop in the terminal - terminal

I have to start learning OCaml language.
In order to practice it at home we have to install some devices following the tutorial made by our University. Since we use Debian at school, it's a bit different when I have to use windows at home and here I come: I don't manage to run the tools properly.
We have to install OCaml via the official site. After doing it, I run "Cygwin64 Terminal" and had to type these commands:
$ opam update
$ opam install utop merlin ocp-indent
It has been done successfully. However when I try to run utop by its command I get this message:
"utop.exe: GetConsoleScreenBufferInfo: Bad file descriptor"
Where did I fail? What do I have to do?

I have the same error after installing ocaml for windows from http://fdopen.github.io/opam-repository-mingw/installation/ (graphic installer, 64 bits)
BUT the error happened ONLY after running opam install utop
Precisely, after running the graphic installer alone, I can launch ocaml (not utop) without error, either from a cygwin terminal or a windows shell (cmd.exe).
If I run opam install utop, I can no longer launch ocaml (cannot exec, segmentation fault) nor utop (GetConsoleScreenBufferInfo: Bad file descriptor)
If I uninstall utop and its dependencies, keeping only the base modules installed by the graphic installer, it is still impossible to launch ocaml.
Only solution found till now : completely remove ocaml and reinstall it ... but there's certainly a better way !

Related

Is there a solution to install DRAKE on my WLS Ubuntu 18.04

I'm trying to install "Drake" (text-based data workflow tool) in a (WSL) Windows Subsystem for Linux and I try the steps in the book Data Science At The Command Line's Chapter 06 and the Drake's github repository I've followed all the steps without any problem, but when I try to install "Drip" github repository with this code
$ git clone https://github.com/flatland/drip.git
$ cd drip
$ make prefix=~/bin install
I had this :
I desperately tried a few things like adjusting the java's environment variables for my windows system and in my WSL Ubuntu too, without success
My Windows Build is :
And my WSL is:
My problem was to install "DRAKE" a Data workflow tool, after being searching for a solution I heard about Homebrew a solution made initially for installing tools on macOS and it's available now for linux even for WSL!
like in magic just type the tool to install and it's automatically done even if it's requires dependencies
brew install drake
So for nubies like me it's a welcome tool which can save you a lot of time.

cygwin bash not returning a valid result

I am following this :
Step 2: Installing Cygwin
Cygwin can be downloaded from http://www.cygwin.com
Run the setup file.
Install from internet. Specify C:\cygwin as the root directory.
In the Select Packages dialog box, select the packages required. gcc-core, gcc-g++, gdb, and make packages are most important. These are the C core, C++ core, the GNU Debugger and the GNU version of ‘make’ utility. These packages will be under the ‘Devel’ category.
Complete the installation.
Step 3: Testing Cygwin
To test whether Cygwin was installed properly, try the following by opening the bash shell:
cygcheck -c cygwin
gcc --version
g++ --version
make --version
gdb --version
If the version details are displayed for all these commands, the installation of Cygwin has been successful.
I got this from here
But the result I get is:
What is wrong or missing with my installation.
Follow up question:
I wanted to use the terminal window in netbeans that is why I installed this.
In this terminal widnow I also have problem. I cant type anything on it. Is this the reason for it?
Try to run /usr/bin/g++. If it is not found, then you don't have g++ installed (installation may have had problems).
You can follow the same procedure for the rest of your commands
If /usr/bin/g++ runs successfully, it means you don't have /usr/bin in your PATH (which is very unlikely). You can put that in your PATH in your startup file.

Errors installing OMake on OSX 10.10.5

I'm trying to install OMake so I can install Teyjus so I can start writing a bit of Lambda Prolog but I'm getting I'm getting a bunch of errors on OS X 10.10.5. The most current one, that I can't figure out, is:
*** omake: 497/1193 targets are up to date
*** omake: failed (5.99 sec, 124/124 scans, 81/94 rules, 258/1153 digests)
*** omake: targets were not rebuilt because of errors:
src/libmojave/lm_printf.cmx
src/libmojave/lm_printf.o
Has anyone run into this? Does anyone know of a fix? Would love to be able to get started.
Inspired by your posts (here and on /r/prolog) I decided to try and build Teyjus as well, and installed OCaml and OMake along the way. The following describes the steps I took to successfully install OCaml and OMake:
Installing OCaml
OCaml.org said the best way to install OCaml was to go through OPAM. However,
since I chose to install OPAM with homebrew, and OCaml was a prereq, I ended up
with the latest version of OCaml set up after the first two of the following steps:
Install opam via homebrew:
Following instructions from https://opam.ocaml.org/doc/Install.html
$ brew update
$ brew upgrade
$ brew install opam
Initialize opam
Following the instructions provided by the homebrew results, I ran
$ opam init # then `y` to allow alterations to the shell profile and another init file
$ eval `opam config env`
Installing standard libraries
If I'm going to have OCaml installed any how, I might as well get it set up
for proper use, cause eventually I'll want to play around with OCaml itself
again too. Thus, I took the advice of the OCaml installation instructions and
ran
$ opam install batteries core
Installing OMake
The OMake download page scared me. I thought, "hey, I've just installed
the robust OCaml package manager, OPAM, and OMake is written in OCaml – so maybe
I can find an OMake package on OPAM and dodge all those deadly bullet-points".
Thus I ran
$ opam show omake
And saw that omake 0.9.8.6-0 was on offer, which appears to be the most recent
one. So I installed it
$ opam update # just to be sure ;) But all was up to date
$ opam install omake
That should be it! I was able to build Teyjus from source subsequently (I'll post the whole record of my steps on the reddit thread).
As an FYI, adding information that answers a question you didn't ask, it looks like Teyjus binaries are also available for OSX: https://github.com/teyjus/teyjus/releases

erlang.mk buildtool is unable to detect windows

I have build a website with Erlang and Cowboy with ErlyDTL on a Linux OS.
Now I want that my website can run on Windows and want to use the Erlang.mk with Relx build tool.
When I give the make command it gives me the error:
Unable to detect platform. Please open a ticket with the output of
uname -a.
uname -a output:
MINGW32_NT-6.2 LENOVO-... 2012-11-21 22:34 i686 Msys
How can I fix this problem in a easy way with explanation because I don't know much of makefiles ;).
Specs:
I have Windows 8.1 64 bit OS.
My Erlang.mk is version 1.2.0-634-g2f69190.
I installed MinGW with msys so I can run make and make distclean.
I have the following extra packages installed during this intallation:
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base
So the PATH to MinGW is c:\MinGW.
With CMD I started C:\MinGW\msys\1.0\msys.bat
Then with the bash shell I ran de postinstall script pi.sh. This gave me no errors.
Then I have installed some extra packages for MinGW with success:
mingw-get install msys-rxvt
mingw-get install msys-unzip
mingw-get install msys-zip
mingw-get install msys-wget
I have red https://github.com/ninenines/erlang.mk/issues/294 but I couldn't understand what I have to do because the lack of explanation.
So is there a solution? If yes what is it and please give some explanation with it so I can fix my problem and understand what I'm doing.
Thanks in advance

How can I run runsnakerun on Mac OS X inside a conda environment?

I've created a conda environment so I can use runsnakerun on my Mac as follows:
conda create -n runsnake wxPython
source activate runsnake
pip install runsnakerun
However, when I now attempt to use runsnake I get:
$ runsnake
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.
How can I get runsnake to work?
The problem is that conda's python is not a "framework python" on Mac, their decision is that you have to use pythonw instead. Unfortunately, pip builds entry point scripts using python not pythonw and, to make matters worse, RunSnakeRun does a horrible subprocess dance to launch itself in 32-bit mode on 64-bit macs.
The upshot is that the only hacky workaround I can think of to launch runsnake is as follows:
VERSIONER_PYTHON_PREFER_32_BIT=yes pythonw `which runsnake32`
I'm not actually sure that environment variable is even needed anymore, but the above does what the entry point appears to be trying to do and does at least start the RunSnakeRun gui.

Resources