Are there any risks or disadvantages to building software from source, compared to installing a package? Can it mess with my system in any way?

I usually avoid it because I’ve found it to be a faff and often doesn’t work anyway but in a couple of cases it has been necessary.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    15 hours ago

    Like many have said, the main disadvantages are:

    • Any software installed outside of your package manager is difficult to uninstall or maintain.
    • Compilation time can be an annoyance.

    The main advantages are:

    • Removal of unused features.
    • CPU specific optimizations.

    If you’re interested in compiling your own software maybe consider using a distro whose package manager allows to compile stuff, Gentoo is the obvious choice, but Debian based distros can also do that.

    • neox_@sh.itjust.works
      link
      fedilink
      Français
      arrow-up
      1
      ·
      edit-2
      3 hours ago

      Using GNU Guix to build can solve the “difficult to install” issue and also help with dependency management, however compilation time can’t be avoided. Advantages remain, however, thanks to package transformation options!

    • thevoidzero@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      9 hours ago

      Arch also kinda allows that if you write custom PKGBUILD file. It’s easy to write for simple stuffs that are based on make/cargo etc.

      It’s time consuming if some program gives you 100s of lines of code in bash script to install their program though.

      Edit:

      Another disadvantage of building from source is dependency management. You might accidentally uninstall some dependencies, the standard library versions might change and break your packages, etc.

      Using package manager mitigates that.