Skip to content

Cross builds: distinguish between installation prefix and host prefix in configure.ac? #124932

Closed

Description

@hoodmane

In Emscripten and wasi builds, and presumably for other cross builds, the build file system and the host file system look different. It's natural to want to install into cross-build/$TARGET/lib and then mount that as /lib in the host file system. wasi.py has to mess around with setting PYTHONPATH because prefix is set to a path from the build machine. I think it would simplify this if we distinguish between

  • prefix -- the path in the build file system where we want to install the files
  • host_prefix -- the path in the host file system where getpath.c will look for the files

And similarly for exec_prefix and host_exec_prefix.

cc @brettcannon @freakboy3742

Linked PRs

Activity

  1. added a commit that references this issue on Oct 3, 2024
  2. brettcannon commented on Oct 3, 2024

    @brettcannon
    Member

    In regards to the wasi.py reference:

    cpython/Tools/wasm/wasi.py

    Lines 222 to 228 in 1f9025a

    # Use PYTHONPATH to include sysconfig data which must be anchored to the
    # WASI guest's `/` directory.
    args = {"GUEST_DIR": "/",
    "HOST_DIR": CHECKOUT,
    "ENV_VAR_NAME": "PYTHONPATH",
    "ENV_VAR_VALUE": f"/{sysconfig_data}",
    "PYTHON_WASM": working_dir / "python.wasm"}

  3. added
    buildThe build process and cross-build
    on Oct 3, 2024
  4. added a commit that references this issue on Oct 9, 2024
  5. removed their assignment
    on Oct 9, 2024
  6. brettcannon commented on Oct 9, 2024

    @brettcannon
    Member

    This has been deemed Emscripten-specific over in the PR.

  7. added a commit that references this issue on Oct 10, 2024
  8. added 2 commits that reference this issue on Oct 25, 2024
  9. added a commit that references this issue on Oct 29, 2024
  10. hoodmane commented on Nov 11, 2024

    @hoodmane
    ContributorAuthor

    Resolved by #124933

  11. added a commit that references this issue on Dec 8, 2024
  12. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions