Anybody using valgrind memory leak detection tool?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tvnaidu
    Contributor
    • Oct 2009
    • 365

    Anybody using valgrind memory leak detection tool?

    downloaded valgrind package and tried to compile - getting this link error- any idea?

    gcc -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -o memcheck-x86-linux -static -Wl,-defsym,valt_loa d_address=0x380 00000 -nodefaultlibs -nostartfiles -u _start -m32 -Wl,-T,../valt_load_addre ss_x86_linux.ld s memcheck_x86_li nux-mc_leakcheck.o memcheck_x86_li nux-mc_malloc_wrapp ers.o memcheck_x86_li nux-mc_main.o memcheck_x86_li nux-mc_translate.o memcheck_x86_li nux-mc_machine.o memcheck_x86_li nux-mc_errors.o ../coregrind/libcoregrind-x86-linux.a ../VEX/libvex-x86-linux.a -lgcc
    ../coregrind/libcoregrind-x86-linux.a(libcore grind_x86_linux _a-aspacemgr-linux.o): In function `vgPlain_am_do_ sync_check':
    m_aspacemgr/aspacemgr-linux.c:1059: undefined reference to `parse_procself maps'
    ../coregrind/libcoregrind-x86-linux.a(libcore grind_x86_linux _a-aspacemgr-linux.o): In function `vgPlain_am_sta rtup':
    m_aspacemgr/aspacemgr-linux.c:1683: undefined reference to `parse_procself maps'
    collect2: ld returned 1 exit status
    make[6]: *** [memcheck-x86-linux] Error 1
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    So where is parse_procselfm aps defined?

    It has to be in the file being compiled or there has to an extern for it. In the case of an extern, it has to be in a link library.

    Comment

    • tvnaidu
      Contributor
      • Oct 2009
      • 365

      #3
      Thanks, I fixed this. Now I tried to run on target, it is not running, I posted this in other thread

      Comment

      • cerr
        New Member
        • Jan 2010
        • 1

        #4
        Hi tvnaidu,

        How did you fix this? I'm having the same problem but i haven't been able to fix this yet...
        Thanks!
        roN

        Comment

        • tvnaidu
          Contributor
          • Oct 2009
          • 365

          #5
          first could you compile on host and verify: goto installation dir and issue this:

          ./configure; make ; make install

          the above command installs everything in /usr/local/bin and /use/local/lib/valgrind.


          if it works ok on host, then compile for your target, you have to pass which target, for my case is i386-linux-host, --prefix needs where to install, --prefix=/usr.

          for the above error, I did clean and then compile, it got compiled.

          Comment

          Working...