-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
wasm-ld: error: dist/lib/libavformat.a: archive has no index; run ranlib to add one #9705
Comments
I would look at the commands used to build the libraries. According the wasm-ld they don't have indexes. How is |
I had a similar error with a library that used the 'strip' command in it's build process to remove debugging symbols from the .a artifact. On Linux this seemed to get confused with the new backend and damaged the files; replacing strip with a no-op worked around it. Might be something to check for. |
Interesting. Presumably this is because the native |
I'm curious what version version this was on, and which backend - if this is a regression in the new backend that would be worrying. |
I would imagine the same thing would happen with fastcomp, since |
Here's a gist with a small library build that triggers the different behavior between fastcomp (where it builds) and upstream (where it gives you the 'no index' error): https://gist.github.com/brion/ef605cb6b71a81c763c59ed15efd9a78 I definitely recommend checking the ffmpeg build process for it running |
very sorry, i'm later :(
Compiled to generate the following files:
No error at this step, but when i build my project...(Below is my project directory)
the build commond is this:
I got the wasm-ld: error: dist/lib/libavformat.a: archive has no index; run ranlib to add one |
Can you remove the libavformat.a library and the rebuilt it in order to see exactly how it is being build?
|
Looks like this may be a common problem given the simple reproducer @Brion provided. Perhaps the error Alternatively, could |
I don't think it makes sense to build such magic into wasm-ld, but we can build more magic into emscripten if we like. How about this:
? |
@sbc100 that sounds good! |
Of course,when i rebuild it, the compilation process is as follows:(sorry,the info is too long:()
Some warning messages during the compilation process. |
I built this locally and did some debugging:
So it looks like ffmpeg calls ranlib directly. If you want this to work you also need to specify You will also need to install 1.39.1 in order to get the fix for ranlib itself: #9714 |
you can add --ranlib="emranlib" to build success |
Yes, after specifying this paramter [--ranlib="emranlib"], build successfully. |
Hi,
I'm getting these errors while compiling ffmpeg with emcc
(I see this error referenced in #9329 but i already set [--cc="emcc" --ar="emar"].)
The below is the build script
2)build_decoder_wasm.sh
The text was updated successfully, but these errors were encountered: