can i change the name of executable during compilation











up vote
1
down vote

favorite












I'm compiling LLVM/Clang but want to give a different name to the executable. Is there a special option I need to be using, like --binary-name? The trick is that I want to rename every tool that comes with LLVM/Clang.



For example:



clang -> my-clang 
llvm-conig -> my-llvm-config
etc.


Is it even possible in Unix/Linux?










share|improve this question




















  • 1




    How many binaries are you talking about? If there are only a handful, I do not see why you could not use mv to rename them. You could also make a symbolic link the the binary with the name you prefer.
    – Peschke
    Sep 22 '15 at 19:49










  • @ElixirofLove The idea is to have multiple versions of the tool installed. I need to compile different versions of clang/llvm and it would be nice if I could run clang-3.5, llvm-config-3.4 etc.
    – flashburn
    Sep 22 '15 at 20:55










  • Clang doesn't support this while building: clang-developers.42468.n3.nabble.com/…, so I suppose you'll have to do this manually.
    – muru
    Sep 22 '15 at 22:42










  • Let me generalize the question. Is it possible to install multiple versions of the same tool on a *nix system? And if not then what are the best practices to do that? In addition should a *nix developers implement some sort of a management system in the future to solve this type of problem? If this comment is off topic, I'd appreciate if some moderator could create a separate discussion thread for it.
    – flashburn
    Sep 22 '15 at 22:46












  • @flashburn it is possible. They do, they're called packages (with package managers). We don't have discussion threads on Stack Exchange, you can use chatrooms instead.
    – muru
    Sep 22 '15 at 22:54















up vote
1
down vote

favorite












I'm compiling LLVM/Clang but want to give a different name to the executable. Is there a special option I need to be using, like --binary-name? The trick is that I want to rename every tool that comes with LLVM/Clang.



For example:



clang -> my-clang 
llvm-conig -> my-llvm-config
etc.


Is it even possible in Unix/Linux?










share|improve this question




















  • 1




    How many binaries are you talking about? If there are only a handful, I do not see why you could not use mv to rename them. You could also make a symbolic link the the binary with the name you prefer.
    – Peschke
    Sep 22 '15 at 19:49










  • @ElixirofLove The idea is to have multiple versions of the tool installed. I need to compile different versions of clang/llvm and it would be nice if I could run clang-3.5, llvm-config-3.4 etc.
    – flashburn
    Sep 22 '15 at 20:55










  • Clang doesn't support this while building: clang-developers.42468.n3.nabble.com/…, so I suppose you'll have to do this manually.
    – muru
    Sep 22 '15 at 22:42










  • Let me generalize the question. Is it possible to install multiple versions of the same tool on a *nix system? And if not then what are the best practices to do that? In addition should a *nix developers implement some sort of a management system in the future to solve this type of problem? If this comment is off topic, I'd appreciate if some moderator could create a separate discussion thread for it.
    – flashburn
    Sep 22 '15 at 22:46












  • @flashburn it is possible. They do, they're called packages (with package managers). We don't have discussion threads on Stack Exchange, you can use chatrooms instead.
    – muru
    Sep 22 '15 at 22:54













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I'm compiling LLVM/Clang but want to give a different name to the executable. Is there a special option I need to be using, like --binary-name? The trick is that I want to rename every tool that comes with LLVM/Clang.



For example:



clang -> my-clang 
llvm-conig -> my-llvm-config
etc.


Is it even possible in Unix/Linux?










share|improve this question















I'm compiling LLVM/Clang but want to give a different name to the executable. Is there a special option I need to be using, like --binary-name? The trick is that I want to rename every tool that comes with LLVM/Clang.



For example:



clang -> my-clang 
llvm-conig -> my-llvm-config
etc.


Is it even possible in Unix/Linux?







llvm clang






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 at 21:20









Rui F Ribeiro

38.2k1475125




38.2k1475125










asked Sep 22 '15 at 18:11









flashburn

207211




207211








  • 1




    How many binaries are you talking about? If there are only a handful, I do not see why you could not use mv to rename them. You could also make a symbolic link the the binary with the name you prefer.
    – Peschke
    Sep 22 '15 at 19:49










  • @ElixirofLove The idea is to have multiple versions of the tool installed. I need to compile different versions of clang/llvm and it would be nice if I could run clang-3.5, llvm-config-3.4 etc.
    – flashburn
    Sep 22 '15 at 20:55










  • Clang doesn't support this while building: clang-developers.42468.n3.nabble.com/…, so I suppose you'll have to do this manually.
    – muru
    Sep 22 '15 at 22:42










  • Let me generalize the question. Is it possible to install multiple versions of the same tool on a *nix system? And if not then what are the best practices to do that? In addition should a *nix developers implement some sort of a management system in the future to solve this type of problem? If this comment is off topic, I'd appreciate if some moderator could create a separate discussion thread for it.
    – flashburn
    Sep 22 '15 at 22:46












  • @flashburn it is possible. They do, they're called packages (with package managers). We don't have discussion threads on Stack Exchange, you can use chatrooms instead.
    – muru
    Sep 22 '15 at 22:54














  • 1




    How many binaries are you talking about? If there are only a handful, I do not see why you could not use mv to rename them. You could also make a symbolic link the the binary with the name you prefer.
    – Peschke
    Sep 22 '15 at 19:49










  • @ElixirofLove The idea is to have multiple versions of the tool installed. I need to compile different versions of clang/llvm and it would be nice if I could run clang-3.5, llvm-config-3.4 etc.
    – flashburn
    Sep 22 '15 at 20:55










  • Clang doesn't support this while building: clang-developers.42468.n3.nabble.com/…, so I suppose you'll have to do this manually.
    – muru
    Sep 22 '15 at 22:42










  • Let me generalize the question. Is it possible to install multiple versions of the same tool on a *nix system? And if not then what are the best practices to do that? In addition should a *nix developers implement some sort of a management system in the future to solve this type of problem? If this comment is off topic, I'd appreciate if some moderator could create a separate discussion thread for it.
    – flashburn
    Sep 22 '15 at 22:46












  • @flashburn it is possible. They do, they're called packages (with package managers). We don't have discussion threads on Stack Exchange, you can use chatrooms instead.
    – muru
    Sep 22 '15 at 22:54








1




1




How many binaries are you talking about? If there are only a handful, I do not see why you could not use mv to rename them. You could also make a symbolic link the the binary with the name you prefer.
– Peschke
Sep 22 '15 at 19:49




How many binaries are you talking about? If there are only a handful, I do not see why you could not use mv to rename them. You could also make a symbolic link the the binary with the name you prefer.
– Peschke
Sep 22 '15 at 19:49












@ElixirofLove The idea is to have multiple versions of the tool installed. I need to compile different versions of clang/llvm and it would be nice if I could run clang-3.5, llvm-config-3.4 etc.
– flashburn
Sep 22 '15 at 20:55




@ElixirofLove The idea is to have multiple versions of the tool installed. I need to compile different versions of clang/llvm and it would be nice if I could run clang-3.5, llvm-config-3.4 etc.
– flashburn
Sep 22 '15 at 20:55












Clang doesn't support this while building: clang-developers.42468.n3.nabble.com/…, so I suppose you'll have to do this manually.
– muru
Sep 22 '15 at 22:42




Clang doesn't support this while building: clang-developers.42468.n3.nabble.com/…, so I suppose you'll have to do this manually.
– muru
Sep 22 '15 at 22:42












Let me generalize the question. Is it possible to install multiple versions of the same tool on a *nix system? And if not then what are the best practices to do that? In addition should a *nix developers implement some sort of a management system in the future to solve this type of problem? If this comment is off topic, I'd appreciate if some moderator could create a separate discussion thread for it.
– flashburn
Sep 22 '15 at 22:46






Let me generalize the question. Is it possible to install multiple versions of the same tool on a *nix system? And if not then what are the best practices to do that? In addition should a *nix developers implement some sort of a management system in the future to solve this type of problem? If this comment is off topic, I'd appreciate if some moderator could create a separate discussion thread for it.
– flashburn
Sep 22 '15 at 22:46














@flashburn it is possible. They do, they're called packages (with package managers). We don't have discussion threads on Stack Exchange, you can use chatrooms instead.
– muru
Sep 22 '15 at 22:54




@flashburn it is possible. They do, they're called packages (with package managers). We don't have discussion threads on Stack Exchange, you can use chatrooms instead.
– muru
Sep 22 '15 at 22:54










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I am unsure if you can change the name of all binary files during compilation... but my suggestion would be to compile the program in the directory it came in, move than entire directory to /usr/src, then create a symbolic link to the main binary in /usr/bin.



ln -s /usr/src/clang-3.5/bin/clang /usr/bin/clang-3.5



This way you can have multiple versions of different programs and not worry about the older libraries, and other files, being overwritten when installing them.






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',
    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%2f231399%2fcan-i-change-the-name-of-executable-during-compilation%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I am unsure if you can change the name of all binary files during compilation... but my suggestion would be to compile the program in the directory it came in, move than entire directory to /usr/src, then create a symbolic link to the main binary in /usr/bin.



    ln -s /usr/src/clang-3.5/bin/clang /usr/bin/clang-3.5



    This way you can have multiple versions of different programs and not worry about the older libraries, and other files, being overwritten when installing them.






    share|improve this answer

























      up vote
      0
      down vote













      I am unsure if you can change the name of all binary files during compilation... but my suggestion would be to compile the program in the directory it came in, move than entire directory to /usr/src, then create a symbolic link to the main binary in /usr/bin.



      ln -s /usr/src/clang-3.5/bin/clang /usr/bin/clang-3.5



      This way you can have multiple versions of different programs and not worry about the older libraries, and other files, being overwritten when installing them.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        I am unsure if you can change the name of all binary files during compilation... but my suggestion would be to compile the program in the directory it came in, move than entire directory to /usr/src, then create a symbolic link to the main binary in /usr/bin.



        ln -s /usr/src/clang-3.5/bin/clang /usr/bin/clang-3.5



        This way you can have multiple versions of different programs and not worry about the older libraries, and other files, being overwritten when installing them.






        share|improve this answer












        I am unsure if you can change the name of all binary files during compilation... but my suggestion would be to compile the program in the directory it came in, move than entire directory to /usr/src, then create a symbolic link to the main binary in /usr/bin.



        ln -s /usr/src/clang-3.5/bin/clang /usr/bin/clang-3.5



        This way you can have multiple versions of different programs and not worry about the older libraries, and other files, being overwritten when installing them.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 22 '15 at 22:19









        Peschke

        1,995920




        1,995920






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f231399%2fcan-i-change-the-name-of-executable-during-compilation%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

            サソリ

            広島県道265号伴広島線

            Setup Asymptote in Texstudio