[MacPorts] #55415: cmake @3.10.0 does not build on PPC Tiger, Mac OS X 10.4.11, due to various issues building libuv

MacPorts noreply at macports.org
Sun Dec 3 11:34:43 UTC 2017


#55415: cmake @3.10.0 does not build on PPC Tiger, Mac OS X 10.4.11, due to various
issues building libuv
------------------------+-----------------------
  Reporter:  ballapete  |      Owner:  michaelld
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.4.2
Resolution:             |   Keywords:  tiger
      Port:  cmake      |
------------------------+-----------------------

Comment (by ballapete):

 Replying to [comment:17 kencu]:
 > well, if you're feeling lucky, you might just whack that whole thing in
 as a giant patch (with the right patchlevel sorted out) and see if it
 "just works" after that.

 I'm not lucky…

 Kind of resetting `CMake`'s own version ob `libuv` leads to an error:

 {{{
 /opt/local/bin/gcc-mp-6 -pipe -Os -m32
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Bootstrap.cmk
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Source
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Source/LexerParser
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities
 -DCMAKE_BOOTSTRAP -D_DARWIN_USE_64_BIT_INODE=1
 -D_DARWIN_UNLIMITED_SELECT=1
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities/cmlibuv/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities/cmlibuv/src/unix
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities/cmlibuv/src
 -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities/cmlibuv/src/unix
 /cmake-bootstrap.c -o uv-src-unix-cmake-bootstrap.c.o
 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities/cmlibuv/src/unix
 /cmake-bootstrap.c: In function 'uv_once':
 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities/cmlibuv/src/unix
 /cmake-bootstrap.c:99:7: error: used struct type value where scalar is
 required
    if (*guard) {
        ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.10.0/Utilities/cmlibuv/src/unix
 /cmake-bootstrap.c:102:10: error: incompatible types when assigning to
 type 'uv_once_t {aka struct _opaque_pthread_once_t}' from type 'int'
    *guard = 1;
           ^
 gmake: *** [Makefile:382: uv-src-unix-cmake-bootstrap.c.o] Error 1
 }}}

 The problem seams to be that `guard` is nowhere declared:

 {{{
 cmake-3.10.0/Utilities/cmlibuv/src/unix/cmake-bootstrap.c:98:void
 uv_once(uv_once_t* guard, void (*callback)(void)) {
 cmake-3.10.0/Utilities/cmlibuv/src/unix/cmake-bootstrap.c:99:  if (*guard)
 {
 cmake-3.10.0/Utilities/cmlibuv/src/unix/cmake-bootstrap.c:102:  *guard =
 1;
 cmake-3.10.0/Utilities/cmlibuv/src/unix/thread.c:216:void
 uv_once(uv_once_t* guard, void (*callback)(void)) {
 cmake-3.10.0/Utilities/cmlibuv/src/unix/thread.c:217:  if
 (pthread_once(guard, callback))
 cmake-3.10.0/Utilities/cmlibuv/src/win/thread.c:49:static void
 uv__once_inner(uv_once_t* guard, void (*callback)(void)) {
 cmake-3.10.0/Utilities/cmlibuv/src/win/thread.c:59:  existing_event =
 InterlockedCompareExchangePointer(&guard->event,
 cmake-3.10.0/Utilities/cmlibuv/src/win/thread.c:69:    guard->ran = 1;
 cmake-3.10.0/Utilities/cmlibuv/src/win/thread.c:81:void uv_once(uv_once_t*
 guard, void (*callback)(void)) {
 cmake-3.10.0/Utilities/cmlibuv/src/win/thread.c:83:  if (guard->ran) {
 cmake-3.10.0/Utilities/cmlibuv/src/win/thread.c:87:  uv__once_inner(guard,
 callback);
 }}}

 just inherently defined and used… The `type` of `uv_once_t` is defined as:

 {{{
 typedef pthread_once_t uv_once_t;
 }}}

 Which can be resolved in steps to:

 {{{
 typedef __darwin_pthread_once_t pthread_once_t;
 }}}

 {{{
 typedef struct _opaque_pthread_once_t
    __darwin_pthread_once_t;
 }}}

 {{{
 struct _opaque_pthread_once_t { long __sig; char __opaque[4]; };
 }}}

 I've taken this from the pre-processed file. *I* have no idea why GCC 6
 sees here an `int`.

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


More information about the macports-tickets mailing list