3

I am trying to build according to the instructions given:

https://github.com/iotaledger/mam.client.js

There are a whole lot of other steps then just described there which mainly relate to building everything rust & emscripten. As far I got I have everything setup correctly (I can build the normal iotaledger/MAM rust project) and everything however.. when I build the iota-bindings I get errors! Totally unfortunate and I am even developing on windows. The problem is I am totally lost and the error is to generic to make a good google search to figure out what is wrong especially since I never used rust or emscripten before so here is the error:

 [218] ./iota-bindings/emscripten/src/main.rs 17.6 kB {0} [built] [failed] [1 error]
 [219] ./src/index.js 18.8 kB {0} [built]
 [462] (webpack)/buildin/module.js 517 bytes {0} [built]
 [537] ./src/encryption.js 2.45 kB {0} [built]
    + 533 hidden modules

ERROR in ./iota-bindings/emscripten/src/main.rs
Module build failed: Error: Command failed: cargo build --target=wasm32-unknown-emscripten --release
    Updating git repository `https://github.com/japaric/cty.git`
    Updating git repository `https://github.com/iotaledger/iota.rs.git`
    Updating git repository `https://github.com/iotaledger/MAM.git`
    Updating git repository `https://github.com/iotaledger/iota-bindings.git`
   Compiling iota-trytes v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling cty v0.1.5 (https://github.com/japaric/cty.git#4d8b2525)
   Compiling iota-curl v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-tmath v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-pascal v0.1.0 (https://github.com/iotaledger/MAM.git#413f0479)
   Compiling iota-bindings-shared v0.1.0 (https://github.com/iotaledger/iota-bindings.git#c382969e)
   Compiling iota-bindings-shared v0.1.0 (file:///C:/altos_git/IOTA/mam.client.js/iota-bindings/shared)
   Compiling iota-kerl v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-curl-cpu v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-sign v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-models v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-merkle v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-mam v0.1.0 (https://github.com/iotaledger/MAM.git#413f0479)
   Compiling iota-bindings v0.1.0 (https://github.com/iotaledger/iota.rs.git#56205e66)
   Compiling iota-mam-bindings v0.1.0 (https://github.com/iotaledger/MAM.git#413f0479)
   Compiling iota-bindings-rlib v0.1.0 (file:///C:/altos_git/IOTA/mam.client.js/iota-bindings/rlib)
   Compiling iota-bindings-emscripten v0.1.0 (file:///C:/altos_git/IOTA/mam.client.js/iota-bindings/emscripten)
warning: crate `IOTA` should have a snake case name such as `iota`
  |
  = note: #[warn(non_snake_case)] on by default

warning: unused attribute
   --> src/main.rs:6:1
    |
6   | / #[link_args = "-s EXPORTED_FUNCTIONS=[\
7   | | '_iota_ctrits_convert',\
8   | | '_iota_ctrits_ctrits_byte_length',\
9   | | '_iota_ctrits_ctrits_data',\
...   |
116 | | '_iota_mam_parse'\
117 | | ]"]
    | |___^
    |
    = note: #[warn(unused_attributes)] on by default

error: linking with `emcc.bat` failed: exit code: 1
  |
  = note: "cmd" "/c" "emcc.bat" "-s" "DISABLE_EXCEPTION_CATCHING=0" "-L" "C:\\Users\\olaf\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\wasm32-unknown-emscripten\\lib" "C:\\altos_git\\IOTA\\mam.client.js\\iota-bindings\\emscripten\\target\\wasm32-unknown-emscripten\\release\\deps\\IOTA.IOTA0-436aa6619a00d1c9daf597c710019f2e.rs.rcgu.o" "C:\\altos_git\\IOTA\\mam.client.js\\iota-bindings\\emscripten\\target\\wasm32-unknown-emscripten\\release\\deps\\IOTA.IOTA1-436aa6619a00d1c9daf597c710019f2e.rs.rcgu.o" "-o" "C:\\altos_git\\IOTA\\mam.client.js\\iota-bindings\\emscripten\\target\\wasm32-unknown-emscripten\\release\\deps\\IOTA.js" "-s" "EXPORTED_FUNCTIONS=[\"_main\",\"_iota_ctrits_convert\",\"_iota_ctrits_ctrits_from_bytes\",\"_iota_ctrits_ctrits_length\",\"_iota_ctrits_ctrit        ...........................k\',\'_iota_models_v2_tx_set_value\',\'_iota_models_v2_tx_signature_or_message\',\'_iota_models_v2_tx_tag\',\'_iota_models_v2_tx_timestamp\',\'_iota_models_v2_tx_trunk\',\'_iota_models_v2_tx_value\',\'_iota_sign_checksum\',\'_iota_sign_checksum_validate\',\'_iota_sign_iss_address\',\'_iota_sign_iss_digest_bundle_signature\',\'_iota_sign_iss_digest_key\',\'_iota_sign_iss_key\',\'_iota_sign_iss_signature\',\'_iota_sign_iss_subseed\',\'_iota_sign_iss_subseed_to_signature\',\'_iota_mam_create\',\'_iota_mam_parse\']" "-s" "BINARYEN=1" "-s" "ERROR_ON_UNDEFINED_SYMBOLS=1"
      = note: Traceback (most recent call last):
                File "C:\altos_git\emsdk\emscripten\1.37.15\\emcc", line 13, in <module>
                  emcc.run()
                File "C:\altos_git\emsdk\emscripten\1.37.15\emcc.py", line 880, in run
                  exec 'shared.Settings.' + key + ' = ' + value in globals(), locals()
                File "<string>", line 1, in <module>
              NameError: name '_main' is not defined


    error: aborting due to previous error

    error: Could not compile `iota-bindings-emscripten`.

    To learn more, run the command again with --verbose.

        at ChildProcess.exithandler (child_process.js:275:12)
        at emitTwo (events.js:126:13)
        at ChildProcess.emit (events.js:214:7)
        at maybeClose (internal/child_process.js:925:16)
        at Socket.stream.socket.on (internal/child_process.js:346:11)
        at emitOne (events.js:116:13)
        at Socket.emit (events.js:211:7)
        at Pipe._handle.close [as _onclose] (net.js:554:12)
     @ ./src/web.js 3:11-61

I hope someone can help me with this or at least give me a direction that doesn't include using another OS.

Greets

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.