Opened 11 days ago

Last modified 11 days ago

#10979 new defect

ffmpeg-7.0 built with clang (XCode 15.3) crashes: dyld[72631]: Library not loaded: @rpath/libatomic.1.dylib

Reported by: Mario Grgic Owned by:
Priority: normal Component: build system
Version: unspecified Keywords: libatomic clang
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: Built ffmpeg-7.0 from source using clang-1500.3.9.4 (XCode 15.3) on macOS Sonoma 14.4.1. The build succeeds but then ffmpeg crashes due to unsatisfied dynamic library load:

$ ./ffmpeg
dyld[72631]: Library not loaded: @rpath/libatomic.1.dylib
  Referenced from: <32529182-3CA7-3CF7-AF95-24763B012073> /Volumes/ramdisk/ffmpeg/compile/ffmpeg-7.0/ffmpeg
  Reason: no LC_RPATH's found
Abort trap: 6

Please note that I also have GNU gcc 13.2 installed in /usr/local and this does have libatomic.1.dylib in /usr/local/lib, however, ffmpeg should not be linking against it, since it is not being built with /usr/local/bin/gcc

Change History (1)

comment:1 by Mario Grgic, 11 days ago

Interestingly enough if I manually edit the ffmpeg binary to fix the @path

install_name_tool -change  @rpath/libatomic.1.dylib  /usr/local/lib/libatomic.1.dylib ffmpeg

it runs without crash. However, not sure if it will work when the libatomic code is hit.

Note: See TracTickets for help on using tickets.