I downloaded some post quantum algorithms from NIST and tested them. Some codes need to use Keccak package, so I downloaded it.
$ git clone https://github.com/gvanas/KeccakCodePackage
When I tried to build the required static library,
$ make generic64/libkeccak.a
I got an error message:
make: *** No rule to make target 'generic64/libkeccak.a'. Stop.
Did I miss other steps? How can I fix it?
Thank you for any help.
Related
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).
I have previously installed some code using a makefile. Now, I'm installing an updated version of the code (with some added features). The problem is that when I run make clean; make class the following error comes up:
ld: 13 duplicate symbols for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [class] Error 1
I believe this is because it is trying to install the same files in the same directories as the previous installation. I've tried make uninstall on the other installation, but that just returns make: *** No rule to make target `uninstall'. Stop.
Is this the reason for the error? If so, do I have to manually uninstall the previously installed files? And how do I do that?
Thanks a lot for any help!
We need your Makefile for this.
Clean and other commands are defined inside it, make sure that the rules are correctly cleaning the files.
I am trying to install gcc-4.9.0 in local-build on linux along with gmp-4.3.2, mpfr-3.1.4 and mpc-1.0.3 (I am following this tutorial).
But when I run make install in the gcc build directory, I get this error :
test -z "/home/k.masson/gcc-4.9.0/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0" || /usr/bin/mkdir -p "/home/k.masson/gcc-4.9.0/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0"
Installing dummy lib libgcj_bc.so.1.0.0
/home/k.masson/build/gcc-4.9.0/host-x86_64-unknown-linux-gnu/gcc/cc1:
Mainly this :
error while loading shared libraries: libgmp.so.3: cannot open shared object file: No such file or directory
It seems that libgmp.so.3 is not correctly installed but it is ('make install'didn't failed for gmp) and I checked many times if the links were correct but nothing to do, I don't know why the make file don't find it.
Before running make install, I run these commands in the following order :
LD_LIBRARY_PATH=/home/k.masson/gmp-4.3.2/lib:/home/k.masson/mpfr-2.4.2/lib:/home/k.masson/mpc-0.8.1/lib ./configure --prefix=/home/k.masson/gcc-4.9.0 --with-gmp=/home/k.masson/gmp-4.3.2 --with-mpfr=/home/k.masson/mpfr-2.4.2 --with-mpc=/home/k.masson/mpc-0.8.1 --disable-multilib
And this (I don't know why but this is in the tutorial):
LD_LIBRARY_PATH=/home/k.masson/gmp-4.3.2/lib:/home/k.masson/mpfr-2.4.2/lib:/home/k.masson/mpc-0.8.1/lib nice -n 19 time make -j8
libgmp.so.3 is in /home/k.masson/gmp-4.3.2/lib as well as libgmp.so.3.5.2. I even tried to create the link myself with ln -s libgmp.so.3.5.2 libgmp.so.3 but it doesn't fix the problem.
To install gmp in local-build, I used these commands :
./configure --prefix=/home/k.masson/gmp-4.3.2 --enable-cxx
nice -n 19 time make -j8
make install
make check
echo $? # Returns 2
But one test fail :
====================================
1 of 58 tests failed
Please report to gmp-bugs#gmplib.org
====================================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory `/home/k.masson/build/gmp-4.3.2/tests/mpz'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/home/k.masson/build/gmp-4.3.2/tests/mpz'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/k.masson/build/gmp-4.3.2/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/k.masson/build/gmp-4.3.2'
make: *** [check] Error 2
Also, I got these few lines above when I'm running the tests:
/bin/sh: line 4: 20956 Segmentation fault (core dumped) ${dir}$tst
So I tried to install gmp-6.1.0 to avoid this test issue and it works, all tests are Ok but now, this is a gcc issue, I can't run make install anymore because the make file doesn't exists.. Should I keep the new gmp ? And change my gcc ? Or not at all ?
Thanks for your help
The short way
To fix the test issue when installing gmp, I just choosed a newer version to install, it looked as a compatibility issue. So I picked up gmp-6.1.0 and install and test processes were successful.
But this brought a new problem when installing gcc-4.9.0, the ./configure wasn't able to generate a make file with a install procedure. So I had to get a newer version, I chose gcc-4.9.3 instead of gcc-4.9.0 and everything works perfectly.
The clean way
As #piyush made me noticed, the short way is not recommended at all. See Installing GCC.
If you want to do a local-build, the best is to download the gcc version you want here and before installing it, run the ./contrib/download_prerequisites script in the gcc source.
If not, you can use your package manager, which is much better.
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.
Preface: I am new to OCaml, OPAM, and OASIS.
tldr question: How do I properly set up a package with opam that is not already available in the repository (I can't just do opam install X)? More details follow:
I am trying to include ocaml-glpk in an OCaml project. I installed ocaml-glpk just by running make and make install as stated in the README, and the given example compiles and runs correctly. However, I am using OASIS to generate the build system of my project, and I am not sure how to set it up. I have the same example (renamed to glpkExample.ml in a src folder) and the following in my _oasis file:
Executable "glpkExample"
Path: src
MainIs: glpkExample.ml
CompiledObject: best
BuildDepends:
glpk
After running oasis setup -setup-update dynamic, I run make and get the following error:
ocaml setup.ml -build
Finished, 0 targets (0 cached) in 00:00:00.
+ /home/dimitrios/.opam/system/bin/ocamlfind ocamlopt -g -linkpkg -package glpk src/glpkExample.cmx -o src/glpkExample.native
File "_none_", line 1:
Error: Cannot find file /home/dimitrios/.opam/system/lib/glpk/glpk.cmxa
Command exited with code 2.
Compilation unsuccessful after building 4 targets (3 cached) in 00:00:00.
E: Failure("Command ''/usr/bin/ocamlbuild' src/glpkExample.native -tag debug' terminated with error code 10")
make: *** [build] Error 1
It seems the glpk library is missing a cmxa file needed to compile a native executable. I am not sure how to fix this. To compile glpkExample.ml correctly, my Makefile includes /home/dimitrios/.opam/system/lib/glpk and also uses the OCamlMakefile, which is extremely long and convoluted. Any help on setting this up with OASIS or how to get ocaml-glpk to work nicely with OASIS would be greatly appreciated.
Thanks!
This website is not appropriate for bug reports. You should really report it here.
The temporary solution is to use CompiledObject: byte to compile in bytecode.
If you're using opam then it is best to install application with it, not manually. Try to clean up your system and remove whatever you installed, and then do:
$ eval `opam config env`
$ opam install ocaml-glpk
Afterwards, if glpk is packaged in opam correctly, it should work with your setup, i.e., just with oasis's BuildDepends field and nothing more.