>    I'm trying to profile valgrind using perftools-lite and when compiling
> the tools I get an undefined reference error.
> VEX and coregrind build, but during linking it errs (error is below).
> 
> I think it has do with static linking, the build command in memcheck was:
> 
> ../coregrind/link_tool_exe_linux 0x38000000 cc  -Wno-long-long -gdwarf-3
> -gstrict-dwarf -Wwrite-strings -fno-stack-protector   -o
> memcheck-amd64-linux -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow
> -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations
> -Wno-format-zero-length -fno-strict-aliasing -fno-builtin
> -fno-omit-frame-pointer -O2 -nodefaultlibs -nostartfiles -u _start
> -Wl,--build-id=none -m64 memcheck_amd64_linux-mc_leakcheck.o
> memcheck_amd64_linux-mc_malloc_wrappers.o memcheck_amd64_linux-mc_main.o
> memcheck_amd64_linux-mc_translate.o memcheck_amd64_linux-mc_machine.o
> memcheck_amd64_linux-mc_errors.o ../coregrind/libcoregrind-amd64-linux.a
> ../VEX/libvex-amd64-linux.a -lgcc
> 
> Does anyone have any suggestions on how to resolve this?

Run the link_tool_exe_linux under strace:
   strace -f -e trace=execve,file -o strace.out 
../coregrind/link_tool_exe_linux ...
in order to find out how many levels of execve() are involved, and exactly 
which files
are referenced when.

Many of the undefined symbols, such as _Unwind_Resume, are defined in
libgcc_s.so.1 or libgcc_eh.so.1.  So if you don't see those filenames,
or the *.a archive library analogs, then that's the problem.
Add them explicitly to the command line.


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees_APR
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to