View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0014507 | CMake | CMake | public | 2013-10-23 15:05 | 2016-05-16 09:25 | ||||
Reporter | Izaak Beekman | ||||||||
Assigned To | Brad King | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Linux RHEL 5 X86_64 | OS | RHEL 5 | OS Version | RHEL 5 | ||||
Product Version | CMake 2.8.12 | ||||||||
Target Version | CMake 3.0 | Fixed in Version | CMake 3.0 | ||||||
Summary | 0014507: -i_dynamic flag (depricated) incorrectly added when using intel compilers | ||||||||
Description | See: http://www.cmake.org/pipermail/cmake/2009-March/028121.html [^] The -i_dynamic flag is deprecated and not even listed in the intel man page for composer_xe 2013 | ||||||||
Steps To Reproduce | Create a fortran project using the intel compilers as your compilers, then try to build a statically linked executable with the -static-intel flags. | ||||||||
Additional Information | Highly annoying. Should affect all platforms. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0034228) Brad King (manager) 2013-10-23 15:24 edited on: 2013-10-23 15:25 |
Is this patch sufficient? diff --git a/Modules/Platform/Linux-Intel-Fortran.cmake b/Modules/Platform/Linux-Intel-Fortran.cmake index bb671ee..0c9523c 100644 --- a/Modules/Platform/Linux-Intel-Fortran.cmake +++ b/Modules/Platform/Linux-Intel-Fortran.cmake @@ -1,4 +1,4 @@ include(Platform/Linux-Intel) __linux_compiler_intel(Fortran) -set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS} -i_dynamic -nofor_main") -set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic") +set(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS} -nofor_main") +set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "") |
(0034229) Brad King (manager) 2013-10-23 15:27 |
FYI, only platform/compiler combinations for which someone contributes nightly testing submissions to our dashboard: http://open.cdash.org/index.php?project=CMake [^] can be supported easily by upstream developers. Currently there is no submission for the Intel compilers on Linux. If you can run one please see instructions here: http://www.cmake.org/Wiki/CMake/Git/Dashboard [^] |
(0034230) Izaak Beekman (reporter) 2013-10-23 18:52 |
I'm going to look into setting up a Linux Intel compiler dashboard submission. As far as your first comment is concerned: Where are the fortran compile and link rules built up? Why is CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS added when linking a Fortran executable? (I also seem to get some other spurious, although harmless -L flags). I am trying to build a redistributable Linux binary, so static linking is crucial, but -i_dynamic prevents this. |
(0034233) Brad King (manager) 2013-10-24 09:27 |
Re 0014507:0034230: It would be great to have nightly testing for this compiler, thanks. The CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS are used when creating a target that might link *to* a shared library. This is needed on some platforms to link executables to the shared runtime library, for example. CMake always passes this flag when linking an executable because it does not know if a -lfoo might find a shared library. This is historical. Currently there is no first-class support for linking an executable statically. However, I know many people have gotten it working for local builds creating redistributable packages. |
(0034234) Brad King (manager) 2013-10-24 09:37 |
Meanwhile I've applied the patch from 0014507:0034228: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f61bcbce [^] |
(0034244) Izaak Beekman (reporter) 2013-10-25 13:18 |
From digging around, it seems like -i_dynamic is equivalent to -shared-intel. I'm going to double check this on the Intel Forums. AFAIK, there is no need to request dynamic linking against the Intel runtime fortran library, even when compiling an executable binary that links against other dynamic libraries. It might make sense to do so for a MinSizeRel build, but I don't think this should be the default. I'm going to double check all of this with the folks at Intel and report back. |
(0034246) Brad King (manager) 2013-10-25 14:58 |
Re 0014507:0034244: Thanks. If it isn't needed for a basic build to work then we probably shouldn't add it by default at all. We have plenty of interfaces for users and project code to add flags when they want them. |
(0034289) Izaak Beekman (reporter) 2013-10-29 15:48 |
Removing -i_dynamic is definitely the correct thing to do. Deprecated AND completely unnecessary. Also noteworthy is that the compiler gives precedent to the rightmost options. I'm somewhat surprised that the options setup by CMake are added to the right of the user's options. This might be worth changing. |
(0035302) Robert Maynard (manager) 2014-03-05 09:58 |
Closing resolved issues that have not been updated in more than 4 months |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2013-10-23 15:05 | Izaak Beekman | New Issue | |
2013-10-23 15:24 | Brad King | Note Added: 0034228 | |
2013-10-23 15:25 | Brad King | Note Edited: 0034228 | |
2013-10-23 15:27 | Brad King | Note Added: 0034229 | |
2013-10-23 18:52 | Izaak Beekman | Note Added: 0034230 | |
2013-10-24 09:27 | Brad King | Note Added: 0034233 | |
2013-10-24 09:37 | Brad King | Note Added: 0034234 | |
2013-10-24 09:37 | Brad King | Assigned To | => Brad King |
2013-10-24 09:37 | Brad King | Status | new => assigned |
2013-10-24 09:37 | Brad King | Target Version | => CMake 3.0 |
2013-10-25 13:18 | Izaak Beekman | Note Added: 0034244 | |
2013-10-25 14:58 | Brad King | Note Added: 0034246 | |
2013-10-29 15:48 | Izaak Beekman | Note Added: 0034289 | |
2013-10-29 15:50 | Brad King | Status | assigned => resolved |
2013-10-29 15:50 | Brad King | Resolution | open => fixed |
2013-10-29 15:50 | Brad King | Fixed in Version | => CMake 3.0 |
2014-03-05 09:58 | Robert Maynard | Note Added: 0035302 | |
2014-03-05 09:58 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |