Coder Social home page Coder Social logo

Compiling for the Web? about sm64ex HOT 17 CLOSED

sm64pc avatar sm64pc commented on September 4, 2024
Compiling for the Web?

from sm64ex.

Comments (17)

Redlolz avatar Redlolz commented on September 4, 2024 2

I have the exact same issue, when I execute make TARGET_WEB=1 it spits out a bunch of permission errors about creating directories in /

$ make TARGET_WEB=1
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/actors’: Permission denied (This line is repeated 129 times)
mkdir: cannot create directory ‘/textures’: Permission denied
mkdir: cannot create directory ‘/text’: Permission denied
mkdir: cannot create directory ‘/include’: Permission denied
mkdir: cannot create directory ‘/us’: Permission denied
mkdir: cannot create directory ‘/sequences’: Permission denied
cpp -P  -I . -o /level_rules.mk levels/level_rules.mk
cc1: fatal error: opening output file /level_rules.mk: Permission denied
compilation terminated.
Makefile.split:152: /level_rules.mk: No such file or directory
make: *** [Makefile.split:151: /level_rules.mk] Error 1

I installed the required packages and emsdk (via the AUR)
Like @dannyhpy I'm also on Arch Linux.

from sm64ex.

vrmiguel avatar vrmiguel commented on September 4, 2024 1

im having the same errors
there has to be a variable that specifies it to make in this directory

Indeed it is, it's a TARGET_WEB-related problem with the latest Makefile. We're trying to fix that ASAP.

from sm64ex.

Redlolz avatar Redlolz commented on September 4, 2024 1

@dannyhpy Install the package using emsdk install latest and activate it with emsdk activate latest.

from sm64ex.

narukeh avatar narukeh commented on September 4, 2024 1

emsdk install latest :

Fetching emscripten-releases repository...
Traceback (most recent call last):
  File "./emsdk.py", line 3157, in <module>
    sys.exit(main())
  File "./emsdk.py", line 2854, in main
    fetch_emscripten_tags()
  File "./emsdk.py", line 2152, in fetch_emscripten_tags
    emscripten_releases_tot = get_emscripten_releases_tot()
  File "./emsdk.py", line 2100, in get_emscripten_releases_tot
    git_clone_checkout_and_pull(emscripten_releases_repo, sdk_path('releases'), 'master')
  File "./emsdk.py", line 809, in git_clone_checkout_and_pull
    success = git_clone(url, dstpath)
  File "./emsdk.py", line 772, in git_clone
    mkdir_p(dstpath)
  File "./emsdk.py", line 465, in mkdir_p
    os.makedirs(path)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/lib/emsdk/releases'

from sm64ex.

narukeh avatar narukeh commented on September 4, 2024 1

@dannyhpy side note, update the package i made, i have made a fix for the XDG, i modified your suggestion. so remove your alis in your .bashrc or it will run in a tripple shell.

from sm64ex.

dannyhpy avatar dannyhpy commented on September 4, 2024

I'm unable to compile it for Windows either

EDIT: #19

from sm64ex.

narukeh avatar narukeh commented on September 4, 2024

im having the same errors
there has to be a variable that specifies it to make in this directory

from sm64ex.

vrmiguel avatar vrmiguel commented on September 4, 2024

Hey, @dannyhpy, @narukeh and @Redlolz , please try the latest Makefile on master and report your results.

Related commit: a0068c7

from sm64ex.

dannyhpy avatar dannyhpy commented on September 4, 2024

I have an unrelated error:
make: emcc: No files or folders of this type (approximative translation)

I have installed emsdk from the AUR and it provides the emsdk binary
but not the emcc one

from sm64ex.

dannyhpy avatar dannyhpy commented on September 4, 2024

@narukeh Run this as root?

from sm64ex.

narukeh avatar narukeh commented on September 4, 2024

@dannyhpy 😅 yeah its loading

from sm64ex.

vrmiguel avatar vrmiguel commented on September 4, 2024

Sure thing, but not to stray from the issue topic, did you guys test the new Makefile?

@dannyhpy @narukeh @Redlolz

from sm64ex.

dannyhpy avatar dannyhpy commented on September 4, 2024

It's compiling at the moment, it seems to work

from sm64ex.

narukeh avatar narukeh commented on September 4, 2024

@vrmiguel @dannyhpy i did not get to that stage yet, i have errors:

$ sudo emsdk install latest && sudo emsdk activate latest
[sudo] password for fean:
Fetching emscripten-releases repository...
Repository 'https://chromium.googlesource.com/emscripten-releases' already cloned to directory '/usr/lib/emsdk/releases', skipping.
Fetching latest changes to the branch 'master' for '/usr/lib/emsdk/releases'...
Already up to date.
Successfully updated and checked out branch 'master' on repository '/usr/lib/emsdk/releases'
Current repository version: "Sun, 10 May 2020 14:32:49 +0000 58eb3389d82773ef561e6cfd0837417eced63888"
Installing SDK 'sdk-releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit'..
Skipped installing node-12.9.1-64bit, already installed.
Skipped installing releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit, already installed.
Running post-install step: npm ci ...
Done running: npm ci
Done installing SDK 'sdk-releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit'.
Writing .emscripten configuration file to user home directory /root/
The Emscripten configuration file /root/.emscripten has been rewritten with the following contents:

NODE_JS = '/usr/lib/emsdk/node/12.9.1_64bit/bin/node'
LLVM_ROOT = '/usr/lib/emsdk/upstream/bin'
BINARYEN_ROOT = '/usr/lib/emsdk/upstream'
EMSCRIPTEN_ROOT = '/usr/lib/emsdk/upstream/emscripten'
TEMP_DIR = '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]

To conveniently access the selected set of tools from the command line, consider adding the following directories to PATH, or call 'source ./emsdk_env.sh' to do this for you.

   /usr/lib/emsdk:/usr/lib/emsdk/node/12.9.1_64bit/bin:/usr/lib/emsdk/upstream/emscripten

Set the following tools as active:
   node-12.9.1-64bit
   releases-upstream-7b3cd38017f7c582cfa3ac24a9f12aa6a8dca51f-64bit

[fean ~/temp/sm64pc]
$ make TARGET_WEB=1
make: emcc: No such file or directory
make: *** [Makefile:733: build/us_web/src/engine/behavior_script.o] Error 127
$ make TARGET_WEB=1
make: emcc: No such file or directory
make: *** [Makefile:733: build/us_web/src/engine/behavior_script.o] Error 127
```

from sm64ex.

dannyhpy avatar dannyhpy commented on September 4, 2024

Adding the new installed tools to your path should make it work

export PATH=$PATH:/usr/lib/emsdk:/usr/lib/emsdk/node/12.9.1_64bit/bin:/usr/lib/emsdk/upstream/emscripten

And, it's still compiling on my end

from sm64ex.

Redlolz avatar Redlolz commented on September 4, 2024

I'm getting a bunch of errors about an argument

clang-10: error: unknown argument: '-fignore-exceptions'
emcc: error: '/sbin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=13 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/home/robin/.emscripten_cache/wasm/include -c -I/home/robin/.emscripten_cache/wasm/include/SDL2 -O2 -DUSING_GENERATED_CONFIG_H -w -DEMSCRIPTEN -fignore-exceptions /home/robin/.emscripten_ports/sdl2/SDL2-version_20/src/thread/generic/SDL_systls.c -Xclang -isystem/usr/lib/emsdk/upstream/emscripten/system/include/SDL -c -o /home/robin/.emscripten_cache/wasm/ports-builds/sdl2/src/thread/generic/SDL_systls.c.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 89, in run_one_command
    shared.run_process(cmd, stdout=stdout, stderr=stderr, env=safe_env)
  File "/usr/lib/emsdk/upstream/emscripten/tools/shared.py", line 189, in run_process
    ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/sbin/python3', '/usr/lib/emsdk/upstream/emscripten/emcc.py', '-c', '/home/robin/.emscripten_ports/sdl2/SDL2-version_20/src/SDL_dataqueue.c', '-o', '/home/robin/.emscripten_cache/wasm/ports-builds/sdl2/src/SDL_dataqueue.c.o', '-I/home/robin/.emscripten_cache/wasm/include/SDL2', '-O2', '-DUSING_GENERATED_CONFIG_H', '-w']' returned non-zero exit status 1.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/emsdk/upstream/emscripten/emcc.py", line 3982, in <module>
    sys.exit(run(sys.argv))
  File "/usr/lib/emsdk/upstream/emscripten/emcc.py", line 2118, in run
    cmd = get_clang_command(input_files)
  File "/usr/lib/emsdk/upstream/emscripten/emcc.py", line 2112, in get_clang_command
    args = system_libs.process_args(args, shared.Settings)
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 1958, in process_args
    args = port.process_args(Ports, args, settings, shared)
  File "/usr/lib/emsdk/upstream/emscripten/tools/ports/sdl2.py", line 98, in process_args
    get(ports, settings, shared)
  File "/usr/lib/emsdk/upstream/emscripten/tools/ports/sdl2.py", line 84, in get
    return [shared.Cache.get(libname, create, what='port')]
  File "/usr/lib/emsdk/upstream/emscripten/tools/cache.py", line 131, in get
    temp = creator()
  File "/usr/lib/emsdk/upstream/emscripten/tools/ports/sdl2.py", line 79, in create
    ports.run_commands(commands)
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 1753, in run_commands
    run_build_commands([add_args(c) for c in commands])
  File "/usr/lib/emsdk/upstream/emscripten/tools/system_libs.py", line 103, in run_build_commands
    pool.map_async(run_one_command, commands, chunksize=1).get(999999)
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 768, in get
    raise self._value
subprocess.CalledProcessError: Command '['/sbin/python3', '/usr/lib/emsdk/upstream/emscripten/emcc.py', '-c', '/home/robin/.emscripten_ports/sdl2/SDL2-version_20/src/SDL_dataqueue.c', '-o', '/home/robin/.emscripten_cache/wasm/ports-builds/sdl2/src/SDL_dataqueue.c.o', '-I/home/robin/.emscripten_cache/wasm/include/SDL2', '-O2', '-DUSING_GENERATED_CONFIG_H', '-w']' returned non-zero exit status 1.
make: *** [Makefile:733: build/us_web/src/engine/behavior_script.o] Error 1

from sm64ex.

dannyhpy avatar dannyhpy commented on September 4, 2024

It worked @vrmiguel! Thanks for your edit

from sm64ex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.