Error when building frama-clang: Unbound module Parameter_sig - ocaml

I downloaded frama-clang from here, installed opam and used it to install Ocaml 2.02.3. Then I built frama-c Aluminium (which went fine) and following that I ran ./configure and then make.
In the latter step, I get an error saying:
File "frama_Clang_option.mli", line 26, characters 22-42:
Error: Unbound module Parameter_sig
make: *** [frama_Clang_option.cmi] Error 2
I've been googling for hours now but I didn't find out how to install that (seemingly) missing module Parameter_sig. I am sure I have installed every required software (llvm, ocaml etc.) so what is missing and how can I solve that problem?

Related

Python-2.7.18: cryptography-3.3.2 module installation from source failed

I need to install custom module of cryptography#3.3.2 with python-2.7.18 on Ubuntu-18.04, on installation from source got below error
build/temp.linux-x86_64-2.7/_openssl.c: In function '_cffi_d_i2d_re_X509_REQ_tbs':
build/temp.linux-x86_64-2.7/_openssl.c:50709:10: warning: implicit declaration of function 'i2d_re_X509_REQ_tbs'; did you mean 'i2d_re_X509_tbs'? [-Wimplicit-function-declaration]
return i2d_re_X509_REQ_tbs(x0, x1);
^~~~~~~~~~~~~~~~~~~
i2d_re_X509_tbs
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
=============================DEBUG ASSISTANCE=============================
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
Current pip version is : pip 20.3.4 (latest supported)
openssl version : OpenSSL 1.1.1
Also all required dependencies are installed.
If
pip install cryptography is done it successfully installs 3.3.2 version.
Kindly suggest.
I tried to install all dependencies but did not solved my problem.
Also attempted to install non patched cryptography-3.3.2 module from source but got the same error.

Problem with Ocaml and make: "Error: the file ____.cmxa is not a compilation unit description"

I'm running make in the top level of the UniMath directory and make keeps returning errors. I'm working on fedora 35 and I'm using Ocaml version 4.11.2.
Here is a print out of the errors
make[2]: Entering directory '/home/rymndbkr/UniMath/sub/coq'
OCAMLBEST -o bin/coqdep_boot
File "_none_", line 1:
Error: tools/coqdep_boot.cmx is not a compilation unit description.
OCAMLBEST -o bin/ocamllibdep
File "_none_", line 1:
Error: tools/ocamllibdep.cmx is not a compilation unit description.
COQMKTOP -o bin/coqtop.opt
File "topbin/coqtop_bin.ml", line 11, characters 20-32:
11 | let drop_setup () = Mltop.remove ()
^^^^^^^^^^^^
Error: Unbound module Mltop
make[2]: *** [Makefile.build:422: bin/coqtop.opt] Error 2
make[2]: Leaving directory '/home/rymndbkr/UniMath/sub/coq'
make[1]: *** [Makefile.make:178: submake] Error 2
make[1]: Leaving directory '/home/rymndbkr/UniMath/sub/coq'
Makefile:76: .coq_makefile_output.conf: No such file or directory
make: *** [Makefile:247: sub/coq/bin/coq_makefile] Error 2
I'll describe the process I went through in hopes that it is reproducible. I was following the UniMath installation instructions on their github (https://github.com/UniMath/UniMath/blob/master/INSTALL.md). They did not have any installation instructions for fedora so I attempted to convert their Debian instructions. The main thing they wanted Debian users to do was run the command
sudo apt-get install build-essential git ocaml ocaml-nox ocaml-native-compilers camlp5 libgtk2.0 libgtksourceview2.0 liblablgtk-extras-ocaml-dev ocaml-findlib libnum-ocaml-dev emacs
To convert this, I made sure I had Ocaml version 4.11.2. I just followed the steps on Ocaml's site (https://ocaml.org/docs/install.html). There was a script which prompted me to modify ~/.bash_profile. I said yes. I also said yes when it prompted me to add a hook.
I also installed ocaml-num via the command dnf since this was required for later versions of ocaml.
I also installed #development-tools via dnf since another stack exchange post recommended it as the best fedora equivalent of build-essentials, the latter of which is part of the downloads for prepping a Debian computer for UniMath.
There are some things I did not mention that the UniMath site said to install to prep a Debian computer. I either had these things (or their equivalents installed) or could not figure out if they had equivalents.
I decided to just go ahead and try to finish the installation. I simply ran
git clone https://github.com/UniMath/UniMath
cd \UniMath
make BUILD_COQIDE=yes
It is on the last of these commands that the errors arose.
P.S. - Please let me know if there is information I should add to this question, or any way to improve it.
The error message not a compilation unit description is likely due to a mismatch between the Ocaml version that compiled the file and the one that is trying to read it.
You can use ocamlobjinfo to check that hypothesis.
A possible fix is to use make clean to reinitialize the state, and then rebuild it after ensuring that the environment is consistent with a call to eval $(opam env).

Rstudio, configure: error: GDALAllRegister not found in libgdal

I am a newbie and tried various methods already. I ran into problems from this one problem. please help. I think there are two problems here. 1) my c++ is not uptodate. 2) my GDALAllRegister not found in libgdal.
I am using mac 2017.
> install.packages("sf")
Installing package into ‘/Users/haoluo/Library/R/3.4/library’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
sf 0.6-1 0.6-3 TRUE
Do you want to install from sources the package which needs compilation?
y/n: y
installing the source package ‘sf’
...
In file included from /usr/local/Cellar/gdal/HEAD-41888/include/gdal.h:42:
/usr/local/Cellar/gdal/HEAD-41888/include/cpl_port.h:187:6: error: Must have C++11 or newer.
# error Must have C++11 or newer.
^
1 error generated.
In file included from gdal_test.cpp:1:
In file included from /usr/local/Cellar/gdal/HEAD-41888/include/gdal.h:42:
/usr/local/Cellar/gdal/HEAD-41888/include/cpl_port.h:187:6: error: Must have C++11 or newer.
# error Must have C++11 or newer.
^
1 error generated.
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘sf’
* removing ‘/Users/haoluo/Library/R/3.4/library/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
I failed to read the prompt in the first place. Now the problem has been solved by simply answering n to the question Do you want to install from sources the package which needs compilation?
I want to thank #nicola again for the help!
enter image description here

ocaml batteries unbound toploop error

I am trying to install bap required for ropc https://github.com/pakt/ropc as per the instructions given in ropc/bap/INSTALL in Ubuntu 14.04 . I have run these commands successfully .
sudo apt-get install ocaml ocaml-native-compilers ocaml-findlib camlidl \
libocamlgraph-ocaml-dev libextlib-ocaml-dev binutils-dev automake \
libcamomile-ocaml-dev otags libpcre3-dev camlp4-extra bison flex
Now , when I make it inside the bap directory , I get the following Unbound module toploop error, which seems to be a compatibility issue between batteries and ocaml. How do I get around this ? Please see the image for further details
Image uploaded
I read that I should add -I +compiler-libs somewhere. But where exactly? I have no experience working with ocaml and I am just trying to build ropc successfully.
I tried to compile the pact/ropc project, and I can only confirm problems.
Although the ocaml configuration succeeds, the compile shows an undefined error:
Error: Some fatal warnings were triggered (2 occurrences)
../Makefile.shared:84: recipe for target 'nat.cmo' failed
make[2]: *** [nat.cmo] Error 2
make[2]: Leaving directory '/home/strobel/tmp/ropc/bap-0.4/bigint-3.12/otherlibs/num'
Makefile:5: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/strobel/tmp/ropc/bap-0.4/bigint-3.12'
Makefile:356: recipe for target 'all-recursive' failed
The bap component used in ROPC is available in opam but ROPC is not, and it shows signs of bitrot. There are 3 issues opened for the github project telling about compile problems.
I have a quite well provisioned ocaml setup, with packages directly from opam (very up to date versions), and my approach was to see if it would compile here.
What to do?
Maybe uninstall your debian ocaml packages, start anew with opam. There is the possibility to install old ocaml versions, too, so maybe walk back in time to a 3.12 ocaml version. But getting the required packages in corresponding versions might not be so easy, opam is quite new. It will be an advanced ocaml debugging job IMO.

Trying to install OCaml 3.12.1 on Linux with Godi

I'm trying to install OCaml 3.12.1 on 64 bit Linux (Mint Linux which is essentially Ubuntu 11.04). I'm using the latest rocketboost (godi-rocketboost-20110717). I run ./bootstrap and after a while get the following (in bootstrap.log):
4287 ### Building godi-pcre
4288 ===> Cleaning for godi-pcre-6.2.2godi1
4289 => Checksum mismatch for pcre-ocaml-6.2.2.tar.gz.
4290 Make sure the Makefile and checksum file (/home/phil/godi-3.12.1/build/godi/ godi-pcre/distinfo)
4291 are up to date. If you want to override this check, type
4292 "godi_make NO_CHECKSUM=yes [other args]".
4293 Error: Exec error: File /home/phil/godi-3.12.1/build/godi/godi-pcre/./../../ mk/bsd.pkg.mk, line 1689: Command returned with non-zero exit code
4294 Error: Command fails with code 1: godi_console
Is this a package problem with pcre?
And how would I use the suggest "godi_make NO_CHECKSUM=yes [other args]" to fix this?
This has been fixed by the maintainer of the pcre-ocaml library. It should work fine now.