[MacPorts] #62656: rust @1.51.0 does not build on 10.9: Dyld: lazy symbol binding failed: Symbol not found: _linkat (OS 10.9)

MacPorts noreply at macports.org
Wed Apr 14 19:52:32 UTC 2021


#62656: rust @1.51.0 does not build on 10.9: Dyld: lazy symbol binding failed:
Symbol not found: _linkat (OS 10.9)
-------------------------+-----------------------
  Reporter:  cave-canem  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.6.99
Resolution:              |   Keywords:  mavericks
      Port:  rust        |
-------------------------+-----------------------

Comment (by kencu):

 Replying to [comment:17 cave-canem]:
 > Thanks Ken, I knew about this, so I wrote:
 > >> "As a possible solution, can you add a static linking variant to the
 rust port?"

 So there is no way to add a static linking variant to a downloaded rust
 port.

 The symbols are in the executable (which is already 99% statically
 linked), and mortals can't really force them in there. (I actually think
 you can do it, with a decompiler/dissassembler, but ... not us).

 So what you have to do is make the executable think it finds the symbols
 it wants. That is what the DYLD_INSERT_LIBRARIES feature does -- just jams
 another dylib into the mixture.

 But this doesn't work either as it is, because rust/cargo expect the
 linkat symbol in libSystem.dylib. So that is how the flat namespace force
 helps us.

 In this case.

 The other method, generating a new libSystem.dylib using ld64's "export
 libraries" feature, is probably actually the better one, but more work, so
 I didn't bother.

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


More information about the macports-tickets mailing list