Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apple binaries are linked against the system libexpat library #316

Closed
tanersener opened this issue Jan 13, 2022 · 2 comments
Closed

apple binaries are linked against the system libexpat library #316

tanersener opened this issue Jan 13, 2022 · 2 comments
Assignees
Labels
apple Affect Apple platforms bug Something isn't working fixed-in-v4.5.1 library Affects the library scripts Affect build scripts v4.5.1 Affects v4.5.1 release

Comments

@tanersener
Copy link
Collaborator

tanersener commented Jan 13, 2022

Description
When apple platform (ios, macos, tvos) build scripts enable an external library that requires expat, build scripts are linked against the libexpat system library that comes with the newer SDK versions.

First reported in https://github.com/tanersener/ffmpeg-kit-test/issues/18

Expected behavior
Linked libraries should work on all platforms.

Current behavior
Unfortunately, older system runtimes e.g. iOS 13.5 don't have libexpat. So, they fail to load ffmpeg libraries.

To Reproduce

  1. Run ios.sh by enabling either fontconfig or libass
  2. Start your application on iOS SDK 13.5

Logs

dyld: Library not loaded: /usr/lib/libexpat.1.dylib
  Referenced from: /Users/taner/Library/Developer/CoreSimulator/Devices/5D5AD397-2408-4E70-9308-28E80DF86065/data/Containers/Bundle/Application/2D2FC5FC-E951-4721-9338-6B4BE0F3C7AB/FFmpegKitIOS.app/Frameworks/libavdevice.framework/libavdevice
  Reason: image not found
dyld: launch, loading dependent libraries

Environment

  • Platform: iOS/macOS/tvOS
  • Architecture: armv7, armv7s, arm64, arm64-mac-catalyst, arm64-simulator, arm64e, i386, x86-64, x86-64-mac-catalyst
  • Version: v4.5.1 and v4.5.1.LTS
  • Source branch: main
  • Xcode version: 13.2.1
  • Cocoapods version: 1.11.2

Other
This happens because Apple platforms try to load dynamic libraries first. Since there is a dynamic libexpat.1.dylib library found in search paths, they ignore the static binary built by ios.sh, macos.sh and tvos.sh.

This behaviour is explained in QA1393.

@tanersener tanersener added bug Something isn't working apple Affect Apple platforms scripts Affect build scripts library Affects the library v4.5.1 Affects v4.5.1 release labels Jan 13, 2022
@tanersener tanersener self-assigned this Jan 13, 2022
@tanersener
Copy link
Collaborator Author

This bug affects video, full and full-gpl packages of v4.5.1 and v4.5.1.LTS

@tanersener
Copy link
Collaborator Author

tanersener commented Jan 14, 2022

I patched Apple platform (ios, macos, tvos) releases v4.5.1 and v4.5.1.LTS with the fix for this issue.

Please clean you pod cache and run pod install again if you encounter the error described in the first post.

pod cache clean ffmpeg-kit-ios-full

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apple Affect Apple platforms bug Something isn't working fixed-in-v4.5.1 library Affects the library scripts Affect build scripts v4.5.1 Affects v4.5.1 release
Projects
None yet
Development

No branches or pull requests

1 participant