OCaml Error : Fatal error: exception Cmi_format.Error(_) - error-handling

I'm using OCaml on my Windows device via Cygwin. I installed Opam as well, and also ran the command
opam pin add merlin --dev-repo
because after installing the most recent OCaml for Windows the compiler ocamlc wouldn't work and some Google searching offered this solution.
The error that I got when I first tried to run ocamlc was:
Error: C:\OCaml\lib/pervasives.cmi
is not a compiled interface for this version of OCaml.
It seems to be for an older version of OCaml.
However, now whenever I type "ocaml" in the terminal, rather than getting the interactive editor I get the fatal error message:
Fatal error: exception Cmi_format.Error(_)
Does anybody know what the problem might be? Thank you.

Installed two different versions of OCaml that weren't compatible.

Related

How can you install 3.11.x from 3.10?

I'm trying to upgrade my version of RabbitMQ using chocolatey. This package has Erlang as a dependency, so installs the relevant version required. I've gone from 3.9.19 to 3.10 fine. However, when I try and go from 3.10 to 3.11.7 I get the following error:
beam\beam_load.c(169): Error loading module elixir:
This BEAM file was compiled for a later version of the run-time system than 24.
To fix this, please recompile this module with an 24 compiler.
(Use of opcode 178; this emulator supports only up to 176.)
ERROR! Failed to start Elixir.
error: {error,
{elixir,
{bad_return,
{{elixir,start,[normal,[]]},
{'EXIT',
{undef,
[{elixir,start,[normal,[]],[]},
{application_master,start_it_old,4,
[{file,"application_master.erl"},
{line,293}]}]}}}}}}
I don't know why this is happening, or if it's even a problem. I've not been able to find anything on this error. When I run RabbitMQ it appears to be running ok with the right version of Erlang. However, this error suggests that it's attempting to use Erlang version 24 (which was already installed as part of installing 3.9.19). How is it deciding what version of Erlang to use here? I checked my environment variables and it the ERLANG_HOME is set correctly.
Update
I tried going through the process again and installing rabbitmq 3.9.19 from chocolatey, upgrading to 3.10.1, then using the choco command to uninstall just Erlang 24.0 (using force). I then upgraded rabbitmq to version 3.11.8. This got rid of the previous error but showed another one stating:
ERLANG_HOME not set correctly.
Please either set ERLANG_HOME to point to your Erlang installation or
place the RabbitMQ server distribution in the Erlang lib folder.
However, when I checked the ERLANG_HOME environment variable it seemed to be set correctly, in that it was pointing now at Erlang OTP and not erl-24.0. So why is this error thrown?

Installing GDAL via poetry on mac getting EnvCommandError error

I've been trying to install GDAL via poetry on mac but i keep getting an EnvCommandError error. I've tried reinstalling command line tools on mac and i even tried this stack overflow solution where i could log in to poetry's shell, try installing poetry via pip through there and then try adding GDAL via poetry but i still get the same error. Going through the code, it's all repeating this error at different lines of code
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/_stdio.h:138:32: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
Something about null values not allowed. I'm not exactly sure how to resolve this one. Has anyone encountered this error before with GDAL and poetry?
EDIT: This still isn't fixed yet but i tried installing via homebrew and the installation proceeded. From what i've been reading so far, it seems that the stdio.h that comes with xcode's command line tools isn't compatible with how gdal is setup so if i install via pip, the installation fails. Not sure though what homebrew does differently. Unfortunately, since poetry uses pip, not homebrew, this is not solved yet

Libuse for communication through C232HM

I have a problem with communication with Atmega644P. I am using C232HM Cable and avrdude. Unfortunately, every attempt of communication ends with the following comment from the command prompt: avrdude: Error: no libftdi or libusb support. Install libftdi1/libusb-1.0 or libftdi/libusb and run configure/make again. I installed following driver from Zadig 2.5: WinUSB (v6.1.7600.16385) and the error still occurs. What should I do?
To get past that error message, you have to do what it says: install the library that AVRDUDE needs and then build AVRDUDE from source in a way that it detects the library and uses it. But I am not sure exactly what you are trying to do and I cannot be sure that this will ultimately work for you. If you haven't built code from sourt before, it can be a challenge.
You never said how you installed AVRDUDE, but you might try downloading a binary version from a different place before you attempt to compile it yourself. The Arduino IDE comes with a version of AVRDUDE, and there is also an AVRDUDE package in MSYS2 (which I contributed).

Visual C++ for python failed with exit status 1120

I am using python2.7 and trying to host my flask app on windows server. While installing mod_wsgi , the command prompt throws the below mentioned error
error: command 'C:\Users\USER\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\link.exe' failed with exit status 1120
I tried reinstalling the visual C++ for python , but the error still persists. Any suggestions???
Please update your question with a more complete error log. You might even find something helpful by reading the error log more carefully -- The error is not in "Visual C++ for Python failing" but from the VC++ linker.
Also, instead of trying to configure mod_wsgi for Windows, you might find it easier to use wfastcgi. wfastcgi is maintained by Microsoft.

Valgrind on macOS Sierra

I following this guide:
valgrind installation guide
After I have downloading the package, and I have run the sh script, but when I launch the make install command, it couldn't create the folder because it don't have the permission (even though I have used the sudo command).
Furthermore I tried with brew but I have this error:
valgrind: This formula either does not compile or function as expected on macOS
versions newer than El Capitan due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.
You can download Valgrind's latest version from their website. Then, you can just ./autogen.sh to install Valgrind. I personally did not encounter anything needed to make.
However, the sad news is, even the most recent version of Valgrind is not very usable on Mac OS Sierra. The reason is that Apple has not released the part of the source code that makes Valgrind crash, without which, the Valgrind maintainers can hardly do anything. You can read more about the discussion around the issue here .
Because Mac OS kernel is under Apple Public Source License, it has to be open-sourced someday. Thus, a Sierra-complitable version of Valgrind is only a matter of time.
Currently, I use Valgrind under Linux. This is all I can suggest now.
Latest Valgrind (git version 3.13.0) now works on MacOS Sierra but needs Xcode command line tools installed (installs needed headers).
Run this before building Valgrind:
xcode-select --install
Thanks goes to this post.
If you get an error similar to
valgrind: This formula either does not compile or function as expected
on macOS versions newer than Sierra due to an upstream
incompatibility.
you can try the workaround brew install --HEAD valgrind I found this information here https://www.gungorbudak.com/blog/2018/04/28/how-to-install-valgrind-on-macos-high-sierra/
If you happen to be on Sierra still, this works (but not on High Sierra), just do
$ brew install valgrind
valgrind: This formula either does not compile or function as expected on macOS
versions newer than Sierra due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.
Update: seems it works on "High Sierra" OOTB now too, it now says:
...versions newer than High Sierra due to an upstream incompatibility...
The easy alternative to valgrind on mac is called 'leaks'. It is a command-line tool, so if you don't already have xcode command-line tools installed, do so with
'xcode-select --install'.
Then, to test for leaks, just compile your prog then run
'leaks -atExit -- ./your_prog'