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

MacPorts noreply at macports.org
Tue Mar 20 21:51:32 UTC 2018


#55415: cmake @3.10.1 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:2 kencu]:
 > try adding this and please report back
 >
 > {{{
 > # fix build on Tiger
 > if { ${os.platform} eq "darwin" && ${os.major} == 8 } {
 >     configure.cxxflags-append -D__DARWIN_UNIX03
 > }
 > }}}

 I started to test again, since this libuv failure makes upgrading the
 ports a bit complicated. `Portfile`has already

 {{{
     166 platform darwin 8 {
     167     configure.args-delete --system-libs
     168     configure.args-append --no-system-libs
 }}}

 so one can add

 {{{
     169     configure.cppflags-append -D__DARWIN_UNIX03
 }}}

 but this change leads to exactly the same build failure, no change. So
 it's likely that the function using unsetenv{} needs a fix.

 In #55145 this fix for Kerberos is featured:

 {{{
 -    if (unsetenv(KRB5_ENV_CCNAME) != 0) {
 -        retval = errno;
 -        com_err(prog_name, retval, _("while clearing the value of %s"),
 -                KRB5_ENV_CCNAME);
 -        return retval;
 -    }
 }}}

 In Tiger the if clause compares a void() with an integer. If the compiler
 accepts this type mismatch then the result must be true – something
 (undefined?) will almost never equal 0. So the code block is entered.
 Where comes `errno` from? Does it need (local, inside the function)
 declaration? Or is there some automatism at work?

 The original funtion in cmake-3.10.0/Utilities/cmlibuv/src/unix/core.c is:

 {{{
 int uv_os_unsetenv(const char* name) {
   if (unsetenv(name) != 0)
     return -errno;

   return 0;
 }
 }}}

 which looks quite similar, and the error repored by GCC 6 is:

 {{{
 error: void value not ignored as it ought to be
 }}}

 I presume this report will continue to exist…

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


More information about the macports-tickets mailing list