[MacPorts] #60397: ld64-127 install fails at applying patch stage on Tiger

MacPorts noreply at macports.org
Sun Apr 26 04:18:35 UTC 2020


#60397: ld64-127 install fails at applying patch stage on Tiger
------------------------------+-----------------------------
  Reporter:  programmingkidx  |      Owner:  kencu
      Type:  defect           |     Status:  assigned
  Priority:  Normal           |  Milestone:  MacPorts Future
 Component:  ports            |    Version:  2.6.2
Resolution:                   |   Keywords:  tiger
      Port:  ld64-127         |
------------------------------+-----------------------------

Comment (by kencu):

 Here's what I did to build ld64-127 on Tiger (PPC). First copied over the
 MacOS10.5.sdk from a Leopard system, and then did these changes to the
 ld64 Portfile:
 {{{
 diff --git a/devel/ld64/Portfile b/devel/ld64/Portfile
 index 2aba025c888..39184ee1eed 100644
 --- a/devel/ld64/Portfile
 +++ b/devel/ld64/Portfile
 @@ -79,6 +79,10 @@ subport ld64-127 {
      # This was the last ld64 release that supported linking ppc
 executables.
      version             127.2
      revision            14
 +configure.sdkroot /Developer/SDKs/MacOSX10.5.sdk
 +configure.cppflags-append -isysroot ${configure.sdkroot}
 +configure.cxxflags-append -isysroot ${configure.sdkroot}
 +configure.cflags-append -isysroot ${configure.sdkroot}

      # multiple errors with macports clang versions newer than 3.7
      compiler.blacklist-append {macports-clang-[5-9].0} macports-clang-
 devel
 @@ -396,11 +400,20 @@ if {${subport} eq ${name}} {

          if {${os.major} < 9} {
              # No CommonCrypto, use openssl
 +
 +if {$ld64_ver == 97} {
              reinplace "s:<CommonCrypto/CommonDigest.h>:<openssl/md5.h>:"
 \
                  ${worksrcpath}/src/ld/MachOWriterExecutable.hpp
              reinplace "s:CC_MD5:MD5:" \
                  ${worksrcpath}/src/ld/MachOWriterExecutable.hpp
 +}

 +if {$ld64_ver == 127} {
 +            reinplace "s:<CommonCrypto/CommonDigest.h>:<openssl/md5.h>:"
 \
 +                ${worksrcpath}/src/ld/OutputFile.cpp
 +            reinplace "s:CC_MD5:MD5:" \
 +                ${worksrcpath}/src/ld/OutputFile.cpp
 +}
              reinplace "s:-Wl,-exported_symbol,__mh_execute_header::g" \
                  ${worksrcpath}/Makefile

 @@ -512,8 +525,8 @@ if {![variant_isset universal]} {
      test.run     yes
      test.dir     ${workpath}/ld64-${version}/unit-tests/test-cases
      test.cmd     perl ../bin/make-recursive.pl \
 -                 CXX="${configure.cxx} -arch ${configure.build_arch}"  \
 -                 CC="${configure.cc} -arch ${configure.build_arch}" \
 +                 CXX="${configure.cxx} -arch ${configure.build_arch}
 -isysroot ${configure.sdkroot}"  \
 +                 CC="${configure.cc} -arch ${configure.build_arch}
 -isysroot ${configure.sdkroot}" \
                   BUILT_PRODUCTS_DIR="${workpath}/ld64-${version}" \
                   LD_SYSROOT="${configure.sdkroot}" \
                   LD="${workpath}/ld64-${version}/ld" \
 }}}

 there is a slight issue that I haven't sorted out completely with the
 {{{crt0.o}}} files --- the one in the 10.5 SDK is different than the one
 in the 10.4 SDK. I forget just now which way I got around that -- I think
 I copied the 10.4 one into the 10.5 SDK to build this -- I'm sorry, it was
 a couple of months ago now and I don't fully recall.

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


More information about the macports-tickets mailing list