fdk-aac.js
fdk-aac.js copied to clipboard
Build fails with error "unknown file type: build/fdk-aac/.libs/aac-enc.bc"
Hi,
I'm trying to build the library from sources using the latest fdk-acc, but have encountered an error.
- I clone
fdk-aac.js
andfdk-aac
into/build
. - run
make
command infdk-aac.js
* - On building
aac-enc.js
it fails with error:
mbp-pawel:fdk-aac.js pawel$ make
emcc build/fdk-aac/.libs/aac-enc.bc build/fdk-aac/.libs/libfdk-aac.a \
--closure 1 -O3 \
-s INVOKE_RUN=0 \
-s EXPORT_ALL=1 \
--pre-js build/pre.js \
--post-js build/post.js \
-o aac-enc.js
shared:INFO: (Emscripten: Running sanity checks)
wasm-ld: error: unknown file type: build/fdk-aac/.libs/aac-enc.bc
emcc: error: '/Users/pawel/Projects/emsdk/upstream/bin/wasm-ld -o aac-enc.wasm build/fdk-aac/.libs/aac-enc.bc build/fdk-aac/.libs/libfdk-aac.a -L/Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libgl.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libal.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libhtml5.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libc.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libcompiler_rt.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libc++-noexcept.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libc++abi-noexcept.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libdlmalloc.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libc_rt_wasm.a /Users/pawel/Projects/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten/libsockets.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --lto-legacy-pass-manager --allow-undefined --strip-debug --export main --export stackSave --export stackRestore --export stackAlloc --export __wasm_call_ctors --export __errno_location --export-table --export __start_em_asm --export __stop_em_asm -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=16777216 --global-base=1024' failed (1)
make: *** [aac-enc.js] Error 1
File pointed in error (build/fdk-aac/.libs/aac-enc.bc) exists and seems ok.
@salomvary Do you maybe have an idea the error might be due to emscripten config, fdk-aac build or something else? I'm using latest emsdk (2.0.15).
*(I think the fdk-aac.js Makefile has a typo – it lacks " \ " at the end of the line 21).
Any help much appreciated 😉
I have not used Emscripten since publishing this, no idea what might have gone wrong. You can try using an older Emscripten version, something from around the time when I created this. If that succeeds, please let me know so that I can document it on the repo.
Fixed the Makefile typo, thanks!
And should @pawelkaczmarek also use the lib fdk-aac version which you used to build this with? (since he pointed out using the latest one now...? 🤔 )
@tchakabam Good point. Also, pull requests to upgrading either fdk-aac or Emscripten or both are welcome!
@salomvary what version of Emscripten did you use? I got the same problem.
@salomvary what version of Emscripten did you use? I got the same problem.
No idea, probably whatever the latest was when I did these things :)
ok, that's the version 4 years ago.
ok, that's the version 4 years ago.
Yep, something like that.
Finally, I figured it out. This PR will work with the latest Emscripten.