Bug 1026467

Summary: AC_OPENMP broken for Fortran and Fortran 77
Product: Red Hat Enterprise Linux 6 Reporter: Craig Prescott <prescott>
Component: autoconfAssignee: Pavel Raiskup <praiskup>
Status: CLOSED WONTFIX QA Contact: qe-baseos-tools-bugs
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-25 13:04:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
AC_OPENMP patch none

Description Craig Prescott 2013-11-04 17:48:09 UTC
Description of problem: The AC_OPENMP macro throws an error and exits if the language is set to Fortran or Fortran 77.


Version-Release number of selected component (if applicable): 2.63-5.1.el6


How reproducible: 100%


Steps to Reproduce:
1. Create a simple configure.ac with the following contents:

[prescott@gator1 bar]$ cat configure.ac
AC_INIT
AC_LANG(Fortran)
AC_OPENMP

2. Run autoconf.

Actual results:

[prescott@gator1 bar]$ autoconf
configure.ac:3: error: AC_LANG_FUNC_LINK_TRY: unknown language: Fortran
../../lib/autoconf/lang.m4:228: AC_LANG_FUNC_LINK_TRY is expanded from...
../../lib/autoconf/c.m4:1879: _AC_LANG_OPENMP is expanded from...
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2518: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:505: AS_IF is expanded from...
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
../../lib/autoconf/c.m4:1917: AC_OPENMP is expanded from...
configure.ac:3: the top level
autom4te: /usr/bin/m4 failed with exit status: 1

Expected results:

Exit status of 0 with correctly generated configure script.

Additional info:

For AC_LANG(Fortran 77), the result is:

configure.ac:3: error: AC_LANG_FUNC_LINK_TRY: unknown language: Fortran 77
../../lib/autoconf/lang.m4:228: AC_LANG_FUNC_LINK_TRY is expanded from...
../../lib/autoconf/c.m4:1879: _AC_LANG_OPENMP is expanded from...
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2518: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:505: AS_IF is expanded from...
../../lib/autoconf/general.m4:1974: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:1994: AC_CACHE_CHECK is expanded from...
../../lib/autoconf/c.m4:1917: AC_OPENMP is expanded from...
configure.ac:3: the top level
autom4te: /usr/bin/m4 failed with exit status: 1

Comment 1 Craig Prescott 2013-11-04 17:50:54 UTC
It looks like patches were landed to later autoconf releases which address this issue:

http://lists.gnu.org/archive/html/autoconf-patches/2009-10/msg00025.html

Comment 3 Craig Prescott 2013-11-04 18:12:31 UTC
Created attachment 819285 [details]
AC_OPENMP patch

I made a patch based upon the thread in comment #1 (added Fortran to it, but skipped the test patches), added it to my spec file and rebuilt the autoconf rpm.  It resolved the issues I observed.

Comment 4 Pavel Raiskup 2014-01-14 07:52:41 UTC
Sorry for late posting and thanks for pointing the upstream resolution.

Craig, bugzilla for RHEL product is just an bug tracking tool and engineering
is not able to guarantee the timeliness (priority of this particular issue).
I'll keep this bug open though to make a chance to raise proper
prioritization.

If this issue is critical or in any way time sensitive, please raise a ticket
through your regular Red Hat support channels to make certain  it receives the
proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please
visit: https://www.redhat.com/support/process/production/#howto

Comment 5 Pavel Raiskup 2016-07-25 13:04:49 UTC
Closing per comment #4.  Please consider migration to RHEL 7 where this
use-case should be fine.  Let me know if there is somee workaround needed.