|
From: mihir a. <mih...@ya...> - 2021-01-07 10:54:50
|
Hi, I am trying to get valgrind running on cavium octeon 3 processor. Couldn't find any specific build configs for this other than some hints on the valgrind wiki. The steps executed to build valgrind for cavium were (on x86_64 host): export CC=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-gcc export CXX=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-g++ export PATH=$PATH:/opt/cavium-64bit/tools-3535/bin/ ./configure --host=mips64-linux-gnu --target=mips64-octeon-linux --prefix=/home/mihira/workspace/mylab/valgrind/cavium --exec-prefix=/var/tmp/cavium --disable-tls make && make install While trying to run it on target (copied the elfs to /var/tmp/cavium/ dir on the target): export VALGRIND_LIB=/var/tmp/cavium/lib/valgrind/ export PATH=$PATH:/var/tmp/cavium/bin/ valgrind -h -bash: /var/tmp/cavium/bin/valgrind: No such file or directory What's that blunder I am doing? Thanks,Mihir |
|
From: Tom H. <to...@co...> - 2021-01-07 11:29:00
|
On 07/01/2021 10:54, mihir amrelia via Valgrind-users wrote: > I am trying to get valgrind running on cavium octeon 3 processor. > > > Couldn't find any specific build configs for this other than some hints > on the valgrind wiki. > * > * > * > The steps executed to build valgrind for cavium were (on x86_64 host): > *export CC=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-gcc > export CXX=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-g++ > export PATH=$PATH:/opt/cavium-64bit/tools-3535/bin/ > ./configure --host=mips64-linux-gnu --target=mips64-octeon-linux > --prefix=/home/mihira/workspace/mylab/valgrind/cavium > --exec-prefix=/var/tmp/cavium --disable-tls > make && make install > > *While trying to run it on target (copied the elfs to /var/tmp/cavium/ > dir on the target):* > export VALGRIND_LIB=/var/tmp/cavium/lib/valgrind/ > export PATH=$PATH:/var/tmp/cavium/bin/ > valgrind -h > -bash: /var/tmp/cavium/bin/valgrind: No such file or directory > > > What's that blunder I am doing? At a guess the ELF interpreter specified in the compiled valgrind launcher doesn't exist - that can lead to that confusing error when running a executable that exists. Try "file /var/tmp/cavium/bin/valgrind" and see what it says about it - part of the result should be something like this: interpreter /lib64/ld-linux-x86-64.so.2 which will tell what interpreter it is using. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: mihir a. <mih...@ya...> - 2021-01-10 18:21:55
|
Tom, Thanks a lot for your response.Yes, it doesn't look like the one I should be expecting.. file /var/tmp/cavium/bin/valgrind/var/tmp/cavium/bin/valgrind: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (SYSV), dynamically linked, interpreter /lib64-f, for GNU/Linux 2.6.32, not stripped How to fix this? -Mihir On Thursday, 7 January, 2021, 04:36:45 pm IST, Tom Hughes <to...@co...> wrote: On 07/01/2021 10:54, mihir amrelia via Valgrind-users wrote: > I am trying to get valgrind running on cavium octeon 3 processor. > > > Couldn't find any specific build configs for this other than some hints > on the valgrind wiki. > * > * > * > The steps executed to build valgrind for cavium were (on x86_64 host): > *export CC=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-gcc > export CXX=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-g++ > export PATH=$PATH:/opt/cavium-64bit/tools-3535/bin/ > ./configure --host=mips64-linux-gnu --target=mips64-octeon-linux > --prefix=/home/mihira/workspace/mylab/valgrind/cavium > --exec-prefix=/var/tmp/cavium --disable-tls > make && make install > > *While trying to run it on target (copied the elfs to /var/tmp/cavium/ > dir on the target):* > export VALGRIND_LIB=/var/tmp/cavium/lib/valgrind/ > export PATH=$PATH:/var/tmp/cavium/bin/ > valgrind -h > -bash: /var/tmp/cavium/bin/valgrind: No such file or directory > > > What's that blunder I am doing? At a guess the ELF interpreter specified in the compiled valgrind launcher doesn't exist - that can lead to that confusing error when running a executable that exists. Try "file /var/tmp/cavium/bin/valgrind" and see what it says about it - part of the result should be something like this: interpreter /lib64/ld-linux-x86-64.so.2 which will tell what interpreter it is using. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: Tom H. <to...@co...> - 2021-01-10 18:25:42
|
No idea - that will be down to your cross build toolchain. Tom On 10/01/2021 18:21, mihir amrelia wrote: > Tom, > > Thanks a lot for your response. > Yes, it doesn't look like the one I should be expecting.. > > file /var/tmp/cavium/bin/valgrind > /var/tmp/cavium/bin/valgrind: ELF 64-bit MSB executable, MIPS, MIPS64 > rel2 version 1 (SYSV), dynamically linked, interpreter /lib64-f, for > GNU/Linux 2.6.32, not stripped > > How to fix this? > > -Mihir > On Thursday, 7 January, 2021, 04:36:45 pm IST, Tom Hughes > <to...@co...> wrote: > > > On 07/01/2021 10:54, mihir amrelia via Valgrind-users wrote: > > > > I am trying to get valgrind running on cavium octeon 3 processor. > > > > > > Couldn't find any specific build configs for this other than some hints > > on the valgrind wiki. > > * > > * > > * > > The steps executed to build valgrind for cavium were (on x86_64 host): > > *export CC=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-gcc > > export CXX=/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-g++ > > export PATH=$PATH:/opt/cavium-64bit/tools-3535/bin/ > > ./configure --host=mips64-linux-gnu --target=mips64-octeon-linux > > --prefix=/home/mihira/workspace/mylab/valgrind/cavium > > --exec-prefix=/var/tmp/cavium --disable-tls > > make && make install > > > > *While trying to run it on target (copied the elfs to /var/tmp/cavium/ > > dir on the target):* > > export VALGRIND_LIB=/var/tmp/cavium/lib/valgrind/ > > export PATH=$PATH:/var/tmp/cavium/bin/ > > valgrind -h > > -bash: /var/tmp/cavium/bin/valgrind: No such file or directory > > > > > > What's that blunder I am doing? > > > At a guess the ELF interpreter specified in the compiled > valgrind launcher doesn't exist - that can lead to that > confusing error when running a executable that exists. > > Try "file /var/tmp/cavium/bin/valgrind" and see what it says > about it - part of the result should be something like this: > > interpreter /lib64/ld-linux-x86-64.so.2 > > which will tell what interpreter it is using. > > Tom > > -- > Tom Hughes (to...@co... <mailto:to...@co...>) > http://compton.nu/ <http://compton.nu/> > -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: John R. <jr...@bi...> - 2021-01-10 20:46:43
|
mihir amrelia wrote:
>> file /var/tmp/cavium/bin/valgrind
>> /var/tmp/cavium/bin/valgrind: ELF 64-bit MSB executable, MIPS, MIPS64 rel2 version 1 (SYSV), dynamically linked, interpreter /lib64-f, for GNU/Linux 2.6.32, not stripped
>>
>> How to fix this?
Tom Hughes via Valgrind-users wrote:
> No idea - that will be down to your cross build toolchain.
Diagnose by something like:
strace -f -o strace.out -e trace=execve -v -s 400 gcc hello.c
then search for "lib64-f" in strace.out.
For a native compile tool chain the relevant piece in strace.out is something like:
execve("/usr/bin/ld", ["/usr/bin/ld", ... "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", ...
which would be changed by something like
gcc -Wl,-dynamic-linker,path_to_eventual_dynamic_linker ...
|