[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 Oct 10 22:36:07 CEST 2016


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

Comment (by Peter_Dyballa@…):

 Replying to [comment:9 maxkalashnikov@…]:
 > My understanding is that this is a valid include when using the c++11
 standard but not older ones. If you search for the cxx_stdlib MacPorts
 setting on the web, I think you'll find plenty of references describing
 it.
 >
 I am lacking understanding of C++, but your explication does explain why
 this error occurs when `#include <atomic>` is not used:

 {{{
 /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_libomp/libomp/work/openmp-390/rc1/runtime/src/kmp_lock.h:260:5:
 error: use of undeclared identifier 'std'
     std::atomic<bool>     initialized;
     ^
 }}}

 These are the lines in mp_lock.h:

 {{{
  243 #ifdef _MSC_VER
  244 // MSVC won't allow use of std::atomic<> in a union since it has non-
 trivial copy constructor.
  245
  246 struct kmp_base_ticket_lock {
  247     // `initialized' must be the first entry in the lock data
 structure!
  248     std::atomic_bool      initialized;
  249     volatile union kmp_ticket_lock *self; // points to the lock union
  250     ident_t const *       location;       // Source code location of
 omp_init_lock().
  251     std::atomic_uint      next_ticket;    // ticket number to give to
 next thread which acquires
  252     std::atomic_uint      now_serving;    // ticket number for thread
 which holds the lock
  253     std::atomic_int       owner_id;       // (gtid+1) of owning
 thread, 0 if unlocked
  254     std::atomic_int       depth_locked;   // depth locked, for nested
 locks only
  255     kmp_lock_flags_t      flags;          // lock specifics, e.g.
 critical section lock
  256 };
  257 #else
  258 struct kmp_base_ticket_lock {
  259     // `initialized' must be the first entry in the lock data
 structure!
  260     std::atomic<bool>     initialized;
  261     volatile union kmp_ticket_lock *self; // points to the lock union
  262     ident_t const *       location;       // Source code location of
 omp_init_lock().
  263     std::atomic<unsigned> next_ticket;    // ticket number to give to
 next thread which acquires
  264     std::atomic<unsigned> now_serving;    // ticket number for thread
 which holds the lock
  265     std::atomic<int>      owner_id;       // (gtid+1) of owning
 thread, 0 if unlocked
  266     std::atomic<int>      depth_locked;   // depth locked, for nested
 locks only
  267     kmp_lock_flags_t      flags;          // lock specifics, e.g.
 critical section lock
  268 };
  269 #endif
  }}}

 Wouldn't GCC5, GCC49, GCC48, and GCC47 with `-std=c++11 -std=c11` work?

-- 
Ticket URL: <https://trac.macports.org/ticket/52554#comment:10>
MacPorts <https://www.macports.org/>
Ports system for the Mac operating system



More information about the macports-tickets mailing list