Unable to View Linker Verbose Output in Xcode

I am currently experiencing a problem with Xcode where I am unable to view the verbose output of the linker, despite having set the -v flag in my build settings. When attempting to build my project, I encounter a "Linker command failed with exit code 1" error, along with a message about "Undefined symbols". The specific issues that arise are:

  1. After setting the -v flag for more verbose logging, the expected detailed output is not visible in the Report Navigator within Xcode.
  2. When I right-click on the error in the Issue Navigator and select "Reveal in Log," there is no response from Xcode and the log does not appear.

Troubleshooting steps I've taken so far:

  1. Ensured that the -v flag is correctly set in the "Other Linker Flags" section of my build settings.
  2. Tried cleaning the build folder and deleting Derived Data.
  3. Attempted to manually expand the error in the Report Navigator to access the detailed logs without success.
  4. Restarted Xcode

Environment:

  1. Xcode version: 15.2 (15C500b)
  2. Target device: iPhone 15 Pro (17.2)
  3. macOS version: Sonoma 14.0 (23A344)

I'm looking for assistance in resolving this issue so that I can access the detailed linker logs and address the "Undefined symbols" error. Any guidance on how to enable verbose output for the linker or alternative methods to retrieve this information would be greatly appreciated.

Accepted Reply

-v is working for me.

I created a new test project from the macOS > Command Line Tool template. I then set the Other Linker Flags (OTHER_LDFLAGS) build setting to:

  • -Xlinker
  • -v

When I build the project I see this in the Link step build transcript:

@(#)PROGRAM:ld  PROJECT:dyld-1022.1
BUILD 05:27:37 Dec  7 2023
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h
will use ld-classic for: armv6 armv7 armv7s arm64_32 i386 armv6m armv7k armv7m armv7em
LTO support using: LLVM version 15.0.0 (static support for 29, runtime is 29)
TAPI support using: Apple TAPI version 15.0.0 (tapi-1500.0.12.8)
Library search paths:
…

which you don’t see without that.

ps This is Xcode 15.2 on macOS 14.3.1, but AFAIK this has always worked this way.

pps With regards the -Xlinker quoting, I filed a bug to improve out docs in that space (r. 123824415).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Replies

-v is working for me.

I created a new test project from the macOS > Command Line Tool template. I then set the Other Linker Flags (OTHER_LDFLAGS) build setting to:

  • -Xlinker
  • -v

When I build the project I see this in the Link step build transcript:

@(#)PROGRAM:ld  PROJECT:dyld-1022.1
BUILD 05:27:37 Dec  7 2023
configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h
will use ld-classic for: armv6 armv7 armv7s arm64_32 i386 armv6m armv7k armv7m armv7em
LTO support using: LLVM version 15.0.0 (static support for 29, runtime is 29)
TAPI support using: Apple TAPI version 15.0.0 (tapi-1500.0.12.8)
Library search paths:
…

which you don’t see without that.

ps This is Xcode 15.2 on macOS 14.3.1, but AFAIK this has always worked this way.

pps With regards the -Xlinker quoting, I filed a bug to improve out docs in that space (r. 123824415).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"