Open tusharkarumudi opened 6 years ago
Facing the same issue:
Try you to install a specific version of the compiler i.e., OCaml 4.01.0 (as listed in the Readme file) and dependencies. use below command to install the specific version opam init --comp 4.01.0
For compiler version installation, the below link may help
https://www.youtube.com/watch?v=Cqi5ENX77AE
I have cloned the code for uroboros and installed all the required packages like opam, ocaml, batteries etc But while running ./build file the operation is failing.
can you be a bit more specific? What error are you getting?
This is what I get wheb i run ./build My Ocaml version is 4.02.3
@AindriyaBarua the current version of the Uroboros works only on the OCaml compiler version 4.01.0. Please check the version of your compiler and let me know.
Uroboros was tested and experimented with OCaml compiler version 4.01.0. We have not experimented with other versions yet. We might be able to updated to the latest version of the ocaml compiler in the future.
From: IST Plato ISTPLATO-L@lists.psu.edu On Behalf Of plato@IST.PSU.EDU Sent: Monday, May 18, 2020 11:58 AM To: istplato-l istplato-l@lists.psu.edu Subject: Re: [s3team/uroboros] Build on lunix failed (#2)
@AindriyaBaruahttps://github.com/AindriyaBarua the current version of the Uroboros works only on the OCaml compiler version 4.01.0. Please check the version of your compiler and let me know.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/s3team/uroboros/issues/2#issuecomment-630276597, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGL3GHGUQPS55M76FLXRELRSFLIDANCNFSM4EFS7ZVQ.
@AindriyaBarua @aruncgowda To build and run the current version Uroboros on ubuntu 18.04 or 16.04 follow the steps below: We will be releasing a docker file for the Uroboros soon.
$ sudo apt-get update
$ sudo apt-get install opam
$ opam init --comp 4.01.0
$ eval opam config env
$ opam depext conf-m4
$ opam install deriving ocamlfind parmap batteries ocamlbuild
git clone https://github.com/s3team/uroboros.git cd uroboros/src$ ./build cd uroboros/src$ python uroboros.py bzip
Let me know if you get any errors with these steps.
@ajaymas I followed the steps you mentioned. This is the error on doing ./build:
+ ocamlfind ocamldep -package deriving,deriving.syntax -syntax camlp4o -package batteries,parmap -modules type.ml > type.ml.depends
ocamlfind: Package `deriving' not found
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
I tried this: aindriya@aindriya:~/uroboros/src/uroboros/src$ opam install deriving [NOTE] Package deriving is already installed (current version is 0.7.1).
@AindriyaBarua
If you have already installed any other version of opam , please remove that opam version using below command $sudo apt-get autoremove opam #it will remove opam and all its dependencies
After this goto Files and delete the .opam folder. (if you don’t find .opam folder press[Ctrl+h]) [If you are a new installer of opam please ignore the above commands] New Installation $sudo apt-get update $sudo apt-get install opam $opam init --comp 4.01.0 #Givey(Yes)foreverything $env$(opam env) $opam env OR $opam configenv $opam depext conf-m4 $opam install deriving $opam install ocamlfind $opam install batteries $opam install parmap
Uroboros $gitclonehttps://github.com/s3team/uroboros.git $cd uroboros/src $./build
$python uroboros.py bzip
@ajaymas @aruncgowda I am still facing this:
(base) aindriya@aindriya:~/uroboros/src$ ./build
+ ocamlfind ocamldep -package deriving,deriving.syntax -syntax camlp4o -package batteries,parmap -modules type.ml > type.ml.depends
ocamlfind: Package `deriving' not found
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
(base) aindriya@aindriya:~/uroboros/src$ opam install deriving
[NOTE] Package deriving is already installed (current version is 0.7.1).
Thanks in advance!
How about we give a dockerfile so you can give it a try? We are testing it and will release it once we see no problem.
From: IST Plato ISTPLATO-L@lists.psu.edu On Behalf Of plato@IST.PSU.EDU Sent: Thursday, May 21, 2020 6:43 AM To: istplato-l istplato-l@lists.psu.edu Subject: Re: [s3team/uroboros] Build on lunix failed (#2)
@ajaymashttps://github.com/ajaymas @aruncgowdahttps://github.com/aruncgowda I am still facing this:
(base) aindriya@aindriya:~/uroboros/src$ ./build
ocamlfind: Package `deriving' not found
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
(base) aindriya@aindriya:~/uroboros/src$ opam install deriving
[NOTE] Package deriving is already installed (current version is 0.7.1).
Thanks :")
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/s3team/uroboros/issues/2#issuecomment-632016189, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADGL3GAV5EZF6RL2ZVA7QETRSUATXANCNFSM4EFS7ZVQ.
@AindriyaBarua This is a docker file created for the Uroboros-OCaml version. It's working without any issue you can try this.
FROM ubuntu:18.04 RUN apt-get update && apt-get upgrade -y RUN apt-get install -y \ git \ opam \ autoconf \ automake \ debianutils \ m4
RUN opam init --comp 4.01.0 -y RUN opam install -y \ deriving.0.7 \ ocamlfind.1.5.5 \ parmap.1.0-rc6 \ batteries.2.3.1
RUN git clone https://github.com/s3team/uroboros.git WORKDIR "/uroboros/src" RUN eval $(opam config env) && ./build
This build failure was reported on your issue tracker in 2017, with a proposed fix.
The following successfully builds Uroboros on Linux,
FROM ubuntu:20.04
RUN export DEBIAN_FRONTEND=noninteractive
RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
RUN apt-get -y update && \
apt-get -y install build-essential binutils opam camlp4-extra git
RUN opam init --comp 4.01.0 -a --disable-sandboxing
RUN opam install -y deriving.0.7 ocamlfind.1.5.5 parmap batteries.2.3.1
RUN git clone https://github.com/s3team/uroboros.git /uroboros
WORKDIR "/uroboros/src"
RUN sed -i 's/\(command\|system\)(\("\|"\)python /\1("python2 /' *.py *.ml **/*.py **/*.ml
RUN sed -i "s/system('python /system('python2 /" *.py *.ml **/*.py **/*.ml
RUN eval $(opam config env) && ./build
however, the resulting install is throwing errors. Is the install somehow broken, or is Uroboros not expected to rewrite this file for some reason?
root@13ba65c42deb:/uroboros/src# echo -e "#include <stdio.h>\nint main(){puts(\"hello\"); return 0;}"|gcc -x c - -no-pie -fno-pie -o hello
root@13ba65c42deb:/uroboros/src# file hello
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=4d2852b475257ab95abff6f50b82fe0709dab6c1, for GNU/Linux 3.2.0, not stripped
root@13ba65c42deb:/uroboros/src# python2 uroboros.py hello
rm: cannot remove 'final_*.txt': No such file or directory
rm: cannot remove 'final_data.s': No such file or directory
rm: cannot remove 'useless_func.info': No such file or directory
rm: cannot remove 'main.info': No such file or directory
Traceback (most recent call last):
File "main_discover.py", line 78, in <module>
main_symbol =main_symbol.split('0x')[1]
IndexError: list index out of range
rm: cannot remove 'final.s': No such file or directory
rm: cannot remove 'inline_symbols.txt': No such file or directory
1: linearly disassemble
Fatal error: exception Parser.ParseError
exception, processing failed
root@13ba65c42deb:/uroboros/src#
Thanks for any information you can provide.
My unconfirmed suspicion is that objdump
has changed its output format since 2016 and that the corresponding parser in Uroboros needs to be updated.
I have cloned the code for uroboros and installed all the required packages like opam, ocaml, batteries etc But while running ./build file the operation is failing.