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

Problems compiling btcdeb tools into JavaScript using emscripten. #137

Open
FabianSommerfeld opened this issue Oct 29, 2023 · 1 comment

Comments

@FabianSommerfeld
Copy link


SYSTEM DATA

  • Microsoft Windows 11 Home
  • I am using Ubuntu-22.04 via windows subsystem for linux

ISSUE

I have issues running the command:

for i in btcdeb btcc tap; do mv $i $i.bc && emcc -O2 $i.bc libbitcoin.a -o $i.js; done

output:

mv: cannot stat 'btcdeb': No such file or directory
mv: cannot stat 'btcc': No such file or directory
mv: cannot stat 'tap': No such file or directory

If I just run

emcc -02 btcdeb.bc libbitcoin.a -o btcdeb.js

output:

cache:INFO: generating system asset: symbol_lists/11dce61098b2a912766c8bc2ee813c477c9b41f9.json... (this will be cached in "/mnt/c/Users/heise/btcdeb/emsdk/upstream/emscripten/cache/symbol_lists/11dce61098b2a912766c8bc2ee813c477c9b41f9.json" for subsequent builds)
cache:INFO:  - ok
wasm-ld: error: unknown file type: btcdeb.bc
emcc: error: '/mnt/c/Users/heise/btcdeb/emsdk/upstream/bin/wasm-ld -o btcdeb.wasm btcdeb.bc libbitcoin.a -L/mnt/c/Users/heise/btcdeb/emsdk/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten -lGL -lal -lhtml5 -lstubs-debug -lnoexit -lc-debug -ldlmalloc -lcompiler_rt -lc++-noexcept -lc++abi-debug-noexcept -lsockets -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr /tmp/tmpfxr17qdclibemscripten_js_symbols.so --strip-debug --export-if-defined=main --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=__start_em_lib_deps --export-if-defined=__stop_em_lib_deps --export-if-defined=__start_em_js --export-if-defined=__stop_em_js --export-if-defined=__main_argc_argv --export-if-defined=fflush --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_get_base --export=emscripten_stack_get_current --export=emscripten_stack_init --export=stackSave --export=stackRestore --export=stackAlloc --export=__errno_location --export=__get_temp_ret --export=__set_temp_ret --export=__wasm_call_ctors --export-table -z stack-size=65536 --initial-memory=16777216 --max-memory=16777216 --no-entry --stack-first --table-base=1' failed (returned 1)
@FabianSommerfeld FabianSommerfeld changed the title Problems compileing btcdeb tools into JavaScript using emscripten. Problems compiling btcdeb tools into JavaScript using emscripten. Oct 29, 2023
@kallewoof
Copy link
Contributor

This is probably related to #104. Unfortunately I don't have the resources to look into this on my own right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants