Opened 2 years ago

Last modified 5 months ago

#53784 reopened defect

Add support for tapi-tbd-v2

Reported by: jtalle Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: larryv (Lawrence Velázquez), cjones051073 (Chris Jones), josephwinston (Joseph Winston)
Port: ld64-latest

Description

Attempted to use 'sudo port install clang-3.7' and received an error.

Attaching log file.

Attachments (1)

clang-3.7 (3.6 MB) - added by jtalle 2 years ago.

Change History (15)

Changed 2 years ago by jtalle

Attachment: clang-3.7 added

comment:1 Changed 2 years ago by jtalle

the logfile was > 10mb. Created a txt file with the tail end of the log and attached it.

comment:2 Changed 2 years ago by mf2k (Frank Schima)

Cc: larryv added
Owner: set to jeremyhu
Port: clang-3.7 added
Status: newassigned

In the future, please fill in the Port field and Cc the port maintainers (port info --maintainers clang-3.7), if any.

comment:3 Changed 2 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Port: ld64-latest added; clang-3.7 removed
Summary: clang-3.7 failAdd support for tapi-tbd-v2

:info:build ld: unexpected token: !tapi-tbd-v2 file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib/libc++abi.tbd' for architecture x86_64

Please use the +ld64-latest variant of ld64.

comment:4 Changed 2 years ago by jeremyhu (Jeremy Huddleston Sequoia)

I started working on this a few weeks ago, but I didn't finish it. If someone wants to pick up where I left off, see https://github.com/jeremyhu/macports-ports/commits/tapi-v2

The trouble is that the tapi drop from Apple doesn't work with OSS llvm (at least not the versions I tried 3.7-devel at the time). We will likely want to instead create a libtapi port which pulls in the version of llvm that Apple released from that same version of Xcode.

comment:5 Changed 20 months ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:6 Changed 20 months ago by josephwinston (Joseph Winston)

Cc: josephwinston added

comment:7 Changed 13 months ago by gaming-hacker (G Alexander)

what's the status on this? it still doesn't work with llvm5 or llvm6

ld: unexpected token: !tapi-tbd-v2 file '/System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd' for architecture x86_64
Last edited 5 months ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:8 Changed 13 months ago by jeremyhu (Jeremy Huddleston Sequoia)

I understand your frustration, but it's simply not a priority for me. If it's hindering you, just install the +ld64_xcode variant of ld64 until it is addressed.

comment:9 in reply to:  8 Changed 9 months ago by sunoterra (Michael Stilson)

Replying to jeremyhu:

I understand your frustration, but it's simply not a priority for me. If it's hindering you, just install the +ld64_xcode variant of ld64 until it is addressed.

nice! building ld64 with that variant solves all kinds of build/link errors that have been popping up lately, on 10.11.x systems.

thanks @jeremyhu 🖖

comment:10 Changed 8 months ago by ken-cunningham-webuse

Resolution: fixed
Status: assignedclosed

In 5698d9483b44984a826d0f41154a4381b7957223/macports-ports (master):

ld64: default to +ld64_xcode on Xcode9+

ld64 does not understand tapi in the open-source
versions at present.

closes: #56843
closes: #53784
closes: #56398
closes: #56277
see: #56647
see: #54510
see: #54506
see: #53151

comment:11 Changed 8 months ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: closedreopened

Reopening. This hasn't been fixed. This tracks adding support, not deferring to Xcode.

comment:12 Changed 8 months ago by kencu (Ken)

Thanks -- I was going to reopen it myself, as I know you meant for this to track adding tapi support to ld64.

Last edited 6 months ago by kencu (Ken) (previous) (diff)

comment:13 Changed 6 months ago by kencu (Ken)

BTW -- one of your Apple colleagues has put on GitHub what appears to be a nice-looking tapi drop that looks as though it would build in the clang / llvm mix as an additional project. I'm sure you already knew this:

<https://github.com/ributzka/tapi>

Edit:

So that has been made into an easy-to-build project <https://github.com/tpoechtrager/apple-libtapi/tree/2.0.0> however, it is incomplete, and actually segfaults when used. It seems that certain parts are not yet implemented in the github released version <https://github.com/tpoechtrager/apple-libtapi/blob/2.0.0/src/llvm/projects/libtapi/lib/Core/MachODylibReader.cpp> and so it appears we continue to await an official Apple drop of tapi 2.0.0 with tapi-v3 support in it.

Given this, I'll stop trying to make this happen until something comes down from above, which is where I'm sure you are with this as well.

Last edited 6 months ago by kencu (Ken) (previous) (diff)

comment:14 Changed 6 months ago by jeremyhu (Jeremy Huddleston Sequoia)

Yeah, that drop isn't compatible with OSS llvm mainline. It was based on an Apple fork, and hasn't been updated for mainline, which is part of the problem.

Note: See TracTickets for help on using tickets.