-
Notifications
You must be signed in to change notification settings - Fork 708
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
Incomplete link interface with -Wl,--as-needed with mpich if no symbol of deal.II is used #1889
Comments
Yes, I just noticed this as well. I cannot even finish running cmake without commenting out SET_IF_EMPTY(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
IF(CMAKE_C_COMPILER_WORKS)
SET_IF_EMPTY(MPI_C_COMPILER ${CMAKE_C_COMPILER}) # for good measure
ELSE()
MESSAGE(STATUS
"No suitable C compiler was found! MPI C interface can not be "
"autodetected"
)
ENDIF()
IF(CMAKE_Fortran_COMPILER_WORKS)
SET_IF_EMPTY(MPI_Fortran_COMPILER ${CMAKE_Fortran_COMPILER}) # for good measure
ELSE()
MESSAGE(STATUS
"No suitable Fortran compiler was found! MPI Fortran interface can "
"not be autodetected"
)
ENDIF() with a very new version of CMake ( @tjhei What version of CMake did you use? |
Well, that is a different issue, because configuring and compiling deal.II and examples works just fine here. Just compiling a test that doesn't directly use deal.II (weird, I know) fails.
3.3.0 |
I don't think so. We populate
The problem is the simple fact that within the build system the targets are linked with [1] http://lists.mcs.anl.gov/pipermail/mpich-discuss/2010-November/008389.html |
okay, any suggestion how I can fix this at least on my machine? Can I stuff --no-is-needed into MPI_CXX_LINKER_FLAGS during deal.II configure? |
You can just configure with
Is this for one of the quicktests? If, yes. Does it help to force |
doesn't work and neither does adding -Wl--no-as-needed to DEAL_II_LINKER_FLAGS.
No, I was using the deal.II CMakeList.txt project for a a simple c++ test application so I didn't have to bother with c++11/MPI/boost setup. And as_needed will rip out libmpl if I don't use anything from deal.II itself. :-) But this also failed if I create a normal test that does not reference anything from deal.II. |
@tjhei Can you post the relevant bits of detailed.log and tell me on which architecture with what compiler and version of mpich you encounter this? I'll try to reproduce. |
Correction, if I set
|
Maybe you hit a "three state". If you set
But this only means that we do not force |
@tjhei Is this still a problem? |
:-) |
Yes, I can still reproduce this problem. |
I realized I can set |
@tjhei No, I don't see a nice workaround. Simply not setting |
That would be something I need to do when configuring deal.II. Yes, that worked back then. |
I don't think that this is still an issue - if it is we should reopen. |
I think there is something messed up with the cmake configuration that causes not all MPI libraries to be listed when we set up a test or auto pilot project. Everything works as expected if I use symbols from deal.II. But if my example.cc files is something like:
I am getting linker errors:
because libmpl is not pulled in. When I look at FindMPI.cmake I can see that it should export MPI_LIBRARIES but it doesn't:
Any thoughts on what is going on here? @tamiko ?
The text was updated successfully, but these errors were encountered: