Unable to use Valgrind on executable file for ARM-Linux












1















I'm having problem using Valgrind on "arm-linux" executable file.



I downloaded Valgrind from the main page here : http://valgrind.org/downloads/.
Run the following command to install it:



sudo ./configure
sudo make
sudo make install


On Ubuntu, I try with an executable HelloWorld file compiled "HelloWorld.c" using Linux GCC. Valgrind runs without any problem.



Then I try it on an executable file compiled from using Cross-compiler for ARM-Linux (this executable file is compiled to run on an embedded device) and I got this error:



valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory


I have digged around on google and couldn't find much information, I tried:



export VALGRIND_LIB=/usr/local/lib/Valgrind


It still show the same error, what am I doing wrong?










share|improve this question
















bumped to the homepage by Community 23 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    I take it you’re not running Valgrind on an ARM system, is that correct?

    – Stephen Kitt
    Nov 21 '17 at 17:21











  • I'm running it on my Ubuntu 16. Do I have to run it on the device, which the executable file compiled for?

    – Toan Tran
    Nov 22 '17 at 1:08
















1















I'm having problem using Valgrind on "arm-linux" executable file.



I downloaded Valgrind from the main page here : http://valgrind.org/downloads/.
Run the following command to install it:



sudo ./configure
sudo make
sudo make install


On Ubuntu, I try with an executable HelloWorld file compiled "HelloWorld.c" using Linux GCC. Valgrind runs without any problem.



Then I try it on an executable file compiled from using Cross-compiler for ARM-Linux (this executable file is compiled to run on an embedded device) and I got this error:



valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory


I have digged around on google and couldn't find much information, I tried:



export VALGRIND_LIB=/usr/local/lib/Valgrind


It still show the same error, what am I doing wrong?










share|improve this question
















bumped to the homepage by Community 23 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.











  • 1





    I take it you’re not running Valgrind on an ARM system, is that correct?

    – Stephen Kitt
    Nov 21 '17 at 17:21











  • I'm running it on my Ubuntu 16. Do I have to run it on the device, which the executable file compiled for?

    – Toan Tran
    Nov 22 '17 at 1:08














1












1








1


2






I'm having problem using Valgrind on "arm-linux" executable file.



I downloaded Valgrind from the main page here : http://valgrind.org/downloads/.
Run the following command to install it:



sudo ./configure
sudo make
sudo make install


On Ubuntu, I try with an executable HelloWorld file compiled "HelloWorld.c" using Linux GCC. Valgrind runs without any problem.



Then I try it on an executable file compiled from using Cross-compiler for ARM-Linux (this executable file is compiled to run on an embedded device) and I got this error:



valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory


I have digged around on google and couldn't find much information, I tried:



export VALGRIND_LIB=/usr/local/lib/Valgrind


It still show the same error, what am I doing wrong?










share|improve this question
















I'm having problem using Valgrind on "arm-linux" executable file.



I downloaded Valgrind from the main page here : http://valgrind.org/downloads/.
Run the following command to install it:



sudo ./configure
sudo make
sudo make install


On Ubuntu, I try with an executable HelloWorld file compiled "HelloWorld.c" using Linux GCC. Valgrind runs without any problem.



Then I try it on an executable file compiled from using Cross-compiler for ARM-Linux (this executable file is compiled to run on an embedded device) and I got this error:



valgrind: failed to start tool 'memcheck' for platform 'arm-linux': No such file or directory


I have digged around on google and couldn't find much information, I tried:



export VALGRIND_LIB=/usr/local/lib/Valgrind


It still show the same error, what am I doing wrong?







linux debugging cross-compilation






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '17 at 1:14







Toan Tran

















asked Nov 21 '17 at 17:11









Toan TranToan Tran

63




63





bumped to the homepage by Community 23 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 23 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.










  • 1





    I take it you’re not running Valgrind on an ARM system, is that correct?

    – Stephen Kitt
    Nov 21 '17 at 17:21











  • I'm running it on my Ubuntu 16. Do I have to run it on the device, which the executable file compiled for?

    – Toan Tran
    Nov 22 '17 at 1:08














  • 1





    I take it you’re not running Valgrind on an ARM system, is that correct?

    – Stephen Kitt
    Nov 21 '17 at 17:21











  • I'm running it on my Ubuntu 16. Do I have to run it on the device, which the executable file compiled for?

    – Toan Tran
    Nov 22 '17 at 1:08








1




1





I take it you’re not running Valgrind on an ARM system, is that correct?

– Stephen Kitt
Nov 21 '17 at 17:21





I take it you’re not running Valgrind on an ARM system, is that correct?

– Stephen Kitt
Nov 21 '17 at 17:21













I'm running it on my Ubuntu 16. Do I have to run it on the device, which the executable file compiled for?

– Toan Tran
Nov 22 '17 at 1:08





I'm running it on my Ubuntu 16. Do I have to run it on the device, which the executable file compiled for?

– Toan Tran
Nov 22 '17 at 1:08










1 Answer
1






active

oldest

votes


















0














Valgrind is trying to launch a suitable executable for the 'memcheck' tool but can't find one. This is due to the fact that the './configure' script created a Makefile viable for the installation of a valgrind package specific for the host architecture (your PC), but you are feeding it an executable meant for another one (ARM in your case); this lead to a situation in which you lack the ARM specific tools to do the job. I had a similar problem with the 'callgrind' tool (also part of the valgrind package), and by doing an strace I came up with the following line:



execve("/usr/local/lib/valgrind/callgrind-arm-linux", ["valgrind", "--tool=callgrind", "Application.STM.out"], [/* 19 vars */]) = -1 ENOENT (No such file or directory)


which means that I miss the ARM specific callgrind binary.



elaborating on that, what you (and me not so long ago) are trying to do is not supported by valgrind, so you want to use an emulator to get the job done.






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%2f406082%2funable-to-use-valgrind-on-executable-file-for-arm-linux%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









    0














    Valgrind is trying to launch a suitable executable for the 'memcheck' tool but can't find one. This is due to the fact that the './configure' script created a Makefile viable for the installation of a valgrind package specific for the host architecture (your PC), but you are feeding it an executable meant for another one (ARM in your case); this lead to a situation in which you lack the ARM specific tools to do the job. I had a similar problem with the 'callgrind' tool (also part of the valgrind package), and by doing an strace I came up with the following line:



    execve("/usr/local/lib/valgrind/callgrind-arm-linux", ["valgrind", "--tool=callgrind", "Application.STM.out"], [/* 19 vars */]) = -1 ENOENT (No such file or directory)


    which means that I miss the ARM specific callgrind binary.



    elaborating on that, what you (and me not so long ago) are trying to do is not supported by valgrind, so you want to use an emulator to get the job done.






    share|improve this answer






























      0














      Valgrind is trying to launch a suitable executable for the 'memcheck' tool but can't find one. This is due to the fact that the './configure' script created a Makefile viable for the installation of a valgrind package specific for the host architecture (your PC), but you are feeding it an executable meant for another one (ARM in your case); this lead to a situation in which you lack the ARM specific tools to do the job. I had a similar problem with the 'callgrind' tool (also part of the valgrind package), and by doing an strace I came up with the following line:



      execve("/usr/local/lib/valgrind/callgrind-arm-linux", ["valgrind", "--tool=callgrind", "Application.STM.out"], [/* 19 vars */]) = -1 ENOENT (No such file or directory)


      which means that I miss the ARM specific callgrind binary.



      elaborating on that, what you (and me not so long ago) are trying to do is not supported by valgrind, so you want to use an emulator to get the job done.






      share|improve this answer




























        0












        0








        0







        Valgrind is trying to launch a suitable executable for the 'memcheck' tool but can't find one. This is due to the fact that the './configure' script created a Makefile viable for the installation of a valgrind package specific for the host architecture (your PC), but you are feeding it an executable meant for another one (ARM in your case); this lead to a situation in which you lack the ARM specific tools to do the job. I had a similar problem with the 'callgrind' tool (also part of the valgrind package), and by doing an strace I came up with the following line:



        execve("/usr/local/lib/valgrind/callgrind-arm-linux", ["valgrind", "--tool=callgrind", "Application.STM.out"], [/* 19 vars */]) = -1 ENOENT (No such file or directory)


        which means that I miss the ARM specific callgrind binary.



        elaborating on that, what you (and me not so long ago) are trying to do is not supported by valgrind, so you want to use an emulator to get the job done.






        share|improve this answer















        Valgrind is trying to launch a suitable executable for the 'memcheck' tool but can't find one. This is due to the fact that the './configure' script created a Makefile viable for the installation of a valgrind package specific for the host architecture (your PC), but you are feeding it an executable meant for another one (ARM in your case); this lead to a situation in which you lack the ARM specific tools to do the job. I had a similar problem with the 'callgrind' tool (also part of the valgrind package), and by doing an strace I came up with the following line:



        execve("/usr/local/lib/valgrind/callgrind-arm-linux", ["valgrind", "--tool=callgrind", "Application.STM.out"], [/* 19 vars */]) = -1 ENOENT (No such file or directory)


        which means that I miss the ARM specific callgrind binary.



        elaborating on that, what you (and me not so long ago) are trying to do is not supported by valgrind, so you want to use an emulator to get the job done.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 15 '18 at 0:45

























        answered Feb 27 '18 at 13:25









        Federico MarsigliaFederico Marsiglia

        11




        11






























            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%2f406082%2funable-to-use-valgrind-on-executable-file-for-arm-linux%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

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt