-
Notifications
You must be signed in to change notification settings - Fork 34
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
"Undefined symbols for architecture arm64": linking issues under Apple M1 #56
Comments
Hi @bbonvi. These symbols are from transitive dependencies (i.e. dependencies of FFmpeg). It appears that the linker:
I'm not an OSX expert, so I'm not really sure how to fix this problem. On Linux, I'd suggest setting the |
I ran into the same problem but for [env]
FFMPEG_INCLUDE_DIR = { value = "ffmpeg-5.1-macOS-gpl-lite/include/", relative = true} # ffmpeg folder is in the root of my project
FFMPEG_LIB_DIR = { value = "ffmpeg-5.1-macOS-gpl-lite/lib/", relative = true }
FFMPEG_STATIC = "1"
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
] I downloaded the ffmpeg files from here: https://sourceforge.net/projects/avbuild/files/macOS/ I can now build with
Not sure what to try next but maybe this helps. |
Facing the same issue. Is there a way to debug which dependency is causing these problems? |
I found similar answers where we may need to pass in some extra |
I was able to get it to work by compiling my own version of ffmpeg and using it and updating the
Do you think these need to be submitted as a patch ( with path changes ) or is there some other location I can store the extra dependencies ( e.g zlib, bz2 ) so that they are automatically compiled ? @operutka |
@Pranav2612000 this library really isn't the place to link these libs. These libraries are transitive dependencies (i.e. they are dependencies of the FFmpeg libs) and they depend on the FFmpeg configuration. If your linker isn't able to resolve the symbols/dependencies automatically, you need to link them in the final application (i.e. the binary using this crate). |
Hello!
I'm having trouble compiling the library under Apple M1. I have ffmpeg version 5.1.2. Tried different installations: with shared and static libs. Still have this error. Maybe you can kick me in the right direction?
full_log.txt
The text was updated successfully, but these errors were encountered: