Opened 5 years ago
Last modified 7 months ago
#58578 closed defect
cmake fails to compile on Leopard (lround) — at Version 2
Reported by: | rmottola (Riccardo) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | leopard i386 legacy-os | Cc: | michaelld (Michael Dickens), kencu (Ken), cjones051073 (Chris Jones) |
Port: | cmake |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
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 (3)
Changed 5 years ago by rmottola (Riccardo)
comment:1 Changed 5 years ago by cjones051073 (Chris Jones)
comment:2 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Owner: | set to michaelld |
Status: | new → assigned |
Note: See
TracTickets for help on using
tickets.
This doesn't look like an issue with LegacySupport to me. Its only mentioned above because /opt/local/include/LegacySupport/cmath happens to wrap the 'system' cmath file. Also note the legacy support header does nothing to the 'lround' methods, it only adds the 'll' versions.