[MacPorts] #58578: cmake fails to compile on Leopard (lround)

MacPorts noreply at macports.org
Mon Jun 10 00:49:21 UTC 2019


#58578: cmake fails to compile on Leopard (lround)
-----------------------+---------------------------------
  Reporter:  rmottola  |      Owner:  michaelld
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:  leopard i386 legacy
      Port:  cmake     |
-----------------------+---------------------------------
Changes (by ryandesign):

 * owner:  (none) => michaelld
 * status:  new => assigned


Old description:

> Build log attached, it fails with clang 3.9 clang 5.0 and gcc 6.5 (even
> my patched gcc6 which has fixed math headers).
>
> Lots of warnings, but the issues seems to be:
> opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.14.5/Source/cmFileCommand.cxx:2615:66:
> error: call of overloaded 'lround(double)' is ambiguous
>        this->CurrentPercentage = std::lround(value / total * 100.0);
>                                                                   ^
> In file included from /opt/local/include/LegacySupport/cmath:54:0,
>                  from
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.14.5/Source/cmFileCommand.cxx:13:
> /opt/local/include/gcc6/c++/cmath:1662:3: note: candidate: constexpr long
> int std::lround(float)
>    lround(float __x)
>    ^~~~~~
> /opt/local/include/gcc6/c++/cmath:1666:3: note: candidate: constexpr long
> int std::lround(long double)
>    lround(long double __x)
>    ^~~~~~
> make[2]: *** [Source/CMakeFiles/CMakeLib.dir/cmFileCommand.cxx.o] Error 1
>

> An issue with legacy support?

New description:

 Build log attached, it fails with clang 3.9 clang 5.0 and gcc 6.5 (even my
 patched gcc6 which has fixed math headers).

 Lots of warnings, but the issues seems to be:
 {{{
 opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.14.5/Source/cmFileCommand.cxx:2615:66:
 error: call of overloaded 'lround(double)' is ambiguous
        this->CurrentPercentage = std::lround(value / total * 100.0);
                                                                   ^
 In file included from /opt/local/include/LegacySupport/cmath:54:0,
                  from
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.14.5/Source/cmFileCommand.cxx:13:
 /opt/local/include/gcc6/c++/cmath:1662:3: note: candidate: constexpr long
 int std::lround(float)
    lround(float __x)
    ^~~~~~
 /opt/local/include/gcc6/c++/cmath:1666:3: note: candidate: constexpr long
 int std::lround(long double)
    lround(long double __x)
    ^~~~~~
 make[2]: *** [Source/CMakeFiles/CMakeLib.dir/cmFileCommand.cxx.o] Error 1
 }}}

 An issue with legacy support?

--

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


More information about the macports-tickets mailing list