salomvary / fdk-aac.js

Port of Fraunhofer FDK AAC with Emscripten
27 stars 7 forks source link

Build fails with error "unknown file type: build/fdk-aac/.libs/aac-enc.bc" #1

Open pawelkaczmarek opened 3 years ago

pawelkaczmarek commented 3 years ago

Hi,

I'm trying to build the library from sources using the latest fdk-acc, but have encountered an error.

  1. I clone fdk-aac.js and fdk-aac into /build.
  2. run make command in fdk-aac.js*
  3. 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 😉

salomvary commented 3 years ago

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!

tchakabam commented 3 years ago

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...? 🤔 )

salomvary commented 3 years ago

@tchakabam Good point. Also, pull requests to upgrading either fdk-aac or Emscripten or both are welcome!

jiyeyuran commented 2 years ago

@salomvary what version of Emscripten did you use? I got the same problem.

salomvary commented 2 years ago

@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 :)

jiyeyuran commented 2 years ago

ok, that's the version 4 years ago.

salomvary commented 2 years ago

ok, that's the version 4 years ago.

Yep, something like that.

jiyeyuran commented 2 years ago

Finally, I figured it out. This PR will work with the latest Emscripten.