[MacPorts] #64113: xxhashlib @0.8.1_0: build failure: static_assert undefined

MacPorts noreply at macports.org
Thu Dec 2 20:50:12 UTC 2021


#64113: xxhashlib @0.8.1_0: build failure: static_assert undefined
------------------------+-------------------------
  Reporter:  macdeport  |      Owner:  Schamschula
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.7.1
Resolution:             |   Keywords:  yosemite
      Port:  xxhashlib  |
------------------------+-------------------------

Comment (by ryandesign):

 The code says:
 {{{
 #ifndef XXH_STATIC_ASSERT
 #  if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)    /* C11
 */
 #    include <assert.h>
 #    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m);
 } while(0)
 #  elif defined(__cplusplus) && (__cplusplus >= 201103L)            /*
 C++11 */
 #    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { static_assert((c),m);
 } while(0)
 #  else
 #    define XXH_STATIC_ASSERT_WITH_MESSAGE(c,m) do { struct xxh_sa { char
 x[(c) ? 1 : -1]; }; } while(0)
 #  endif
 #  define XXH_STATIC_ASSERT(c) XXH_STATIC_ASSERT_WITH_MESSAGE((c),#c)
 #endif
 }}}
 So they're clearly intending to use `static_assert` only if the compiler
 is already in C11 or C++11 mode. So the questions are: why on 10.6 and
 10.10 are we apparently in C11 or C++11 mode, and if we are in that mode,
 why then can't the symbol be found?

 The issue where this revised static assert stuff was introduced is
 https://github.com/Cyan4973/xxHash/issues/567.

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


More information about the macports-tickets mailing list