-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fix {cachdir} typo in error message #22860
Conversation
benoit-pierre
commented
Nov 6, 2024
And it's not expanded either… And why is emscripten trying to create said directory in |
``` emcc: error: unable to create cache directory "{cachdir}": parent directory not writable (see https://emscripten.org/docs/tools_reference/emcc.html for info on setting the cache directory) ```
d65f379
to
015c7b3
Compare
It looks like somehow you have a copy of emscripten in Can you attach the output of your emcc command with |
I'm on Arch Linux, using the official package ( ▸ EMCC_DEBUG=1 emcc
config:DEBUG: using config file: /usr/lib/emscripten/.emscripten
tools.filelock:DEBUG: Attempting to acquire lock 130620270418768 on /tmp/emscripten_temp/emscripten.lock
tools.filelock:DEBUG: Lock 130620270418768 acquired on /tmp/emscripten_temp/emscripten.lock
profiler:DEBUG: block "read_ports" took 0.014 seconds
emcc:WARNING: invocation: /usr/lib/emscripten/emcc.py (in /home/bpierre)
profiler:DEBUG: block "parse arguments" took 0.000 seconds
emcc: error: unable to create cache directory "{cachdir}": parent directory not writable (see https://emscripten.org/docs/tools_reference/emcc.html for info on setting the cache directory)
profiler:DEBUG: block "check_sanity" raised an exception after 0.000 seconds
profiler:DEBUG: block "main" raised an exception after 0.000 seconds
tools.filelock:DEBUG: Attempting to release lock 130620270418768 on /tmp/emscripten_temp/emscripten.lock
tools.filelock:DEBUG: Lock 130620270418768 released on /tmp/emscripten_temp/emscripten.lock
▸ cat /usr/lib/emscripten/.emscripten
NODE_JS = '/usr/bin/node'
LLVM_ROOT = '/opt/emscripten-llvm/bin'
BINARYEN_ROOT = '/usr'
EMSCRIPTEN_ROOT = '/usr/lib/emscripten'
▸ cat /etc/profile.d/emscripten.sh
#!/bin/sh
export PATH=$PATH:/usr/lib/emscripten For now I've resorted to setting |
No issue when downgrading to |
Ah I see. Yes the problem is that Which distro are you using? We should suggest that they add an explicit an |
Arch Linux. |
Thanks. We should reach out to the maintainers of the arch linux emscripten package to let them know they need to update the config file. |
Ah it looks like that is @svenstaro |
What's the upstream recommendation for this case? Should we set |
We tend to recommend/use a single shared sysroot (cache) and the recommended location is inside the emscripten directory itself. Obviously that doesn't work if the emscripten location is not writable, as in this case. One problem with using $HOME/$XDG is that if a user is wanting to switch between mulutple versions of emscripten then the cache becoming invlidated and is cleared each time they switch (which is why I tent to prefer / recommend a separate cache dir alongside (inside) each version of emscripten). Having said all that, the XDG cache directory seems like the best we can do in your case I think. One alternative is to use a read-only cache that only |
Can I somehow prepopulate that during build time? That would be ideal! |
You can yes, however there are a lot of possible variants of system libraries and you might not want to include them all. The tool to populate the case is called |
I guess you could also package those libraries as separate packages? In any case, once you then set |