[MacPorts] #52554: libomp @3.9.0_1 won't build on Snow Leopard, Mac OS X 10.6.8, because of missing llvm-lit?

MacPorts noreply at macports.org
Mon Jan 23 09:39:42 UTC 2017


#52554: libomp @3.9.0_1 won't build on Snow Leopard, Mac OS X 10.6.8, because of
missing llvm-lit?
------------------------+--------------------------------
  Reporter:  ballapete  |      Owner:  macports-tickets@…
      Type:  defect     |     Status:  closed
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.3.4
Resolution:  wontfix    |   Keywords:
      Port:  libomp     |
------------------------+--------------------------------

Comment (by devernay):

 libomp 3.8.1 has severe bugs, so I wanted libomp 3.9.1 on SL

 The real limit is not the macOS version, but the fact that the system
 supports libc++: this should be checked instead of the system version.

 However, kmp_alloc.c includes indirectly <atomic>, but it's a C file...
 and the CMAKE_C_FLAGS don't have -stdlib=libc++:
 {{{
 :info:build cd /opt/local-libc++/var/macports/build/_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work
 /build-x86_64/src && /opt/local/bin/clang-mp-3.9  -Domp_EXPORTS -I/opt
 /local-libc++/var/macports/build/_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work
 /build-x86_64/src -I/opt/local-libc++/var/macports/build/_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src
 -I/opt/local-libc++/var/macports/build/_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src/i18n
 -I/opt/local-libc++/var/macports/build/_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src/include/45
 -I/opt/local-libc++/var/macports/build/_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src/thirdparty/ittnotify
 -pipe -O2 -DNDEBUG -arch x86_64 -mmacosx-version-min=10.6 -fPIC   -D
 _GNU_SOURCE -D _REENTRANT -I/opt/local/include -std=c++11 -fno-exceptions
 -Wno-sign-compare -Wno-unused-function -Wno-unused-local-typedef -Wno-
 unused-value -Wno-unused-variable -Wno-switch -Wno-covered-switch-default
 -Wno-deprecated-register -Wno-gnu-anonymous-struct -Wno-unknown-pragmas
 -Wno-missing-field-initializers -Wno-missing-braces -Wno-comment -Wno-
 self-assign -Wno-vla-extension -Wno-format-pedantic -x c++ -o
 CMakeFiles/omp.dir/kmp_alloc.c.o   -c /opt/local-libc++/var/macports/build
 /_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src/kmp_alloc.c
 :info:build In file included from /opt/local-libc++/var/macports/build
 /_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src/kmp_itt.c:19:
 :info:build In file included from /opt/local-libc++/var/macports/build
 /_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src/kmp_itt.h:20:
 :info:build /opt/local-libc++/var/macports/build/_opt_local-
 libc++_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libomp/libomp/work/openmp-391/rc1/runtime/src/kmp_lock.h:26:10:
 fatal error: 'atomic' file not found
 :info:build #include <atomic>
 ...
 }}}

 An easy fix is to append -stdlib=libc++ to the configure.cflags. This can
 be done in the libomp Portfile, but shouldn't it be done globally on
 systems where libc++ is not the default?

 Anyway, I'm attaching a fix to get the latest libomp on older systems with
 libc++

--
Ticket URL: <https://trac.macports.org/ticket/52554#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list