[MacPorts] #52130: ld64-latest @264.3.102_2+llvm38 build failure on 10.6 due to math.h - and fix

MacPorts noreply at macports.org
Mon Aug 29 07:04:56 PDT 2016


#52130: ld64-latest @264.3.102_2+llvm38 build failure on 10.6 due to math.h - and
fix
------------------------------------+--------------------------------
 Reporter:  kenneth.f.cunningham@…  |      Owner:  macports-tickets@…
     Type:  defect                  |     Status:  new
 Priority:  Normal                  |  Milestone:
Component:  ports                   |    Version:  2.3.4
 Keywords:  snowleopard             |       Port:  ld64
------------------------------------+--------------------------------
 As Jeremy has pointed out previously, there is a build error in
 ld64-latest @264.3.102_2+llvm38 on 10.6. due to math errors.

 the near-final line of the LibCxxOnOlderSystems instructions
 {{{
 sudo port -v upgrade --enforce-variants ld64 -ld64_97 -ld64_127 -ld64_136
 -ld64_236
 }}}
 fails due to some math errors
 {{{

 opt/local/bin/clang-mp-3.8 -Os -Os -arch x86_64
 -I/opt/local/libexec/llvm-3.8/include -DLTO_SUPPORT -Isrc/abstraction
 -Isrc/ld -Isrc/ld/parsers -I/opt/local/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_ld64/ld64-latest/work/dyld-360.18/include
 -c -o src/ld/debugline.o src/ld/debugline.c
 In file included from src/other/ObjectDump.cpp:35:
 In file included from src/ld/parsers/macho_relocatable_file.h:28:
 In file included from src/ld/ld.hpp:30:
 /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/math.h:1199:91: error:
 use of undeclared identifier 'llrintf'
 inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x)
 _NOEXCEPT       {return llrintf(__lcpp_x);}
 ^
 /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/math.h:1200:91: error:
 use of undeclared identifier 'llrintl'
 inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x)
 _NOEXCEPT {return llrintl(__lcpp_x);}
 ^
 /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/math.h:1205:40: error:
 call to 'llrint' is ambiguous
 llrint(_A1 __lcpp_x) _NOEXCEPT {return llrint((double)__lcpp_x);}
                                        ^~~~~~
 /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/math.h:1199:44: note:
 candidate function
 inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x)
 _NOEXCEPT       {return llrintf(__lcpp_x);}
                                            ^
 /opt/local/libexec/llvm-3.8/bin/../include/c++/v1/math.h:1200:44: note:
 candidate function
 inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x)
 _NOEXCEPT {return llrintl(__lcpp_x);}

 -- and more of the same ----

 }}}

 this potential fix was located <http://clang-
 developers.42468.n3.nabble.com/problems-building-libcxx-td2353619.html>

 and indeed adding the following to the ld64 portfile does enable the ld64
 upgrade to proceed without errors, and subsequent ports build normally.
 Presumably this is 10.6 specific (not tested on any other system at
 present) and would need to be wrapped in a darwin 10 guard...


 {{{

     configure.cppflags-append -I${workpath}/dyld-${dyld_version}/include
   +  configure.cppflags-append -U__STRICT_ANSI__
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/52130>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list