GithubHelp home page GithubHelp logo

Comments (16)

scemama avatar scemama commented on June 27, 2024

Hello Amanda,
thanks for providing all that information, it is useful.

We recently changed the way OCaml is installed to make it simpler, so if you just made a "git pull" on an old installation it might be the reason.

I would recommend you to reinstall QP from the very beginning:

git clone https://github.com/quantumPackage/qp2.git
cd qp2
./configure -i all 
./configure -c ./config/gfortran_avx.cfg
ninja

Please let me know if it solved your problem.

best,
Anthony

from qp2.

amandadumi avatar amandadumi commented on June 27, 2024

Hello,

Thank you for the quick feedback and recommendation. Unfortunately, this issue occurred from a completely new repository clone. To ensure I wasn't running into any environment issues with an old install, I also compiled within a singularity container using the attached build script (qp2_singularity.txt). The same error is observed here (singularity_build_out.txt). Is there anything else that might be going on?

Thank you,
Amanda

from qp2.

scemama avatar scemama commented on June 27, 2024

from qp2.

amandadumi avatar amandadumi commented on June 27, 2024

Ah yes, sorry about that. So this diverged a bit:

  • I attempted to compile the main branch using the configure script, and opam failed to install. I haven't had a chance to troubleshoot this yet, so I did not include this output. I can if you think it might help.

  • I was able build opam manually according to the instructions on the qp2 installation page. This approach failed as before during the build with ninja in the same way. This is the attached output.
    singularity_build_manualopam_out.txt
    qp2_singularity_manualopam.txt

from qp2.

Ydrnan avatar Ydrnan commented on June 27, 2024

Hello @amandadumi ,

I have done something (with singularity) which works for me on the master branch.

The definition file is the following:
qp2_light.txt

You can build the container as:
sudo singularity build qp2_light.cif qp2_light.txt

After that, you can enter in the container WITHOUT being root to install qp2 in your actual directory and the missing dependencies
(ocaml, f77zmq, zeromq, I try to install ocaml in the container but I have some issues):
singularity shell qp2_light.cif
git clone https://github.com/QuantumPackage/qp2.git
cd qp2
./configure -i f77zmq
./configure -i zeromq
./configure -i ocaml
source quantum_package.rc
./configure -c ./config/gfortran_avx.cfg
./bin/qpsh
ninja

Please tell me if it works

Yann

from qp2.

amandadumi avatar amandadumi commented on June 27, 2024

Thank you! I will give this a try this afternoon and report back shortly.

from qp2.

amandadumi avatar amandadumi commented on June 27, 2024

Taking from your singularity recipe, I was able to get around this ocaml issue. Entering into qpsh before ninja allowed for a compilation of the master branch without any issues, even outside of singularity.

Thank you for the help!

from qp2.

scemama avatar scemama commented on June 27, 2024

Very good! Thanks for your feedback!

from qp2.

abigcoder04 avatar abigcoder04 commented on June 27, 2024

@amandadumi my bro,I would like to ask if you have solved the OCAML error problem in the compilation process and how to solve it specifically. I also encountered this headache problem in the compilation process, so I really hope to get your answer!

from qp2.

v1j4y avatar v1j4y commented on June 27, 2024

Hello,

I had a similar problem while compiling qp2 (master branch) on ubuntu 22.04. The origin of the problem seems to be the gcc version. A too recent gcc version and the ocaml tar ball supplied by qp2 don't seem to be compatible. I was able to build qp2 (master branch) on ubuntu 20.04 with the default gcc version without any problem.

Perhaps, someone should check which gcc versions are problematic with OPAM (supplied by qp2) and report here !?

Hope this helps.

from qp2.

abigcoder04 avatar abigcoder04 commented on June 27, 2024

@v1j4y hello,my bro,you can make it on ubuntu 20.04?I make it on ubuntu 18.04 always had a similar problem:

ocamlbuild -j 0 -cflags "-g" -lflags "-g" -ocamlopt "opt -O3 -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100" qptypes_generator.byte -use-ocamlfind

  • ocamlfind opt -O3 -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100 unix.cmxa -I /usr/local/lib/ocaml/ocamlbuild /usr/local/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa -g -linkpkg myocamlbuild.ml /usr/local/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
    File "myocamlbuild.ml", line 1:
    Error: /usr/local/lib/ocaml/ocamlbuild/ocamlbuild_plugin.cmi
    is not a compiled interface for this version of OCaml.
    It seems to be for an older version of OCaml.

Do you install it on ubuntu 20.04 according to the following statement:
git clone https://github.com/quantumPackage/qp2.git
cd qp2
./configure -i all
./configure -c ./config/gfortran_avx.cfg
ninja

I really hope to get your answer!my bro!

from qp2.

v1j4y avatar v1j4y commented on June 27, 2024

Yes, I recommend using make instead of ninja for the last step.

This seems to be a versioning issue (gcc, ocaml etc...) what gcc version are you using ?
Did you try with intel compilers ?

from qp2.

abigcoder04 avatar abigcoder04 commented on June 27, 2024

@v1j4y
this is my problem:
rm -f -- qp_tunnel
ocamlbuild -j 0 -cflags "-g" -lflags "-g" -ocamlopt "opt -O3 -remove-unused-arguments -rounds 16 -inline 100 -inline-max-unroll 100" qp_tunnel.native -use-ocamlfind
Finished, 0 targets (0 cached) in 00:00:00.

  • ocamlfind ocamlc -c -g -thread -package cryptokit,zarith,zmq,str,sexplib,ppx_sexp_conv,ppx_deriving,getopt -o qp_tunnel.cmo qp_tunnel.ml
    File "qp_tunnel.ml", line 141, characters 10-68:
    Error: This expression has type [ Sub ] Zmq.Socket.t but an expression was expected of type [ Router ] Zmq.Socket.t
    These two variant types have no intersection
    Command exited with code 2.
    Compilation unsuccessful after building 29 targets (27 cached) in 00:00:00.
    make[1]: *** [Makefile:67: qp_tunnel.native] Error 10
    make[1]: Leaving direct`

gcc version:9.4.0

from qp2.

scemama avatar scemama commented on June 27, 2024

@zyzyzy0408 Can you please tell us

  • which commit you are trying to compile (git log)
  • what is your version of the OCaml compiler (ocaml --version), and how you installed it?

from qp2.

abigcoder04 avatar abigcoder04 commented on June 27, 2024

@scemama thank my bro, I have successfully installed it on x86, but now I'm having a problem with ARM, I think It could be a compiler version problem

from qp2.

scemama avatar scemama commented on June 27, 2024

ARM is not supported yet. We are working on it.

from qp2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.