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

Missed include files #1594

Closed
jorgedclopes opened this issue Feb 16, 2018 · 8 comments
Closed

Missed include files #1594

jorgedclopes opened this issue Feb 16, 2018 · 8 comments

Comments

@jorgedclopes
Copy link

jorgedclopes commented Feb 16, 2018

There are some warnings that make the make installcheck fail.

unique_ptr is not generically defined in C++, it is necessary to include some lib that has its definition, such as <memory>. This is an issue in libmesh/include/error_estimation/exact_solution.h.

Another issue is that tensor_value and vector_value are defined but libmesh/include/numerics/function_base.h (I believe this is the right file) doesn't know how it is defined. Again, two simple #includes would solve the problem.

Correcting these, the failed checks disappear. I am using gcc in linux. If you need more details or some log file tell me where it is and I'll append here.

Good work

@jwpeterson
Copy link
Member

I am using gcc in linux.

What version of GCC and what flavor of Linux? We have been building and testing libmesh for many years on libmesh/GCC and have never encountered such a basic missing include issue.

If you could give us a patch containing your changes or (even better) push a branch to your fork with the proposed changes, it would be much easier for us to take a look. Please also include your config.log file, since you may be using a non-standard config that we don't correctly test.

@jorgedclopes
Copy link
Author

I am using Linux Mint 18.3
GCC's version is 5.4.0

That was stupid of me to not check the config.log, but I also can't interpret it throughly so...
config.log

I forked and made the changes I needed for my setup. It is possible that I was also downloading a previous version of libmesh...
I also was wrong in one of the paths I mentioned, I updated the previous post.

If you need any more information, ask away.

@roystgnr
Copy link
Member

It is possible that I was also downloading a previous version of libmesh...

We definitely have this bug in libmesh/master: exact_solution.h uses unique_ptr, doesn't include the memory header, and doesn't include any libMesh headers which include memory.

Perhaps on all our test systems we're including other C++ headers which include memory, so our code is building even though technically it's not guaranteed to.

Either that or we're including our broken header in source files only after we conditionally include a different header that brings in memory, and you're configuring with some option that disables that conditional?

John, have you run test_installed_headers.sh recently? I know I haven't, and we've made a lot of changes since the last time I have, and I don't even recall us adding that script to any of the CI tests...

@Hellium0, this is a very timely bug report; we just started getting our next release ready and it would definitely be good to have this resolved first. Thank you!

@jwpeterson
Copy link
Member

exact_solution.h uses unique_ptr, doesn't include the memory header, and doesn't include any libMesh headers which include memory.

Yep, it does look like the patch which introduced std::unique_ptr (92bfda4) in that file also failed to include <memory> somehow, so that should definitely be fixed.

John, have you run test_installed_headers.sh recently?

I don't regularly run that script, but CIVET definitely should. I'll see about adding it to libmesh PR testing...

jwpeterson added a commit to jwpeterson/libmesh that referenced this issue Feb 19, 2018
We use std::unique_ptr in this header, but it was only being included
by accident on the main compilers we test with. Compiling with GCC
5.4.0 on Linux Mint 18 uncovered this issue.

Refs libMesh#1594.
jwpeterson added a commit to jwpeterson/libmesh that referenced this issue Feb 19, 2018
We use std::unique_ptr in this header, but it was only being included
by accident on the main compilers we test with. Compiling with GCC
5.4.0 on Linux Mint 18 uncovered this issue.

Refs libMesh#1594.
Refs libMesh#1593.
@jwpeterson
Copy link
Member

exact_solution.h somehow passes our test_headers.sh in its current form on my system, but I've patched it over in #1597 anyway. The script also found two other #include issues which I also fixed.

@jwpeterson
Copy link
Member

@Hellium0 there are no non-upstream branches in your libmesh fork, so if you need something fixed beyond what is in #1597, please push a branch with the additional changes or let us know specifically what they are. If you can pull the branch in #1597 and try it out on your system, that would also be helpful.

jwpeterson added a commit that referenced this issue Feb 19, 2018
We use std::unique_ptr in this header, but it was only being included
by accident on the main compilers we test with. Compiling with GCC
5.4.0 on Linux Mint 18 uncovered this issue.

Refs #1594.
Refs #1593.
@jwpeterson
Copy link
Member

This should be fixed now that #1597 is merged but feel free to reopen if we missed something.

@jorgedclopes
Copy link
Author

I believe it's all good now.
Now I need to get used to the software and solve the problem I want.

Good work

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