Bug 1113429
| Summary: | linking of openmp program fails | ||
|---|---|---|---|
| Product: | Red Hat Developer Toolset | Reporter: | Miroslav Franc <mfranc> |
| Component: | gcc | Assignee: | Marek Polacek <mpolacek> |
| Status: | CLOSED ERRATA | QA Contact: | Miroslav Franc <mfranc> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | DTS 3.0 RHEL 7 | CC: | law, mcermak, mfranc, mnewsome, mpolacek, ohudlick |
| Target Milestone: | rc | ||
| Target Release: | 3.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-10-30 09:38:55 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: | |||
See #1099547. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2014-1752.html |
Description of problem: Linking of openmp program fails on RHEL7 with dts3. Version-Release number of selected component (if applicable): devtoolset-3-gcc-4.9.0-6.2.el7.x86_64 libgomp-4.8.2-16.el7.x86_64 Steps to Reproduce: --- omphello.c --- #include <omp.h> #include <stdio.h> #include <stdlib.h> int main (void) { int th_id; int nthreads; #pragma omp parallel private(th_id) { th_id = omp_get_thread_num (); printf ("Hello World from thread %d\n", th_id); #pragma omp barrier if (th_id == 0) { nthreads = omp_get_num_threads (); printf ("There are %d threads\n", nthreads); } } return EXIT_SUCCESS; } --- omphello.c --- 1. gcc omphello.c -O2 -std=gnu99 -fopenmp -o omp Actual results: /tmp/ccUkKVz5.o: In function `main': omphello.c:(.text.startup+0x18): undefined reference to `GOMP_parallel' collect2: error: ld returned 1 exit status Expected results: success