[MacPorts] #50958: py-graph-tool fails to build with clang OpenMP option (configure.args=--enable-openmp)
MacPorts
noreply at macports.org
Tue Mar 29 02:57:23 PDT 2016
#50958: py-graph-tool fails to build with clang OpenMP option (configure.args
=--enable-openmp)
----------------------------+--------------------------------------------
Reporter: s.t.smith@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Resolution: | Keywords: graph-tool clang openmp libomp
Port: py-graph-tool |
----------------------------+--------------------------------------------
Comment (by s.t.smith@…):
The feedback from the upstream ticket mentions that omp's parallel if
clause has a "`parallel`"-named qualifier, which causes the compilation
problem. https://trac.macports.org/ticket/50983#comment:8
I confirm that replacing the variable name "`parallel`" with
"`parallel_enabled`" yields a successful compile. Patch files attached.
Replying to [comment:7 larryv@…]:
> [http://llvm.org/releases/3.8.0/tools/clang/docs/ReleaseNotes.html
#openmp-support-in-clang Clang supports] directive name modifiers in
OpenMP 4.5 `if` clauses. From §2.12 of the [http://www.openmp.org/mp-
documents/openmp-4.5.pdf OpenMP 4.5 spec]:
> {{{
> #!html
> <blockquote>
> <p>The syntax of the <code>if</code> clause is as follows:</p>
> <div style="border: thin solid; padding: 0.5em;">
> <code>if(</code><span style="font-style: italic;">[directive-name-
modifier</span><code> :</code><span style="font-style: italic;">]scalar-
expression</span><code>)</code>
> </div>
> </blockquote>
> }}}
>
> And from §2.5:
> {{{
> #!html
> <blockquote>
> <p>The syntax of the <code>parallel</code> construct is as follows:</p>
> <div style="border: thin solid; padding: 0.5em;">
> <code>#pragma omp parallel</code> <span style="font-style:
italic;">[clause[[,]clause]...]new-line</span><br/>
> <span style="font-style: italic; margin-left: 1cm;">structured-
block</span>
> </div>
> <p>where <em>clause</em> is one of the following:</p>
> <div style="margin-left: 1cm;">
> <code>if(</code><span style="font-style: italic;">[</span><code>parallel
:</code><span style="font-style: italic;">]scalar-
expression</span><code>)</code>
> </div>
> …
> </blockquote>
> }}}
>
> This seems to make “parallel” a sort of reserved word that requires a
trailing colon, so I doubt LLVM upstream would consider this a bug,
although you’re free to [https://llvm.org/bugs/ submit a report]. I
suggest that graph-tool simply use any other variable name.
--
Ticket URL: <https://trac.macports.org/ticket/50958#comment:10>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list