Skip to content

run_python, run_python_compiler could readlink -f #27211

Description

@kapouer

Please include the following in your bug report:

Version of emscripten/emsdk:
6.0.1

Failing command line in full:
When installing to /usr/local/bin/emcc the emcc file created by create_entry_point,
it will fail, because it tries to find $0.py, which resolves to
/usr/local/bin/emcc.py, which doesn't exist.

Replacing by readlink -f $0 would make distributors life a bit easier.

Thanks for considering.

--- a/tools/maint/run_python.sh
+++ b/tools/maint/run_python.sh
@@ -30,4 +30,4 @@
   exit 1
 fi

-exec "$_EM_PY" -E "$0.py" "$@"
+exec "$_EM_PY" -E "$(readlink -f $0).py" "$@"
--- a/tools/maint/run_python_compiler.sh
+++ b/tools/maint/run_python_compiler.sh
@@ -31,7 +31,7 @@
 fi

 if [ -z "$_EMCC_CCACHE" ]; then
-  exec "$_EM_PY" -E "$0.py" "$@"
+  exec "$_EM_PY" -E "$(readlink -f $0).py" "$@"
 else
   unset _EMCC_CCACHE
   exec ccache "$0" "$@"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions