| Summary: | findboost.cmake can't find boost::mpi library | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | tawakiy | ||||
| Component: | cmake | Assignee: | Orion Poplawski <orion> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 16 | CC: | jreznik, junghans, me, orion, pertusus, rdieter | ||||
| Target Milestone: | --- | Keywords: | Reopened | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | cmake-2.8.12.2-2.fc19 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-02-14 08:12:05 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
I really don't see how this can be done automatically. How is it supposed to know you want the openmpi or mpich2 (or other) version? And FindBoost.cmake cooperate with FindMPI.cmake and on that information finds boost::mpi? Just run FIND_PACKAGE(MPI..) if the component is mpi in the foreach(COMPONENT..) section of FindBoost? FIND_PACKAGE(MPI) isn't really going to help either. I think you are asking too much of FindBOOST. If you still think this should be addressed, please take it up on the cmake list of file a bug in the cmake mantis issue tracker. I was hit by this issue (see line 51 of <https://build.opensuse.org/package/view_file/Education/espressopp/espressopp.spec?expand=1>) and googling (<https://www.google.com/search?q=fedora+%22boost_mpi%22+cmake>) revealed that several other projects are affected, too. If fedora puts libboost_mpi in a non-standard location (/usr/lib{,64}/{openmpi,mpich}/lib), then FindBoost.cmake of the cmake package should be patched accordingly to allow automatic detection by cmake. Setting BOOST_ROOT doesn't help as the other Boost libraries can then not be detected by cmake anymore. At this point setting Boost_MPI_LIBRARY_RELEASE to something like $MPI_LIB/libboost_mpi-mt.so is the only solution (see <https://github.com/TRIQS/TRIQS/issues/23>) So, how is FindBoost supposed to know *which* mpi flavor you are using? And Fedora is not going to be carrying a patch to FindBoost to handle it - it's going to need to be addressed upstream. (In reply to Orion Poplawski from comment #5) > So, how is FindBoost supposed to know *which* mpi flavor you are using? You have to do "modules load openmpi" or something anyhow to make FindPackage(MPI) works. So FindBoost could use these variables, too. > And > Fedora is not going to be carrying a patch to FindBoost to handle it - it's > going to need to be addressed upstream. As this is a fedora specific issue, I don't think this is of upstream's matter. Workaround added by upstream! Christoph - Thanks for taking the initiative to file this upstream. See, that wasn't so hard :). They are good folks. cmake-2.8.12.2-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/cmake-2.8.12.2-2.fc20 cmake-2.8.12.2-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/cmake-2.8.12.2-2.fc19 Package cmake-2.8.12.2-2.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing cmake-2.8.12.2-2.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-2331/cmake-2.8.12.2-2.fc20 then log in and leave karma (feedback). cmake-2.8.12.2-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. cmake-2.8.12.2-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 535149 [details] sample code for cmake boost::mpi compile test Description of problem: FIND_PACKAGE(Boost 1.45.0 COMPONENT mpi REQUIRED) in CMakeLists.txt can't find boost_mpi library. Version-Release number of selected component (if applicable): boost 1.47.0 mpich2 1.4.1p1-1 AND openmpi 1.5-4 cmake 2.8.5 Both for i686 and x86_64. How reproducible: Everytime `cmake .` for CMakeLists.txt with boost::mpi dependencies.` Steps to Reproduce: 1. Install cmake, boost and one of the MPI software (can be mpich2, openmpi or other). 2. Install boost-mpich2 or boost-openmpi with dependencies. 3. Try to compile attached code with next CMakeLists.txt: ADD_EXECUTABLE(mpi-test test.cpp) FIND_PACKAGE(Boost 1.47.0 COMPONENTS mpi serialization REQUIRED) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) TARGET_LINK_LIBRARIES(mpi-test ${Boost_LIBRARIES}) 4. cmake . Actual results: Error due to: The following Boost libraries could not be found: boost_mpi Expected results: cmake finds boost_mpi and creates error-free Makefile. Additional info: set(BOOST_ROOT "/usr/lib/mpich2/") or, other, for different architecture and MPI software can be a solution. But, it isn't portable, and, looks like, it this (/usr/lib/mpich2/lib or /usr/lib/openmpi/lib) path is standard and correct - FindBoost.cmake from cmake package should find it by itself. Without any user-defined paths.