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.

  • @mke
    link
    English
    4
    edit-2
    5 months ago

    I’d have to check to be sure, but “only works until the end of the given shell instance” sounds like a classic case of simply needing to update your environment setup (i.e. editing shell startup files, such as ~/.profile and the like). I believe the Arch wiki has a nice page explaining (at least) the basics of how this all works.

    Therefore, along with what @[email protected] said, I’d suggest seeking help with the D community, if possible. They may have experience helping users who faced the same issues as you the past.

    Finally, there are more sophisticated options should you need them. For example, distrobox for using another distro’s packages on your own. I really don’t think they’ll be necessary here, though, so I’m not going into detail immediately.

    Commenting on Thunder is a bit rough right now… so I’ll try to remember to add some links later, when I have a computer.

    • @ZILtoid1991OP
      link
      35 months ago

      I have installed them without the package manager, now I’m asking the community how do I edit the activation files that both LDC and DMD will act like they’re installed the normal way, especially since I don’t need to juggle between versions.

  • @[email protected]
    link
    fedilink
    English
    35 months ago

    Just add a repository with the updated packages and then update them. iirc Mint is Debian based? There’s probably an apt repo you can add.

    • @mke
      link
      English
      45 months ago

      Ubuntu based, yes. Completely slipped my mind. OP, if there is a repo, this is probably the easiest solution.

  • @[email protected]
    link
    fedilink
    English
    2
    edit-2
    5 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