How to build a program from source into its own confined root directory (locally)












0















This is a two-part question actually -- the first being the title and the second part is a more general "Best practices to consider when building from source to have a maintainable system". It is related in the sense that IF I can install all the program's files in one directory (preferably in $HOME), I will indeed end up with a very clean and maintainable system where the only thing I will need to keep track of is shared dependencies like libraries.

I still don't know how to go around doing that. At this point my knowledge is very shallw of how to build properly I might as well be bluffing. I couldn't find a comprehensive resource and this is why I turned here.



Say, hypothetically, I want to be able to install and uninstall software completely from source on a system that I will be running for a decade. On this scaled extreme, only the best practices will ensure that my system remains under good management and does not inflate with orphaned useless files/dependencies/et-cetra from the multiple uninstalls spanning the lifetime of the system.



So, what would those best practices be? Because as of now I am very wary of the process of building from source and when I do it I just follow the almost-universal steps that are ./configure, then make, then [sudo] make install. And then sometimes the extra one step of ldconfig is needed for linking shared libraries after install. But that's usually always auto-handled one way or another.



I feel like there's more to it. There has to be more to it.










share|improve this question





























    0















    This is a two-part question actually -- the first being the title and the second part is a more general "Best practices to consider when building from source to have a maintainable system". It is related in the sense that IF I can install all the program's files in one directory (preferably in $HOME), I will indeed end up with a very clean and maintainable system where the only thing I will need to keep track of is shared dependencies like libraries.

    I still don't know how to go around doing that. At this point my knowledge is very shallw of how to build properly I might as well be bluffing. I couldn't find a comprehensive resource and this is why I turned here.



    Say, hypothetically, I want to be able to install and uninstall software completely from source on a system that I will be running for a decade. On this scaled extreme, only the best practices will ensure that my system remains under good management and does not inflate with orphaned useless files/dependencies/et-cetra from the multiple uninstalls spanning the lifetime of the system.



    So, what would those best practices be? Because as of now I am very wary of the process of building from source and when I do it I just follow the almost-universal steps that are ./configure, then make, then [sudo] make install. And then sometimes the extra one step of ldconfig is needed for linking shared libraries after install. But that's usually always auto-handled one way or another.



    I feel like there's more to it. There has to be more to it.










    share|improve this question



























      0












      0








      0








      This is a two-part question actually -- the first being the title and the second part is a more general "Best practices to consider when building from source to have a maintainable system". It is related in the sense that IF I can install all the program's files in one directory (preferably in $HOME), I will indeed end up with a very clean and maintainable system where the only thing I will need to keep track of is shared dependencies like libraries.

      I still don't know how to go around doing that. At this point my knowledge is very shallw of how to build properly I might as well be bluffing. I couldn't find a comprehensive resource and this is why I turned here.



      Say, hypothetically, I want to be able to install and uninstall software completely from source on a system that I will be running for a decade. On this scaled extreme, only the best practices will ensure that my system remains under good management and does not inflate with orphaned useless files/dependencies/et-cetra from the multiple uninstalls spanning the lifetime of the system.



      So, what would those best practices be? Because as of now I am very wary of the process of building from source and when I do it I just follow the almost-universal steps that are ./configure, then make, then [sudo] make install. And then sometimes the extra one step of ldconfig is needed for linking shared libraries after install. But that's usually always auto-handled one way or another.



      I feel like there's more to it. There has to be more to it.










      share|improve this question
















      This is a two-part question actually -- the first being the title and the second part is a more general "Best practices to consider when building from source to have a maintainable system". It is related in the sense that IF I can install all the program's files in one directory (preferably in $HOME), I will indeed end up with a very clean and maintainable system where the only thing I will need to keep track of is shared dependencies like libraries.

      I still don't know how to go around doing that. At this point my knowledge is very shallw of how to build properly I might as well be bluffing. I couldn't find a comprehensive resource and this is why I turned here.



      Say, hypothetically, I want to be able to install and uninstall software completely from source on a system that I will be running for a decade. On this scaled extreme, only the best practices will ensure that my system remains under good management and does not inflate with orphaned useless files/dependencies/et-cetra from the multiple uninstalls spanning the lifetime of the system.



      So, what would those best practices be? Because as of now I am very wary of the process of building from source and when I do it I just follow the almost-universal steps that are ./configure, then make, then [sudo] make install. And then sometimes the extra one step of ldconfig is needed for linking shared libraries after install. But that's usually always auto-handled one way or another.



      I feel like there's more to it. There has to be more to it.







      software-installation compiling make source maintenance






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 1 hour ago









      Rui F Ribeiro

      41.5k1483140




      41.5k1483140










      asked 1 hour ago









      MothManMothMan

      61




      61






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506905%2fhow-to-build-a-program-from-source-into-its-own-confined-root-directory-locally%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f506905%2fhow-to-build-a-program-from-source-into-its-own-confined-root-directory-locally%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          CARDNET

          Boot-repair Failure: Unable to locate package grub-common:i386

          濃尾地震