|
From: Tim S. <st...@cs...> - 2009-06-09 08:21:12
|
Dear Valgrind Developers/Users, I was wondering if someone could tell me how I can build the latest release of Valgrind (and its utilities) as static executables without the '-shared' compiler option which seems to be the default. I was hoping that '--enable-static' or '--disable-shared' options would be accepted by ./configure but this doesn't seem to be the case. Currently I am working in an environment where dynamic libraries are not supported. Regards, Tim. |
|
From: Tom H. <to...@co...> - 2009-06-09 08:40:14
|
Tim Stitt wrote: > I was wondering if someone could tell me how I can build the latest > release of Valgrind (and its utilities) as static executables without > the '-shared' compiler option which seems to be the default. I was > hoping that '--enable-static' or '--disable-shared' options would be > accepted by ./configure but this doesn't seem to be the case. Currently > I am working in an environment where dynamic libraries are not supported. Actually valgrind is (unusually) pretty much entirely statically linked. I suspect what you are talking about the preload libraries, which have to be shared in order to do their job. Without them you will find that valgrind's functionality is somewhat restricted, just as it is when you run valgrind on a static executable. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Tim S. <st...@cs...> - 2009-06-09 09:16:12
|
Hi Tom...thanks for replying. The compile error is as follows...which seems to be related to your comment on the preloading i.e. the source file contains preload in its name: cc -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -o vgpreload_core-amd64-linux.so -nodefaultlibs -shared -Wl,-z,interpose,-z,initfirst -m64 vgpreload_core_amd64_linux_so-vg_preloaded.o /usr/bin/ld: /opt/gcc/4.3.2/snos/lib/gcc/x86_64-suse-linux/4.3.2/crtbeginT.o: relocation R_X86_64_32 against `__DTOR_END__' can not be used when making a shared object; recompile with -fPIC /opt/gcc/4.3.2/snos/lib/gcc/x86_64-suse-linux/4.3.2/crtbeginT.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[3]: *** [vgpreload_core-amd64-linux.so] Error 1 Do you suggest continuing to be build Valgrind (if possible) in this environment, if its functionality is going to be limited? Thanks in advance, Tim. Tom Hughes wrote: > Tim Stitt wrote: > >> I was wondering if someone could tell me how I can build the latest >> release of Valgrind (and its utilities) as static executables without >> the '-shared' compiler option which seems to be the default. I was >> hoping that '--enable-static' or '--disable-shared' options would be >> accepted by ./configure but this doesn't seem to be the case. >> Currently I am working in an environment where dynamic libraries are >> not supported. > > Actually valgrind is (unusually) pretty much entirely statically linked. > > I suspect what you are talking about the preload libraries, which have > to be shared in order to do their job. Without them you will find that > valgrind's functionality is somewhat restricted, just as it is when > you run valgrind on a static executable. > > Tom > -- Timothy Stitt Ph.D HPC Applications Analyst Scientific Computing Group Swiss National Supercomputing Centre (CSCS) Galleria 2 - Via Cantonale CH-6928 Manno, Switzerland +41 (0) 91 610 8233 st...@cs... |
|
From: Tom H. <to...@co...> - 2009-06-09 09:23:43
|
Tim Stitt wrote: > The compile error is as follows...which seems to be related to your > comment on the preloading i.e. the source file contains preload in its > name: > > cc -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement > -fno-stack-protector -o vgpreload_core-amd64-linux.so -nodefaultlibs > -shared -Wl,-z,interpose,-z,initfirst -m64 > vgpreload_core_amd64_linux_so-vg_preloaded.o /usr/bin/ld: > /opt/gcc/4.3.2/snos/lib/gcc/x86_64-suse-linux/4.3.2/crtbeginT.o: > relocation R_X86_64_32 against `__DTOR_END__' can not be used when > making a shared object; recompile with -fPIC > /opt/gcc/4.3.2/snos/lib/gcc/x86_64-suse-linux/4.3.2/crtbeginT.o: could > not read symbols: Bad value > collect2: ld returned 1 exit status > make[3]: *** [vgpreload_core-amd64-linux.so] Error 1 > > Do you suggest continuing to be build Valgrind (if possible) in this > environment, if its functionality is going to be limited? Yes, that's it trying to build the preload library which is used to intercept things like malloc in the client program. Without the preload library, or when valgrinding static executables in general, malloc/free etc will not be intercepted and valgrind will not be able to track heap blocks. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |