#3621 closed defect (fixed)
Check for OpenMP in configure script is broken
Reported by: | tian | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Build Environment | Version: | |
Keywords: | autoconf, build, OpenMP, Linux | Cc: |
Description
The macro AC_TRY_LINK for openMP in configure.in:379 is not working as intended. GCC fails silently while Clang blocks.
The reason is that the second argument to AC_TRY_LINK must not contain the whole main() function
[int main(){do();something();}] but rather its body [do();something();].
Change History (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Status: | new → accepted |
---|
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed the reported issue in [71c220705ad90b3b3da205ce9b2dc44f1aaaf942/OMCompiler 71c2207].
comment:4 by , 9 years ago
Too bad it doesn't seem to have a flag to disable it :)
That's -pedantic-errors. o_O
comment:5 by , 9 years ago
Milestone: | Future → 1.9.4 |
---|
Sorting these closed tickets away from "Future". Since they were closed after the last 1.9.3 release, it's very likely that they should have been part of the 1.9.4 release.
GCC actually allows code like this (except if -Wall -Werror is given; and you won't be able to compile OMC if you use -Werror):
https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html ... Too bad it doesn't seem to have a flag to disable it :)
And clang is only an OpenMP compiler if you have clang-3.7 and libomp-dev installed. It also requires linking against libomp, which the configure script does not handle.