#50983: clang fails with valid OpenMP pragma on py-graph-tool build -------------------------+-------------------------------- Reporter: s.t.smith@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: | Port: clang-3.9 -------------------------+-------------------------------- The clang compile fails with an error on graph-tool with OpenMP enabled. The author believes that the OpenMP pragma is valid (I concur). Here's how to tickle the bug: {{{ # uninstall existing graph-tool sudo port uninstall py-graph-tool py27-graph-tool sudo port clean --dist py-graph-tool py27-graph-tool # build new graph-tool with OpenMP support sudo port install clang-3.9 libomp # modify the graph-tool Portfile to --enable-openmp sudo vi `port file py-graph-tool` < #configure.args-append --with-boost=${prefix} --exec- prefix=${python.prefix}
configure.args-append --with-boost=${prefix} --exec- prefix=${python.prefix} --enable-openmp # compile graph-tool sudo port -d install configure.compiler=macports-clang-3.9 }}}
clang error: {{{ In file included from graph_blockmodel.cc:39: In file included from ./graph_blockmodel_overlap.hh:24: ./graph_blockmodel.hh:2708:43: warning: missing ':' after directive name modifier - ignoring [-Wignored-pragmas] schedule(runtime) if (parallel) ^ ./graph_blockmodel.hh:2708:43: error: expected expression In file included from graph_blockmodel.cc:39: ./graph_blockmodel_overlap.hh:1337:67: warning: missing ':' after directive name modifier - ignoring [-Wignored-pragmas] firstprivate(m_entries) schedule(runtime) if (parallel) ^ ./graph_blockmodel_overlap.hh:1337:67: error: expected expression In file included from graph_blockmodel.cc:39: In file included from ./graph_blockmodel_overlap.hh:24: In file included from ./graph_blockmodel.hh:26: }}} The code is in {{{/opt/local//var/macports/build/_opt_local_var_macports_sources_rsync.macports .org_release_tarballs_ports_python_py-graph-tool/py27-graph-tool/work /graph-tool-2.13/src/graph/community/graph_blockmodel_overlap.hh}}}: {{{ #pragma omp parallel for default(shared) private(i) \ firstprivate(m_entries) schedule(runtime) if (parallel) for (i = 0; i < N; ++i) { ... }}} This appears to be correct, and compiles correctly with gcc on Linux. -- Ticket URL: <https://trac.macports.org/ticket/50983> MacPorts <https://www.macports.org/> Ports system for OS X