Is it possible to add compile options to an already-installed program?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















If I have installed a program from source (.tar.gz) using ./configure, make, make install – and then later on, want to add a build option (not sure the proper terminology – compile option?), is this possible?



Do I have to uninstall the program first (like make uninstall or something) or, assuming I am using the same source files, can I just run the same ./configure --with-option, make, make install again?



I would like to add an option to a working installation of Squid that wasn't added by default.










share|improve this question
























  • You can re-run the build process and include the new option at configure time. HOWEVER... backup any modified config files first, as the make install will likely overwrite with defaults provided.

    – ivanivan
    Dec 31 '18 at 6:31















1















If I have installed a program from source (.tar.gz) using ./configure, make, make install – and then later on, want to add a build option (not sure the proper terminology – compile option?), is this possible?



Do I have to uninstall the program first (like make uninstall or something) or, assuming I am using the same source files, can I just run the same ./configure --with-option, make, make install again?



I would like to add an option to a working installation of Squid that wasn't added by default.










share|improve this question
























  • You can re-run the build process and include the new option at configure time. HOWEVER... backup any modified config files first, as the make install will likely overwrite with defaults provided.

    – ivanivan
    Dec 31 '18 at 6:31













1












1








1








If I have installed a program from source (.tar.gz) using ./configure, make, make install – and then later on, want to add a build option (not sure the proper terminology – compile option?), is this possible?



Do I have to uninstall the program first (like make uninstall or something) or, assuming I am using the same source files, can I just run the same ./configure --with-option, make, make install again?



I would like to add an option to a working installation of Squid that wasn't added by default.










share|improve this question
















If I have installed a program from source (.tar.gz) using ./configure, make, make install – and then later on, want to add a build option (not sure the proper terminology – compile option?), is this possible?



Do I have to uninstall the program first (like make uninstall or something) or, assuming I am using the same source files, can I just run the same ./configure --with-option, make, make install again?



I would like to add an option to a working installation of Squid that wasn't added by default.







software-installation compiling






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 18:19







lchras

















asked Dec 31 '18 at 1:20









lchraslchras

83




83












  • You can re-run the build process and include the new option at configure time. HOWEVER... backup any modified config files first, as the make install will likely overwrite with defaults provided.

    – ivanivan
    Dec 31 '18 at 6:31

















  • You can re-run the build process and include the new option at configure time. HOWEVER... backup any modified config files first, as the make install will likely overwrite with defaults provided.

    – ivanivan
    Dec 31 '18 at 6:31
















You can re-run the build process and include the new option at configure time. HOWEVER... backup any modified config files first, as the make install will likely overwrite with defaults provided.

– ivanivan
Dec 31 '18 at 6:31





You can re-run the build process and include the new option at configure time. HOWEVER... backup any modified config files first, as the make install will likely overwrite with defaults provided.

– ivanivan
Dec 31 '18 at 6:31










2 Answers
2






active

oldest

votes


















1














To add to Fabby's answer:




  • The answer to your question is Yes and No. 
    Yes, it's possible to add compile-time options
    to a program that you have installed. 
    But no, you can't do it without replacing / overwriting the compiled binary.



    At the risk of belaboring the obvious,
    some programs allow you to change how they work
    by changing configuration files, without touching the binary. 
    But then you're talking about configuration options,
    not compile-time options.



  • You generally don't need to uninstall the program;
    make install will replace the existing, installed binary.

  • In the case of a background process, daemon, server or service,
    you should probably make sure that the program is not running
    when you replace it.





share|improve this answer























  • To clarify, yes, I would like to replace the binary with a newly compiled one with the additional option added. Both answers were helpful, but I'm accepting this one because it added "you should probably make sure that the program is not running when you replace it" which (duh) I hadn't thought of.

    – lchras
    Jan 1 at 18:26











  • The last point is bogus; you can replace a program while it is running. This is not windows ;-). The install(1) utility (which is used by make install) will not try to open the binary for writing (which is bound to fail with ETXBUSY), but will call rename(2) to replace the directory entry, and the running process will continue to use the old binary until restarted.

    – Uncle Billy
    Jan 1 at 20:17












  • @Ichras there's no need to make sure the program is not running while you're doing make install. The process will continue to use the old binary. Try this if you don't believe me: install /bin/sleep /tmp/sleep; /tmp/sleep 400 & install /bin/true /tmp/sleep; ls -l /proc/$!/exe => ... /tmp/sleep (deleted). /proc/PID/exe is linux-specific, but the install/rename/mv behavior is the same on any unix system.

    – Uncle Billy
    Jan 1 at 20:28












  • @UncleBilly Ah, okay. So I can just do the regular install, and the effect will be that it will overwrite everything, but I won't be able to use the new options until the process is stopped and restarted?

    – lchras
    Jan 2 at 0:34











  • @Ichras. Exactly.

    – Uncle Billy
    Jan 2 at 6:48


















4














When following the original instructions and adding an additional build option, and recompiling again, the existing version of any program (including squid) will be replaced by the new version.



Therefore, in case you do something stupid disastrous, make a copy of the existing working program before proceeding. ;-)






share|improve this answer






















    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%2f491672%2fis-it-possible-to-add-compile-options-to-an-already-installed-program%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    To add to Fabby's answer:




    • The answer to your question is Yes and No. 
      Yes, it's possible to add compile-time options
      to a program that you have installed. 
      But no, you can't do it without replacing / overwriting the compiled binary.



      At the risk of belaboring the obvious,
      some programs allow you to change how they work
      by changing configuration files, without touching the binary. 
      But then you're talking about configuration options,
      not compile-time options.



    • You generally don't need to uninstall the program;
      make install will replace the existing, installed binary.

    • In the case of a background process, daemon, server or service,
      you should probably make sure that the program is not running
      when you replace it.





    share|improve this answer























    • To clarify, yes, I would like to replace the binary with a newly compiled one with the additional option added. Both answers were helpful, but I'm accepting this one because it added "you should probably make sure that the program is not running when you replace it" which (duh) I hadn't thought of.

      – lchras
      Jan 1 at 18:26











    • The last point is bogus; you can replace a program while it is running. This is not windows ;-). The install(1) utility (which is used by make install) will not try to open the binary for writing (which is bound to fail with ETXBUSY), but will call rename(2) to replace the directory entry, and the running process will continue to use the old binary until restarted.

      – Uncle Billy
      Jan 1 at 20:17












    • @Ichras there's no need to make sure the program is not running while you're doing make install. The process will continue to use the old binary. Try this if you don't believe me: install /bin/sleep /tmp/sleep; /tmp/sleep 400 & install /bin/true /tmp/sleep; ls -l /proc/$!/exe => ... /tmp/sleep (deleted). /proc/PID/exe is linux-specific, but the install/rename/mv behavior is the same on any unix system.

      – Uncle Billy
      Jan 1 at 20:28












    • @UncleBilly Ah, okay. So I can just do the regular install, and the effect will be that it will overwrite everything, but I won't be able to use the new options until the process is stopped and restarted?

      – lchras
      Jan 2 at 0:34











    • @Ichras. Exactly.

      – Uncle Billy
      Jan 2 at 6:48















    1














    To add to Fabby's answer:




    • The answer to your question is Yes and No. 
      Yes, it's possible to add compile-time options
      to a program that you have installed. 
      But no, you can't do it without replacing / overwriting the compiled binary.



      At the risk of belaboring the obvious,
      some programs allow you to change how they work
      by changing configuration files, without touching the binary. 
      But then you're talking about configuration options,
      not compile-time options.



    • You generally don't need to uninstall the program;
      make install will replace the existing, installed binary.

    • In the case of a background process, daemon, server or service,
      you should probably make sure that the program is not running
      when you replace it.





    share|improve this answer























    • To clarify, yes, I would like to replace the binary with a newly compiled one with the additional option added. Both answers were helpful, but I'm accepting this one because it added "you should probably make sure that the program is not running when you replace it" which (duh) I hadn't thought of.

      – lchras
      Jan 1 at 18:26











    • The last point is bogus; you can replace a program while it is running. This is not windows ;-). The install(1) utility (which is used by make install) will not try to open the binary for writing (which is bound to fail with ETXBUSY), but will call rename(2) to replace the directory entry, and the running process will continue to use the old binary until restarted.

      – Uncle Billy
      Jan 1 at 20:17












    • @Ichras there's no need to make sure the program is not running while you're doing make install. The process will continue to use the old binary. Try this if you don't believe me: install /bin/sleep /tmp/sleep; /tmp/sleep 400 & install /bin/true /tmp/sleep; ls -l /proc/$!/exe => ... /tmp/sleep (deleted). /proc/PID/exe is linux-specific, but the install/rename/mv behavior is the same on any unix system.

      – Uncle Billy
      Jan 1 at 20:28












    • @UncleBilly Ah, okay. So I can just do the regular install, and the effect will be that it will overwrite everything, but I won't be able to use the new options until the process is stopped and restarted?

      – lchras
      Jan 2 at 0:34











    • @Ichras. Exactly.

      – Uncle Billy
      Jan 2 at 6:48













    1












    1








    1







    To add to Fabby's answer:




    • The answer to your question is Yes and No. 
      Yes, it's possible to add compile-time options
      to a program that you have installed. 
      But no, you can't do it without replacing / overwriting the compiled binary.



      At the risk of belaboring the obvious,
      some programs allow you to change how they work
      by changing configuration files, without touching the binary. 
      But then you're talking about configuration options,
      not compile-time options.



    • You generally don't need to uninstall the program;
      make install will replace the existing, installed binary.

    • In the case of a background process, daemon, server or service,
      you should probably make sure that the program is not running
      when you replace it.





    share|improve this answer













    To add to Fabby's answer:




    • The answer to your question is Yes and No. 
      Yes, it's possible to add compile-time options
      to a program that you have installed. 
      But no, you can't do it without replacing / overwriting the compiled binary.



      At the risk of belaboring the obvious,
      some programs allow you to change how they work
      by changing configuration files, without touching the binary. 
      But then you're talking about configuration options,
      not compile-time options.



    • You generally don't need to uninstall the program;
      make install will replace the existing, installed binary.

    • In the case of a background process, daemon, server or service,
      you should probably make sure that the program is not running
      when you replace it.






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 31 '18 at 20:40









    G-ManG-Man

    13k93365




    13k93365












    • To clarify, yes, I would like to replace the binary with a newly compiled one with the additional option added. Both answers were helpful, but I'm accepting this one because it added "you should probably make sure that the program is not running when you replace it" which (duh) I hadn't thought of.

      – lchras
      Jan 1 at 18:26











    • The last point is bogus; you can replace a program while it is running. This is not windows ;-). The install(1) utility (which is used by make install) will not try to open the binary for writing (which is bound to fail with ETXBUSY), but will call rename(2) to replace the directory entry, and the running process will continue to use the old binary until restarted.

      – Uncle Billy
      Jan 1 at 20:17












    • @Ichras there's no need to make sure the program is not running while you're doing make install. The process will continue to use the old binary. Try this if you don't believe me: install /bin/sleep /tmp/sleep; /tmp/sleep 400 & install /bin/true /tmp/sleep; ls -l /proc/$!/exe => ... /tmp/sleep (deleted). /proc/PID/exe is linux-specific, but the install/rename/mv behavior is the same on any unix system.

      – Uncle Billy
      Jan 1 at 20:28












    • @UncleBilly Ah, okay. So I can just do the regular install, and the effect will be that it will overwrite everything, but I won't be able to use the new options until the process is stopped and restarted?

      – lchras
      Jan 2 at 0:34











    • @Ichras. Exactly.

      – Uncle Billy
      Jan 2 at 6:48

















    • To clarify, yes, I would like to replace the binary with a newly compiled one with the additional option added. Both answers were helpful, but I'm accepting this one because it added "you should probably make sure that the program is not running when you replace it" which (duh) I hadn't thought of.

      – lchras
      Jan 1 at 18:26











    • The last point is bogus; you can replace a program while it is running. This is not windows ;-). The install(1) utility (which is used by make install) will not try to open the binary for writing (which is bound to fail with ETXBUSY), but will call rename(2) to replace the directory entry, and the running process will continue to use the old binary until restarted.

      – Uncle Billy
      Jan 1 at 20:17












    • @Ichras there's no need to make sure the program is not running while you're doing make install. The process will continue to use the old binary. Try this if you don't believe me: install /bin/sleep /tmp/sleep; /tmp/sleep 400 & install /bin/true /tmp/sleep; ls -l /proc/$!/exe => ... /tmp/sleep (deleted). /proc/PID/exe is linux-specific, but the install/rename/mv behavior is the same on any unix system.

      – Uncle Billy
      Jan 1 at 20:28












    • @UncleBilly Ah, okay. So I can just do the regular install, and the effect will be that it will overwrite everything, but I won't be able to use the new options until the process is stopped and restarted?

      – lchras
      Jan 2 at 0:34











    • @Ichras. Exactly.

      – Uncle Billy
      Jan 2 at 6:48
















    To clarify, yes, I would like to replace the binary with a newly compiled one with the additional option added. Both answers were helpful, but I'm accepting this one because it added "you should probably make sure that the program is not running when you replace it" which (duh) I hadn't thought of.

    – lchras
    Jan 1 at 18:26





    To clarify, yes, I would like to replace the binary with a newly compiled one with the additional option added. Both answers were helpful, but I'm accepting this one because it added "you should probably make sure that the program is not running when you replace it" which (duh) I hadn't thought of.

    – lchras
    Jan 1 at 18:26













    The last point is bogus; you can replace a program while it is running. This is not windows ;-). The install(1) utility (which is used by make install) will not try to open the binary for writing (which is bound to fail with ETXBUSY), but will call rename(2) to replace the directory entry, and the running process will continue to use the old binary until restarted.

    – Uncle Billy
    Jan 1 at 20:17






    The last point is bogus; you can replace a program while it is running. This is not windows ;-). The install(1) utility (which is used by make install) will not try to open the binary for writing (which is bound to fail with ETXBUSY), but will call rename(2) to replace the directory entry, and the running process will continue to use the old binary until restarted.

    – Uncle Billy
    Jan 1 at 20:17














    @Ichras there's no need to make sure the program is not running while you're doing make install. The process will continue to use the old binary. Try this if you don't believe me: install /bin/sleep /tmp/sleep; /tmp/sleep 400 & install /bin/true /tmp/sleep; ls -l /proc/$!/exe => ... /tmp/sleep (deleted). /proc/PID/exe is linux-specific, but the install/rename/mv behavior is the same on any unix system.

    – Uncle Billy
    Jan 1 at 20:28






    @Ichras there's no need to make sure the program is not running while you're doing make install. The process will continue to use the old binary. Try this if you don't believe me: install /bin/sleep /tmp/sleep; /tmp/sleep 400 & install /bin/true /tmp/sleep; ls -l /proc/$!/exe => ... /tmp/sleep (deleted). /proc/PID/exe is linux-specific, but the install/rename/mv behavior is the same on any unix system.

    – Uncle Billy
    Jan 1 at 20:28














    @UncleBilly Ah, okay. So I can just do the regular install, and the effect will be that it will overwrite everything, but I won't be able to use the new options until the process is stopped and restarted?

    – lchras
    Jan 2 at 0:34





    @UncleBilly Ah, okay. So I can just do the regular install, and the effect will be that it will overwrite everything, but I won't be able to use the new options until the process is stopped and restarted?

    – lchras
    Jan 2 at 0:34













    @Ichras. Exactly.

    – Uncle Billy
    Jan 2 at 6:48





    @Ichras. Exactly.

    – Uncle Billy
    Jan 2 at 6:48













    4














    When following the original instructions and adding an additional build option, and recompiling again, the existing version of any program (including squid) will be replaced by the new version.



    Therefore, in case you do something stupid disastrous, make a copy of the existing working program before proceeding. ;-)






    share|improve this answer



























      4














      When following the original instructions and adding an additional build option, and recompiling again, the existing version of any program (including squid) will be replaced by the new version.



      Therefore, in case you do something stupid disastrous, make a copy of the existing working program before proceeding. ;-)






      share|improve this answer

























        4












        4








        4







        When following the original instructions and adding an additional build option, and recompiling again, the existing version of any program (including squid) will be replaced by the new version.



        Therefore, in case you do something stupid disastrous, make a copy of the existing working program before proceeding. ;-)






        share|improve this answer













        When following the original instructions and adding an additional build option, and recompiling again, the existing version of any program (including squid) will be replaced by the new version.



        Therefore, in case you do something stupid disastrous, make a copy of the existing working program before proceeding. ;-)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 31 '18 at 1:38









        FabbyFabby

        3,74811229




        3,74811229



























            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%2f491672%2fis-it-possible-to-add-compile-options-to-an-already-installed-program%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

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?