Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem met when compiling: no viable constructor or deduction guide for deduction of template arguments of 'subrange' #17

Open
ZhouGD2000 opened this issue Nov 29, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ZhouGD2000
Copy link

ZhouGD2000 commented Nov 29, 2023

I downloaded the latest code ( version : 2023.11 Git hash: c972dd2) and compiled it following the instruction in README.md in MacOS Ventura 13.5.1, with clang 14.0.0 (which supports c++17):

mkdir build
147    cd build
148    cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/nrgljubljana/ 
149    make
150    make install

I run cmake successfully after I install the required package but when I run 'make' several error occurred. I quote part of the output here and the whole output is in the attached file. make.log

[  1%] Building CXX object c++/CMakeFiles/nrgljubljana_c.dir/nrg-lib.cc.o
clang: warning: argument unused during compilation: '-Xclang -fopenmp' [-Wunused-command-line-argument]
In file included from /Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/nrg-lib.cc:1:
In file included from /Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/nrg-general.hpp:91:
In file included from /Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/core.hpp:13:
/Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/eigen.hpp:250:64: error: no viable constructor or deduction guide for deduction of template arguments of 'subrange'
  [[nodiscard]] auto value_corr_kept() const noexcept { return ranges::subrange(values.all_corr().begin(), values.all_corr().begin() + getnrkept()); }

I do not know where are the problems. Could you give me some instruction?
Thanks a lot.

@ZhouGD2000 ZhouGD2000 added the bug Something isn't working label Nov 29, 2023
@rokzitko
Copy link
Owner

rokzitko commented Nov 29, 2023 via email

@ZhouGD2000
Copy link
Author

Thanks a lot. After changing to compilers supporting C++20, I sucessfully compiled nrgljubljana. I still have some problems when running it, but I guess this is because I haven't recompiled all the libraries with the new compiler. I will resolve the problems myself.

You will probably need a more recent compiler. The README should be updated, since the more recent versions of the code actually require C++17 if not C++20 (I usually compile in C++20 mode).

On 29 Nov 2023, at 12:49, Nightwatcher @.***> wrote: I downloaded the latest code ( version : 2023.11 Git hash: c972dd2 <c972dd2>) and compiled it following the instruct in README.md in MacOS Ventura 13.5.1, with clang 14.0.0 (which supports c++14): mkdir build 147 cd build 148 cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/nrgljubljana/ 149 make 150 make install I run cmake successfully after I install the required package but when I run 'make' several error occurred. I quote part of the output here and the whole output is in the attached file. make.log https://github.com/rokzitko/nrgljubljana/files/13499929/make.log [ 1%] Building CXX object c++/CMakeFiles/nrgljubljana_c.dir/nrg-lib.cc.o clang: warning: argument unused during compilation: '-Xclang -fopenmp' [-Wunused-command-line-argument] In file included from /Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/nrg-lib.cc:1: In file included from /Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/nrg-general.hpp:91: In file included from /Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/core.hpp:13: /Users/zgd/Nutstore Files/zgd/phy/research/Numerical/nrgljubljana/c++/eigen.hpp:250:64: error: no viable constructor or deduction guide for deduction of template arguments of 'subrange' [[nodiscard]] auto value_corr_kept() const noexcept { return ranges::subrange(values.all_corr().begin(), values.all_corr().begin() + getnrkept()); } I do not know where are the problems. Could you give me some instruction? Thanks a lot. — Reply to this email directly, view it on GitHub <#17>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG57NBGLF2J645OORJONLATYG4OK7AVCNFSM6AAAAAA77KNFMWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAYTMNBRGI3TSNQ. You are receiving this because you are subscribed to this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants