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

The problem of CKern.cpp file #8

Open
Cinderella0709 opened this issue Mar 15, 2020 · 4 comments
Open

The problem of CKern.cpp file #8

Cinderella0709 opened this issue Mar 15, 2020 · 4 comments

Comments

@Cinderella0709
Copy link

Dear authors,

When I installed this software, just "make gp", I got an error, which is shown as follow:

/usr/include/c++/7/bits/basic_string.h:6284:5: note: template argument deduction/substitution failed:
CKern.cpp:4185:27: note: 'std::ostream {aka std::basic_ostream}' is not derived from 'const std:: __cxx11::basic_string<_CharT, _Traits, _Alloc>'
   out « kern.display(out);
                                     ^
make: *** [makefile:117: CKern.o] Error 1

I realized that I didn't install dependencies, so I installed BLAS, LAPACK and g77 compiler (gfortran I have installed).
Then I redownloaded this repo, and get the same error. I don't know what's wrong.

Looking forward to your reply!

Regards,
Ella

@lawrennd
Copy link
Member

Hi Ella,

Thanks for reaching out. It's been a while since I compiled this, so it might take me a bit to look at it. Would you be able to help by describing what system your compiling on and which C++ compiler.

Neil

@Cinderella0709
Copy link
Author

Dear authors,

Thanks for your instant reply, the specific information of my platform as follow:

Ubuntu 18.04 LTS x86_64
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

Regards,
Ella

@kuevpr
Copy link

kuevpr commented Feb 9, 2021

Hello. I had the same issue as Cinderella0709.

I got the program to compile by changing the source code.
In file CKERN.cpp line 4185-4816, I replaced the two lines originally given as
out << kern.display(out);
return out;

To this one-line statement
return kern.display(out);

I think this should be fine since kern.display() is handling all the printing and returns the ostream passed into it. The original code on line 4185 effectively had
out << out;
once kern.display() had finished and returned the ostream.

Since I'm just now starting to use this code, I can't say if this "fix" actually retains the intended functionality of the operator<< override, but at least it compiles now.

@lawrennd
Copy link
Member

lawrennd commented Feb 9, 2021

Great that you're using it and thanks for the fix!

If you don't encounter problems would you mind submitting a pull request?

(Sorry Ella for letting this drop before!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants