Skip to content

Best way to mount /var/shm in the sandbox? #30

@emtenet

Description

@emtenet

My pkg_comp build system has been unable to build the erlang package since Erlang 24.

Erlang 24 introduced a JIT-compiler and uses that compiler during it's build process. The JIT-compiler implementation on NetBSD uses shm_open in virtmem.cpp. For erlang to build it needs a working shm_open setup, namely a correctly mounted /var/shm mount.

By default the sandbox prepared by pkg_comp does not have /var/shm mounted, hence the build fails.

My work around at the moment is the following hook inside sandbox.conf:

pkg_comp_post_mount_hook() {
        mount -t tmpfs -o rw -o -m1777 -o -sram%10 tmpfs /var/pkg_comp/sandbox/var/shm
        true
}

Is that the best way to mount /var/shm inside the sandbox? Could an option be added to pkg_comp as an alternative to the custom hook above?

NOTE: I have also submitted this as pkg/57158 becuase it may affect other packages & build systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions