View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0012992 | CMake | CMake | public | 2012-02-21 14:56 | 2012-07-09 06:53 | ||||
Reporter | Christopher Sean Morrison | ||||||||
Assigned To | Rolf Eike Beer | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake 2.8.6 | ||||||||
Target Version | CMake 2.8.8 | Fixed in Version | CMake 2.8.8 | ||||||
Summary | 0012992: CHECK_C_COMPILER_FLAG broken for icc | ||||||||
Description | It looks like the CHECK_C_COMPILER_FLAG is outright broken for the Intel compiler (icc). Similar to llvm's C compiler, icc *recognizes* many command-line flags supported by gcc, but it does nothing with them. The compiler outputs a warning during compilation (haven't found a way to turn it into an error) and the compilation proceeds. See the Additional Information for an example using the famliar "-pedantic" gcc flag. While for most flags, the failed test merely results in flags getting add added that do nothing, from a build system perspective it results in tests passing that should not have. This results in incorrect build system behavior and *excessively* noisy build output for all the various unsupported flags being warned about repeatedly. One of our compilation modes, for example, puts the compiler into strict standards conformance mode so we can perform source code regression and portability testing. Being able to select the right compilation flags is necessary for that mode to work correctly. With other flags (e.g., -kPIC, -fPIC, etc), you get outright wrong behavior that makes the linker cry when linking against libraries compiled wrong. | ||||||||
Additional Information | STATUS: Performing Test PEDANTIC_COMPILER_FLAG_FOUND STATUS: Performing Test PEDANTIC_COMPILER_FLAG_FOUND - Success Performing C SOURCE FILE Test PEDANTIC_COMPILER_FLAG_FOUND succeded with the following output: Change Dir: /home/morrison/brlcad/.cmake/CMakeFiles/CMakeTmp Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast" /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make CMakeFiles/cmTryCompileExec.dir/build gmake[1]: Entering directory `/home/morrison/brlcad/.cmake/CMakeFiles/CMakeTmp' /home/morrison/Applications/bin/cmake -E cmake_progress_report /home/morrison/brlcad/.cmake/CMakeFiles/CMakeTmp/CMakeFiles 1 Building C object CMakeFiles/cmTryCompileExec.dir/src.c.o /opt/intel/bin/icc -DPEDANTIC_COMPILER_FLAG_FOUND -I/usr/local/include -pedantic -o CMakeFiles/cmTryCompileExec.dir/src.c.o -c /home/morrison/brlcad/.cmake/CMakeFiles/CMakeTmp/src.c icc: command line remark #10148: option '-pedantic' not supported Linking C executable cmTryCompileExec /home/morrison/Applications/bin/cmake -E cmake_link_script CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1 /opt/intel/bin/icc -DPEDANTIC_COMPILER_FLAG_FOUND CMakeFiles/cmTryCompileExec.dir/src.c.o -o cmTryCompileExec -rdynamic gmake[1]: Leaving directory `/home/morrison/brlcad/.cmake/CMakeFiles/CMakeTmp' Source file was: int main(void) { return 0; } | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | icc_patch.diff [^] (2,575 bytes) 2012-02-21 16:45 [Show Content] | ||||||||
Relationships | |
Relationships |
Notes | |
(0028692) Rolf Eike Beer (developer) 2012-02-21 16:01 |
This can easily be fixed by adding a proper regular expression to Modules/CheckCCompilerFlag.cmake and Modules/CheckCXXCompilerFlag.cmake. Sadly mantis seems to have destroyed the output you send. Can you please call icc with a bad flag from command line and attach the output (not paste) so we can figure out the correct expression? Or send a patch? |
(0028693) Christopher Sean Morrison (reporter) 2012-02-21 16:45 |
The output is munged in the commit e-mail but actually displays correctly through the website. Regardless, a patch is attached. There was one other file that needed the regex too. |
(0028694) Rolf Eike Beer (developer) 2012-02-21 17:07 |
Yes, you are correct. I would add the "(hash)10148:" also to the expression. Let's be strict first, we can later relax this if we find it's not enough. |
(0028695) Rolf Eike Beer (developer) 2012-02-21 17:13 |
Does this work (Replace (hash) by hash-sign)? FAIL_REGEX "(hash)10148: option '.*' not supported" |
(0028696) Christopher Sean Morrison (reporter) 2012-02-21 18:16 |
10148 was but one failure example. A quick search through my logs showed 10149 getting reported for others. Once two were identified, I stopped looking. It was reason enough to keep it general like the other tests. |
(0028698) Rolf Eike Beer (developer) 2012-02-22 02:32 |
Ok, thanks for checking. Will push your patch tonight. |
(0028699) Rolf Eike Beer (developer) 2012-02-22 03:10 |
If you want the patch to show you as author please add a patch with a From: line, I can't see your email address in Mantis. Otherwise I'll add the patch and note you in the commit log. |
(0028702) Christopher Sean Morrison (reporter) 2012-02-22 20:07 |
It's a one-liner, no worries. |
(0028704) Rolf Eike Beer (developer) 2012-02-23 17:19 |
Fix pushed to next: http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6ecb900fb1bed7fc74e3c7d7091c6e796c099d3 [^] I omitted the stuff in GenerateExportHeader. I doubt this whole stuff should be in there at all. If it should then there are other things that need to be merged into that anyway. |
(0029984) David Cole (manager) 2012-07-09 06:53 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-02-21 14:56 | Christopher Sean Morrison | New Issue | |
2012-02-21 16:01 | Rolf Eike Beer | Note Added: 0028692 | |
2012-02-21 16:45 | Christopher Sean Morrison | Note Added: 0028693 | |
2012-02-21 16:45 | Christopher Sean Morrison | File Added: icc_patch.diff | |
2012-02-21 17:07 | Rolf Eike Beer | Note Added: 0028694 | |
2012-02-21 17:13 | Rolf Eike Beer | Note Added: 0028695 | |
2012-02-21 18:16 | Christopher Sean Morrison | Note Added: 0028696 | |
2012-02-22 02:32 | Rolf Eike Beer | Note Added: 0028698 | |
2012-02-22 03:10 | Rolf Eike Beer | Note Added: 0028699 | |
2012-02-22 03:10 | Rolf Eike Beer | Assigned To | => Rolf Eike Beer |
2012-02-22 03:10 | Rolf Eike Beer | Status | new => assigned |
2012-02-22 20:07 | Christopher Sean Morrison | Note Added: 0028702 | |
2012-02-23 17:19 | Rolf Eike Beer | Note Added: 0028704 | |
2012-02-23 17:19 | Rolf Eike Beer | Fixed in Version | => CMake 2.8.8 |
2012-02-23 17:19 | Rolf Eike Beer | Target Version | => CMake 2.8.8 |
2012-02-23 17:20 | Rolf Eike Beer | Status | assigned => resolved |
2012-02-23 17:20 | Rolf Eike Beer | Resolution | open => fixed |
2012-07-09 06:53 | David Cole | Note Added: 0029984 | |
2012-07-09 06:53 | David Cole | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |