I started to use Linux Mint on my VM, however it seems like it uses a different channel for packages, which means I get some outdated packages such as D compilers, which makes me unable to compile my programs.

While the D compilers have some userspace installer scripts, they’re userspace only, meaning they need initialization scripts, which only work until the end of the given shell instance, which makes it particularly hard to use in certain contexts.

Is there some “untested” or similar branch to get some newer stuff? The compilers don’t seem to interfere with anything system level, so it should be fine.

  • tal
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    7 months ago

    I don’t use Mint, dunno whether they maintain an unstable package repository or whatever.

    If you can build your compiler yourself, you can either install it systemwide without it being packaged (preferably in /opt, if it can be installed there, or /usr/local) or, if it can be run that way, right out of the build directory.

    While the D compilers have some userspace installer scripts, they’re userspace only, meaning they need initialization scripts, which only work until the end of the given shell instance, which makes it particularly hard to use in certain contexts.

    I don’t know what this means.

    Normally, “userspace” is used not to refer to things that run without being installed systemwide, but to software that runs outside the kernel.

    If you mean that you’re doing something like:

    $ source setupscript.sh
    

    Or:

    $ . setupscript.sh
    

    …where setupscript.sh is whatever the D compiler docs are telling you to run…

    And that sets up some kind of environment variables (like modifying the PATH environment variable to include the directory in question, so that you can type the command for your D compiler and your shell will search the directory containing the D compiler binaries), I’m sure that you can have that run at login time, but I don’t know how the display manager or whatever desktop environment (Cinnamon, MATE, or XFCE) you’re using is set up to run things at login.

    I’d try putting the commands to set up your environment in ~/.profile and see if that works after logging in.

    If not, I’d look into seeing how to source that at boot.

    According to this, Mint Cinnamon’s (if you’re using Cinnamon) default display manager is lightdm:

    https://forums.linuxmint.com/viewtopic.php?t=392137

    According to this, lightdm sources ~/.xprofile at login, but not ~/.profile. If that’s true, you can have that source ~/.profile:

    https://github.com/canonical/lightdm/issues/96

    So something like ~/.profile containing:

    source setupscript.sh
    

    And ~/.xprofile containing:

    source ~/.profile