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

Building doesn't work. #50

Open
scyilk opened this issue Nov 11, 2023 · 1 comment
Open

Building doesn't work. #50

scyilk opened this issue Nov 11, 2023 · 1 comment

Comments

@scyilk
Copy link

scyilk commented Nov 11, 2023

@erenerturk1 ➜ /workspaces/game-dumps (main) $ cd emulators/gbaninja/
@erenerturk1 ➜ /workspaces/game-dumps/emulators/gbaninja (master) $ ls
CMakeLists.txt  Saves.js     build.js      emsdk-3.1.48     logo.psd           po                   sw.js
CMakeScripts    Sound.js     data          emuEntry.js      logoPixelated.png  project              webpack.config.js
Graphics.js     UI.js        dependencies  fex              node_modules       romCodeToEnglish.js
Input.js        appEntry.js  doc           gameDb.xml       package-lock.json  saveAs.js
README.md       build        embed.md      gameDbLoader.js  package.json       src
@erenerturk1 ➜ /workspaces/game-dumps/emulators/gbaninja (master) $ rm -fr emsdk-3.1.48/
@erenerturk1 ➜ /workspaces/game-dumps/emulators/gbaninja (master) $ git add submodule git clone https://github.com/emscripten-core/emsdk.git
fatal: pathspec 'submodule' did not match any files
@erenerturk1 ➜ /workspaces/game-dumps/emulators/gbaninja (master) $ git submodule add https://github.com/emscripten-core/ems
dk.git emsdk
Cloning into '/workspaces/game-dumps/emulators/gbaninja/emsdk'...
remote: Enumerating objects: 3830, done.
remote: Counting objects: 100% (817/817), done.
remote: Compressing objects: 100% (106/106), done.
remote: Total 3830 (delta 755), reused 726 (delta 711), pack-reused 3013
Receiving objects: 100% (3830/3830), 2.21 MiB | 18.41 MiB/s, done.
Resolving deltas: 100% (2529/2529), done.
@erenerturk1 ➜ /workspaces/game-dumps/emulators/gbaninja (master) $ cd emsdk
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ ./emsdk install latest
ctive" for the current user. (writes .emscripten file)
./emsdk activate latestResolving SDK alias 'latest' to '3.1.48'
Resolving SDK version '3.1.48' to 'sdk-releases-694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-64bit'
Installing SDK 'sdk-releases-694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-64bit'..
Installing tool 'node-16.20.0-64bit'..
Downloading: /workspaces/game-dumps/emulators/gbaninja/emsdk/downloads/node-v16.20.0-linux-x64.tar.xz from https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v16.20.0-linux-x64.tar.xz, 22559772 Bytes
Unpacking '/workspaces/game-dumps/emulators/gbaninja/emsdk/downloads/node-v16.20.0-linux-x64.tar.xz' to '/workspaces/game-dumps/emulators/gbaninja/emsdk/node/16.20.0_64bit'
Done installing tool 'node-16.20.0-64bit'.
Installing tool 'releases-694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-64bit'..
Downloading: /workspaces/game-dumps/emulators/gbaninja/emsdk/downloads/694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-wasm-binaries.tar.xz from https://storage.googleapis.com/webassembly/emscripten-releases-builds/linux/694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc/wasm-binaries.tar.xz, 265441656 Bytes
Unpacking '/workspaces/game-dumps/emulators/gbaninja/emsdk/downloads/694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-wasm-binaries.tar.xz' to '/workspaces/game-dumps/emulators/gbaninja/emsdk/upstream'
Done installing tool 'releases-694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-64bit'.
Done installing SDK 'sdk-releases-694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-64bit'.
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ 
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ # Make the "latest" SDK "active" for the current user. (writes .emscripten file)
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ ./emsdk activate latest
Resolving SDK alias 'latest' to '3.1.48'
Resolving SDK version '3.1.48' to 'sdk-releases-694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-64bit'
Setting the following tools as active:
   node-16.20.0-64bit
   releases-694434b6d47c5f6eff2c8fbd9eeb016c977ae9dc-64bit

Next steps:
- To conveniently access emsdk tools from the command line,
  consider adding the following directories to your PATH:
    /workspaces/game-dumps/emulators/gbaninja/emsdk
    /workspaces/game-dumps/emulators/gbaninja/emsdk/upstream/emscripten
- This can be done for the current shell by running:
    source "/workspaces/game-dumps/emulators/gbaninja/emsdk/emsdk_env.sh"
- Configure emsdk in your shell startup scripts by running:
    echo 'source "/workspaces/game-dumps/emulators/gbaninja/emsdk/emsdk_env.sh"' >> $HOME/.bash_profile
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ source "/workspaces/game-dumps/emulators/gbaninja/emsdk/emsdk_env.sh"
Setting up EMSDK environment (suppress these messages with EMSDK_QUIET=1)
Adding directories to PATH:
PATH += /workspaces/game-dumps/emulators/gbaninja/emsdk
PATH += /workspaces/game-dumps/emulators/gbaninja/emsdk/upstream/emscripten

Setting environment variables:
PATH = /workspaces/game-dumps/emulators/gbaninja/emsdk:/workspaces/game-dumps/emulators/gbaninja/emsdk/upstream/emscripten:/usr/local/rvm/gems/ruby-3.2.2/bin:/usr/local/rvm/gems/ruby-3.2.2@global/bin:/usr/local/rvm/rubies/ruby-3.2.2/bin:/vscode/bin/linux-x64/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/bin/remote-cli:/home/codespace/.local/bin:/home/codespace/.dotnet:/home/codespace/nvm/current/bin:/home/codespace/.php/current/bin:/home/codespace/.python/current/bin:/home/codespace/java/current/bin:/home/codespace/.ruby/current/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/oryx:/usr/local/go/bin:/go/bin:/usr/local/sdkman/bin:/usr/local/sdkman/candidates/java/current/bin:/usr/local/sdkman/candidates/gradle/current/bin:/usr/local/sdkman/candidates/maven/current/bin:/usr/local/sdkman/candidates/ant/current/bin:/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:/usr/local/share/rbenv/bin:/usr/local/php/current/bin:/opt/conda/bin:/usr/local/nvs:/usr/local/share/nvm/versions/node/v20.8.1/bin:/usr/local/hugo/bin:/usr/local/dotnet/current:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/bin
EMSDK = /workspaces/game-dumps/emulators/gbaninja/emsdk
EMSDK_NODE = /workspaces/game-dumps/emulators/gbaninja/emsdk/node/16.20.0_64bit/bin/node
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ node build --opt
node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module '/workspaces/game-dumps/emulators/gbaninja/emsdk/build'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.8.1
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ npm install
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'upath@1.0.4',
npm WARN EBADENGINE   required: { node: '>=4 <=9' },
npm WARN EBADENGINE   current: { node: 'v20.8.1', npm: '10.1.0' }
npm WARN EBADENGINE }

up to date, audited 890 packages in 14s

62 vulnerabilities (3 low, 11 moderate, 32 high, 16 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ node build --opt
node:internal/modules/cjs/loader:1051
  throw err;
  ^

Error: Cannot find module '/workspaces/game-dumps/emulators/gbaninja/emsdk/build'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
    at Module._load (node:internal/modules/cjs/loader:901:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.8.1
@erenerturk1 ➜ .../game-dumps/emulators/gbaninja/emsdk (main) $ cd ..
@erenerturk1 ➜ /workspaces/game-dumps/emulators/gbaninja (master) $ node build --opt
emcc --memory-init-file 0 -Werror --closure 1 -O3 -DC_CORE -DNO_PNG -DNO_LINK -DNO_DEBUGGER -DFINAL_BUILD -DFINAL_VERSION -s MODULARIZE=1 -s EXPORT_NAME="'gbaninja'" -s NO_FILESYSTEM=1 -s NO_EXIT_RUNTIME=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s TOTAL_MEMORY=83886080 ./src/emscripten/VBA.cpp ./src/emscripten/EmscriptenSoundDriver.cpp ./src/Util.cpp ./src/common/ConfigManager.cpp ./src/apu/Blip_Buffer.cpp ./src/apu/Effects_Buffer.cpp ./src/apu/Gb_Apu.cpp ./src/apu/Gb_Apu_State.cpp ./src/apu/Gb_Oscs.cpp ./src/apu/Multi_Buffer.cpp ./src/gba/bios.cpp ./src/gba/EEprom.cpp ./src/gba/Flash.cpp ./src/gba/GBA.cpp ./src/gba/GBA-arm.cpp ./src/gba/GBA-thumb.cpp ./src/gba/GBAGfx.cpp ./src/gba/GBALink.cpp ./src/gba/GBASockClient.cpp ./src/gba/Globals.cpp ./src/gba/Mode0.cpp ./src/gba/Mode1.cpp ./src/gba/Mode2.cpp ./src/gba/Mode3.cpp ./src/gba/Mode4.cpp ./src/gba/Mode5.cpp ./src/gba/RTC.cpp ./src/gba/Sound.cpp ./src/gba/Sram.cpp ./src/gba/ereader.cpp ./src/gba/agbprint.cpp -o ./build/emu.js
shared:INFO: (Emscripten: Running sanity checks)
emcc: error: EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated] [-Werror]
node:child_process:965
    throw err;
    ^

Error: Command failed: emcc --memory-init-file 0 -Werror --closure 1 -O3 -DC_CORE -DNO_PNG -DNO_LINK -DNO_DEBUGGER -DFINAL_BUILD -DFINAL_VERSION -s MODULARIZE=1 -s EXPORT_NAME="'gbaninja'" -s NO_FILESYSTEM=1 -s NO_EXIT_RUNTIME=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']" -s TOTAL_MEMORY=83886080 ./src/emscripten/VBA.cpp ./src/emscripten/EmscriptenSoundDriver.cpp ./src/Util.cpp ./src/common/ConfigManager.cpp ./src/apu/Blip_Buffer.cpp ./src/apu/Effects_Buffer.cpp ./src/apu/Gb_Apu.cpp ./src/apu/Gb_Apu_State.cpp ./src/apu/Gb_Oscs.cpp ./src/apu/Multi_Buffer.cpp ./src/gba/bios.cpp ./src/gba/EEprom.cpp ./src/gba/Flash.cpp ./src/gba/GBA.cpp ./src/gba/GBA-arm.cpp ./src/gba/GBA-thumb.cpp ./src/gba/GBAGfx.cpp ./src/gba/GBALink.cpp ./src/gba/GBASockClient.cpp ./src/gba/Globals.cpp ./src/gba/Mode0.cpp ./src/gba/Mode1.cpp ./src/gba/Mode2.cpp ./src/gba/Mode3.cpp ./src/gba/Mode4.cpp ./src/gba/Mode5.cpp ./src/gba/RTC.cpp ./src/gba/Sound.cpp ./src/gba/Sram.cpp ./src/gba/ereader.cpp ./src/gba/agbprint.cpp -o ./build/emu.js
shared:INFO: (Emscripten: Running sanity checks)
emcc: error: EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated] [-Werror]

    at checkExecSyncError (node:child_process:890:11)
    at Object.execSync (node:child_process:962:15)
    at /workspaces/game-dumps/emulators/gbaninja/build.js:83:30
    at Object.<anonymous> (/workspaces/game-dumps/emulators/gbaninja/build.js:86:2)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) {
  status: 1,
  signal: null,
  output: [
    null,
    Buffer(0) [Uint8Array] [],
    Buffer(177) [Uint8Array] [
      115, 104,  97, 114, 101, 100,  58,  73,  78,  70,  79,  58,
       32,  40,  69, 109, 115,  99, 114, 105, 112, 116, 101, 110,
       58,  32,  82, 117, 110, 110, 105, 110, 103,  32, 115,  97,
      110, 105, 116, 121,  32,  99, 104, 101,  99, 107, 115,  41,
       10, 101, 109,  99,  99,  58,  32, 101, 114, 114, 111, 114,
       58,  32,  69,  88,  84,  82,  65,  95,  69,  88,  80,  79,
       82,  84,  69,  68,  95,  82,  85,  78,  84,  73,  77,  69,
       95,  77,  69,  84,  72,  79,  68,  83,  32, 105, 115,  32,
      100, 101, 112, 114,
      ... 77 more items
    ]
  ],
  pid: 12438,
  stdout: Buffer(0) [Uint8Array] [],
  stderr: Buffer(177) [Uint8Array] [
    115, 104,  97, 114, 101, 100,  58,  73,  78,  70,  79,  58,
     32,  40,  69, 109, 115,  99, 114, 105, 112, 116, 101, 110,
     58,  32,  82, 117, 110, 110, 105, 110, 103,  32, 115,  97,
    110, 105, 116, 121,  32,  99, 104, 101,  99, 107, 115,  41,
     10, 101, 109,  99,  99,  58,  32, 101, 114, 114, 111, 114,
     58,  32,  69,  88,  84,  82,  65,  95,  69,  88,  80,  79,
     82,  84,  69,  68,  95,  82,  85,  78,  84,  73,  77,  69,
     95,  77,  69,  84,  72,  79,  68,  83,  32, 105, 115,  32,
    100, 101, 112, 114,
    ... 77 more items
  ]
}

Node.js v20.8.1
@erenerturk1 ➜ /workspaces/game-dumps/emulators/gbaninja (master) $ 

pasted here: https://00.yt/34
Why does this happen, is there another way to build?
I noticed that it is a deprecation error, so maybe emsdk can be downgraded?
I'm not that experienced with emscripten, all I want to do is embed this on to my site but host it myself so as to not rely on a 3rd-party.

@Zelif
Copy link

Zelif commented Nov 20, 2023

I have updated the project on my branch if you wish to pull that down and give that a try.
It should run with the latest emscripten package, I had renamed the deprecated ccall flag to reflect the current emscripten build.

Some of those other errors are not something I have come across, I am using node v16.15.1, unsure if that has anything but first try pull down my changes and see if that works:
#42
#48

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

No branches or pull requests

2 participants