using cross-compiled Valgrind












8















I have downloaded the sources from the Valgrind trunk and built it for using on an embedded Linux system(Montavista Linux) powered by an ARM926(ARMv5t architecture). Everything went well until I tried to run it to check some application I've made; Valgrind tells me:



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



Trying to run any other tool gives the same message.
For make install I used the --prefix option pointing to the embedded system's filesystem which is mounted through NFS(e.g. --prefix=/home/NFS_mounted/opt/valgrind). I checked the installation location and the lib directory there contains the proper tools; I also checked the corresponding pkgconfig file for Valgrind and it seems to be OK so I'm kind of clueless right now and can't figure out what's going wrong. 2 questions:




  1. Is it correct to use/install a cross-compiled Valgrind like that? Maybe I'm doing something wrong regarding the setup, or maybe there is something involving the host system that I'm missing(gdb/gdbserver like).

  2. Has anyone tried running it on ARM architectures? I'm aware that the support is fairly recent so I'm wondering if I could get decent results.










share|improve this question





























    8















    I have downloaded the sources from the Valgrind trunk and built it for using on an embedded Linux system(Montavista Linux) powered by an ARM926(ARMv5t architecture). Everything went well until I tried to run it to check some application I've made; Valgrind tells me:



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



    Trying to run any other tool gives the same message.
    For make install I used the --prefix option pointing to the embedded system's filesystem which is mounted through NFS(e.g. --prefix=/home/NFS_mounted/opt/valgrind). I checked the installation location and the lib directory there contains the proper tools; I also checked the corresponding pkgconfig file for Valgrind and it seems to be OK so I'm kind of clueless right now and can't figure out what's going wrong. 2 questions:




    1. Is it correct to use/install a cross-compiled Valgrind like that? Maybe I'm doing something wrong regarding the setup, or maybe there is something involving the host system that I'm missing(gdb/gdbserver like).

    2. Has anyone tried running it on ARM architectures? I'm aware that the support is fairly recent so I'm wondering if I could get decent results.










    share|improve this question



























      8












      8








      8


      4






      I have downloaded the sources from the Valgrind trunk and built it for using on an embedded Linux system(Montavista Linux) powered by an ARM926(ARMv5t architecture). Everything went well until I tried to run it to check some application I've made; Valgrind tells me:



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



      Trying to run any other tool gives the same message.
      For make install I used the --prefix option pointing to the embedded system's filesystem which is mounted through NFS(e.g. --prefix=/home/NFS_mounted/opt/valgrind). I checked the installation location and the lib directory there contains the proper tools; I also checked the corresponding pkgconfig file for Valgrind and it seems to be OK so I'm kind of clueless right now and can't figure out what's going wrong. 2 questions:




      1. Is it correct to use/install a cross-compiled Valgrind like that? Maybe I'm doing something wrong regarding the setup, or maybe there is something involving the host system that I'm missing(gdb/gdbserver like).

      2. Has anyone tried running it on ARM architectures? I'm aware that the support is fairly recent so I'm wondering if I could get decent results.










      share|improve this question
















      I have downloaded the sources from the Valgrind trunk and built it for using on an embedded Linux system(Montavista Linux) powered by an ARM926(ARMv5t architecture). Everything went well until I tried to run it to check some application I've made; Valgrind tells me:



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



      Trying to run any other tool gives the same message.
      For make install I used the --prefix option pointing to the embedded system's filesystem which is mounted through NFS(e.g. --prefix=/home/NFS_mounted/opt/valgrind). I checked the installation location and the lib directory there contains the proper tools; I also checked the corresponding pkgconfig file for Valgrind and it seems to be OK so I'm kind of clueless right now and can't figure out what's going wrong. 2 questions:




      1. Is it correct to use/install a cross-compiled Valgrind like that? Maybe I'm doing something wrong regarding the setup, or maybe there is something involving the host system that I'm missing(gdb/gdbserver like).

      2. Has anyone tried running it on ARM architectures? I'm aware that the support is fairly recent so I'm wondering if I could get decent results.







      linux embedded cross-compilation






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 8 '11 at 19:12









      Gilles

      537k12810881605




      537k12810881605










      asked Sep 6 '10 at 19:14









      celavekcelavek

      3202510




      3202510






















          4 Answers
          4






          active

          oldest

          votes


















          10














          Run this command in your target device



          export VALGRIND_LIB=~/valgrind/lib/valgrind/


          where ./valgrind is installed directory path (given in ./configure)






          share|improve this answer

































            4














            The problem is that 'valgrind' is looking for a different executable to run the real checking. It uses the install path you specified when you configured it, which is not the same path as on the target.



            You should be able to confirm this by creating a symlink /home/NFS_mounted on your target that points to '/'.






            share|improve this answer
























            • How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it?

              – celavek
              Sep 6 '10 at 22:23











            • I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path.

              – Kristof Provost
              Sep 7 '10 at 8:23



















            2














            Put in VALGRIND_LIB the parent directory of amd64-linux directory.
            E.g.:



            export VALGRIND_LIB=/u/gallinar/downloaded/valgrind-3.2.3/.in_place



            it worked for me today :).






            share|improve this answer
























            • I'm missing the .in_place in the folder.

              – ArmenB
              Apr 22 '14 at 21:14



















            0














            VALGRIND_LIB needs to be pointing to the folder that has memcheck tool and other dependent x compiled libs





            share








            New contributor




            DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




















              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%2f1680%2fusing-cross-compiled-valgrind%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              4 Answers
              4






              active

              oldest

              votes








              4 Answers
              4






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              10














              Run this command in your target device



              export VALGRIND_LIB=~/valgrind/lib/valgrind/


              where ./valgrind is installed directory path (given in ./configure)






              share|improve this answer






























                10














                Run this command in your target device



                export VALGRIND_LIB=~/valgrind/lib/valgrind/


                where ./valgrind is installed directory path (given in ./configure)






                share|improve this answer




























                  10












                  10








                  10







                  Run this command in your target device



                  export VALGRIND_LIB=~/valgrind/lib/valgrind/


                  where ./valgrind is installed directory path (given in ./configure)






                  share|improve this answer















                  Run this command in your target device



                  export VALGRIND_LIB=~/valgrind/lib/valgrind/


                  where ./valgrind is installed directory path (given in ./configure)







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 29 '15 at 9:49









                  don_crissti

                  50.9k15135163




                  50.9k15135163










                  answered Oct 29 '15 at 9:33









                  bhargavbhargav

                  10113




                  10113

























                      4














                      The problem is that 'valgrind' is looking for a different executable to run the real checking. It uses the install path you specified when you configured it, which is not the same path as on the target.



                      You should be able to confirm this by creating a symlink /home/NFS_mounted on your target that points to '/'.






                      share|improve this answer
























                      • How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it?

                        – celavek
                        Sep 6 '10 at 22:23











                      • I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path.

                        – Kristof Provost
                        Sep 7 '10 at 8:23
















                      4














                      The problem is that 'valgrind' is looking for a different executable to run the real checking. It uses the install path you specified when you configured it, which is not the same path as on the target.



                      You should be able to confirm this by creating a symlink /home/NFS_mounted on your target that points to '/'.






                      share|improve this answer
























                      • How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it?

                        – celavek
                        Sep 6 '10 at 22:23











                      • I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path.

                        – Kristof Provost
                        Sep 7 '10 at 8:23














                      4












                      4








                      4







                      The problem is that 'valgrind' is looking for a different executable to run the real checking. It uses the install path you specified when you configured it, which is not the same path as on the target.



                      You should be able to confirm this by creating a symlink /home/NFS_mounted on your target that points to '/'.






                      share|improve this answer













                      The problem is that 'valgrind' is looking for a different executable to run the real checking. It uses the install path you specified when you configured it, which is not the same path as on the target.



                      You should be able to confirm this by creating a symlink /home/NFS_mounted on your target that points to '/'.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Sep 6 '10 at 20:52









                      Kristof ProvostKristof Provost

                      494411




                      494411













                      • How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it?

                        – celavek
                        Sep 6 '10 at 22:23











                      • I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path.

                        – Kristof Provost
                        Sep 7 '10 at 8:23



















                      • How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it?

                        – celavek
                        Sep 6 '10 at 22:23











                      • I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path.

                        – Kristof Provost
                        Sep 7 '10 at 8:23

















                      How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it?

                      – celavek
                      Sep 6 '10 at 22:23





                      How does it look for that path? The pkgconfig contains the correct target path so from where does it try to take it?

                      – celavek
                      Sep 6 '10 at 22:23













                      I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path.

                      – Kristof Provost
                      Sep 7 '10 at 8:23





                      I think it's compiled in. The ./configure script generates a config.h header file, which should contain the prefix path.

                      – Kristof Provost
                      Sep 7 '10 at 8:23











                      2














                      Put in VALGRIND_LIB the parent directory of amd64-linux directory.
                      E.g.:



                      export VALGRIND_LIB=/u/gallinar/downloaded/valgrind-3.2.3/.in_place



                      it worked for me today :).






                      share|improve this answer
























                      • I'm missing the .in_place in the folder.

                        – ArmenB
                        Apr 22 '14 at 21:14
















                      2














                      Put in VALGRIND_LIB the parent directory of amd64-linux directory.
                      E.g.:



                      export VALGRIND_LIB=/u/gallinar/downloaded/valgrind-3.2.3/.in_place



                      it worked for me today :).






                      share|improve this answer
























                      • I'm missing the .in_place in the folder.

                        – ArmenB
                        Apr 22 '14 at 21:14














                      2












                      2








                      2







                      Put in VALGRIND_LIB the parent directory of amd64-linux directory.
                      E.g.:



                      export VALGRIND_LIB=/u/gallinar/downloaded/valgrind-3.2.3/.in_place



                      it worked for me today :).






                      share|improve this answer













                      Put in VALGRIND_LIB the parent directory of amd64-linux directory.
                      E.g.:



                      export VALGRIND_LIB=/u/gallinar/downloaded/valgrind-3.2.3/.in_place



                      it worked for me today :).







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jan 9 '13 at 12:41









                      HemantHemant

                      4,23623238




                      4,23623238













                      • I'm missing the .in_place in the folder.

                        – ArmenB
                        Apr 22 '14 at 21:14



















                      • I'm missing the .in_place in the folder.

                        – ArmenB
                        Apr 22 '14 at 21:14

















                      I'm missing the .in_place in the folder.

                      – ArmenB
                      Apr 22 '14 at 21:14





                      I'm missing the .in_place in the folder.

                      – ArmenB
                      Apr 22 '14 at 21:14











                      0














                      VALGRIND_LIB needs to be pointing to the folder that has memcheck tool and other dependent x compiled libs





                      share








                      New contributor




                      DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.

























                        0














                        VALGRIND_LIB needs to be pointing to the folder that has memcheck tool and other dependent x compiled libs





                        share








                        New contributor




                        DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.























                          0












                          0








                          0







                          VALGRIND_LIB needs to be pointing to the folder that has memcheck tool and other dependent x compiled libs





                          share








                          New contributor




                          DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.










                          VALGRIND_LIB needs to be pointing to the folder that has memcheck tool and other dependent x compiled libs






                          share








                          New contributor




                          DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.








                          share


                          share






                          New contributor




                          DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.









                          answered 5 mins ago









                          DERRIC LYNSDERRIC LYNS

                          1




                          1




                          New contributor




                          DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.





                          New contributor





                          DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






                          DERRIC LYNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.






























                              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%2f1680%2fusing-cross-compiled-valgrind%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号伴広島線

                              Accessing regular linux commands in Huawei's Dopra Linux