Opened 5 years ago

Last modified 6 weeks ago

#58578 closed defect

cmake fails to compile on Leopard (lround) — at Initial Version

Reported by: rmottola (Riccardo) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard i386 legacy-os Cc: michaelld (Michael Dickens), kencu (Ken), cjones051073 (Chris Jones)
Port: cmake

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?

Change History (1)

Changed 5 years ago by rmottola (Riccardo)

Attachment: main.log added
Note: See TracTickets for help on using tickets.