|
From: Christian K. <chr...@tu...> - 2008-04-28 11:10:32
|
> I had to compile Valgrind source code on a different host because I do > not have any compilation tools installed on my production host. > > I thought of using "-prefix=<Install-dir-path>" while doing > "./configure". > > But I cannot do that also because the directory structure on > production > host is totally different than development host (this is because user > logins are different). This is the scenario that DESTDIR is made for. Configure Valgrind exactly like you would do it when building on your production machine (i.e., use the prefix from that machine), make all, and then $ make install DESTDIR=temporary/install/prefix This way make will compile the correct paths into the library but copy the files to <temporary/install/prefix/...> from where you can just copy everything to your production machine. Cheers, Christian -- Christian Keil /"\ Institute for Reliable Computing \ / ASCII Ribbon Campaign Hamburg University of Technology X against HTML email & vCards mail:c....@tu... / \ |
|
From: Julian S. <js...@ac...> - 2008-04-28 11:22:12
|
On Monday 28 April 2008 13:10, Christian Keil wrote: > > I had to compile Valgrind source code on a different host because I do > > not have any compilation tools installed on my production host. > > > > I thought of using "-prefix=<Install-dir-path>" while doing > > "./configure". > > > > But I cannot do that also because the directory structure on > > production > > host is totally different than development host (this is because user > > logins are different). > > This is the scenario that DESTDIR is made for. Configure Valgrind > exactly like you would do it when building on your production machine > (i.e., use the prefix from that machine), make all, and then > > $ make install DESTDIR=temporary/install/prefix > > This way make will compile the correct paths into the library but copy > the files to <temporary/install/prefix/...> from where you can just copy > everything to your production machine. Sounds good, but do you know if this really works with Valgrind? I'm sure we "bake in" some paths at build time. J |
|
From: Ashley P. <api...@co...> - 2008-04-28 11:26:15
|
On Mon, 2008-04-28 at 13:16 +0200, Julian Seward wrote: > On Monday 28 April 2008 13:10, Christian Keil wrote: > > > I had to compile Valgrind source code on a different host because I do > > > not have any compilation tools installed on my production host. > > > > > > I thought of using "-prefix=<Install-dir-path>" while doing > > > "./configure". > > > > > > But I cannot do that also because the directory structure on > > > production > > > host is totally different than development host (this is because user > > > logins are different). > > > > This is the scenario that DESTDIR is made for. Configure Valgrind > > exactly like you would do it when building on your production machine > > (i.e., use the prefix from that machine), make all, and then > > > > $ make install DESTDIR=temporary/install/prefix > > > > This way make will compile the correct paths into the library but copy > > the files to <temporary/install/prefix/...> from where you can just copy > > everything to your production machine. > > Sounds good, but do you know if this really works with Valgrind? > I'm sure we "bake in" some paths at build time. Surely this would be a bug then ;) As long as the baked in paths are what was given to configure it should work just fine. Granted the install might not work from DESTDIR but once copied to the prefix dir it should. Ashley, |
|
From: Tom H. <to...@co...> - 2008-04-28 11:36:43
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> On Monday 28 April 2008 13:10, Christian Keil wrote:
>
>> This is the scenario that DESTDIR is made for. Configure Valgrind
>> exactly like you would do it when building on your production machine
>> (i.e., use the prefix from that machine), make all, and then
>>
>> $ make install DESTDIR=temporary/install/prefix
>>
>> This way make will compile the correct paths into the library but copy
>> the files to <temporary/install/prefix/...> from where you can just copy
>> everything to your production machine.
>
> Sounds good, but do you know if this really works with Valgrind?
> I'm sure we "bake in" some paths at build time.
It works fine - use it all the time to build RPMs.
Baking in paths is fine - that's the difference between setting the
prefix (which controls the run time path that is baked in) and setting
the DESTDIR at install time which only affects where files are put
so that you can then package them up cleanly.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Daniel K. <dan...@bu...> - 2010-11-03 14:40:25
|
Ashley Pittman <apittman <at> concurrent-thinking.com> writes: > > > On Mon, 2008-04-28 at 13:16 +0200, Julian Seward wrote: > > On Monday 28 April 2008 13:10, Christian Keil wrote: > > > > I had to compile Valgrind source code on a different host because I do > > > > not have any compilation tools installed on my production host. > > > > > > > > I thought of using "-prefix=<Install-dir-path>" while doing > > > > "./configure". > > > > > > > > But I cannot do that also because the directory structure on > > > > production > > > > host is totally different than development host (this is because user > > > > logins are different). > > > > > > This is the scenario that DESTDIR is made for. Configure Valgrind > > > exactly like you would do it when building on your production machine > > > (i.e., use the prefix from that machine), make all, and then > > > > > > $ make install DESTDIR=temporary/install/prefix > > > > > > This way make will compile the correct paths into the library but copy > > > the files to <temporary/install/prefix/...> from where you can just copy > > > everything to your production machine. > > > > Sounds good, but do you know if this really works with Valgrind? > > I'm sure we "bake in" some paths at build time. > > Surely this would be a bug then ;) As long as the baked in paths are > what was given to configure it should work just fine. Granted the > install might not work from DESTDIR but once copied to the prefix dir it > should. There is an environment variable called VALGRIND_LIB This can be set to point to teh base directory of where the tools are. Valgrind do not document the workaround very well imho see http://valgrind.org/docs/manual/dist.readme-developers.html For my cluster: $ export VALGRIND_LIB= \ /opt/opens/VALGRIND_OPENS/valgrind_opens-3.4.1_Bull.9010/lib/valgrind/ hence: /opt/opens/VALGRIND_OPENS/valgrind_opens-3.4.1_Bull.9010/bin/valgrind /bin/ls ==15928== Memcheck, a memory error detector. ==15928== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. ==15928== Using LibVEX rev 1884, a library for dynamic binary translation. ==15928== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. (lines deleted) Hope this helps, Daniel |