Summary:
When linking indirect dynamic libraries for flat namespace, ld loads all indirect dylibs. If an indirect dylib is linked using an @rpath install name, the linker does not resolve @rpath and produces a "file not found" error.
This is a regression in Xcode 7.3 (ld version ld64-264.3.101), it works as expected using Xcode 7.2.1 (ld version ld64-253.9).
(See the manpage for ld for a description of indirect dynamic libraries.)
Steps to Reproduce:
Unzip ld-bug.zip and cd into the directory
Run script.sh
Expected Results:
The script runs without error and produces libc.dylib. This is what happens using Xcode 7.2.1.
Actual Results:
The script fails at the last step with the following linker error:
ld: file not found: @rpath/liba.dylib for architecture x86_64
Version:
Mac OS X 10.11.4 / 15E65
Xcode 7.3 / 7D175
Notes:
Configuration:
Mac OS X 10.11.4
Xcode 7.3
Attachments:
'ld-bug.zip' was successfully uploaded.
Description
Summary: When linking indirect dynamic libraries for flat namespace, ld loads all indirect dylibs. If an indirect dylib is linked using an @rpath install name, the linker does not resolve @rpath and produces a "file not found" error.
This is a regression in Xcode 7.3 (ld version ld64-264.3.101), it works as expected using Xcode 7.2.1 (ld version ld64-253.9).
(See the manpage for ld for a description of indirect dynamic libraries.)
Steps to Reproduce:
Expected Results: The script runs without error and produces libc.dylib. This is what happens using Xcode 7.2.1.
Actual Results: The script fails at the last step with the following linker error: ld: file not found: @rpath/liba.dylib for architecture x86_64
Version: Mac OS X 10.11.4 / 15E65 Xcode 7.3 / 7D175
Notes:
Configuration: Mac OS X 10.11.4 Xcode 7.3
Attachments: 'ld-bug.zip' was successfully uploaded.
Product Version: Xcode 7.3 (7D175) Created: 2016-03-23T14:31:37.112400 Originated: 2016-03-23T00:00:00 Open Radar Link: http://www.openradar.me/25313838