Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 841 characters in body
Source Link
prabhu
  • 111
  • 4

I have a small C++ program which I am compiling on a ubuntu machine. The program runs fine on the same machine, but when I copy and try to run on a different linux system it printed

./prog1 : No such file or directory.

Further probing I realized the VDSO (linux-vdso.so.1) support is not enabled on the kernel running in target linux machine.

Below is the output of ldd of the program from my linux machine.

linux-vdso.so.1 =>  (0x00007fffda425000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6ce9114000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6ce8efe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ce8b38000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ce8832000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6ce9432000)

Now I want to know how do I compile my code in my ubuntu pc to run this on the target ?

_______________________________________________-

new EDITS

the binary is marked for execution so tat is not the problem. and VDSO is not definetly the issue because I found the target kernel supports that.

Now I found a difference between the target kernel and the kernel installed on my ubuntu PC.

From target .... xmllint: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=9dc806b0866749772b0d2458ae74e7cea6e9a4aa, stripped

From Ubuntu ----- prog1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=4ab095886f476674a7bf30c11d5479f7daa91001, not stripped

So should I have compile my code with the higher kernel version i.e 2.6.32 ?

I have a small C++ program which I am compiling on a ubuntu machine. The program runs fine on the same machine, but when I copy and try to run on a different linux system it printed

./prog1 : No such file or directory.

Further probing I realized the VDSO (linux-vdso.so.1) support is not enabled on the kernel running in target linux machine.

Below is the output of ldd of the program from my linux machine.

linux-vdso.so.1 =>  (0x00007fffda425000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6ce9114000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6ce8efe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ce8b38000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ce8832000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6ce9432000)

Now I want to know how do I compile my code in my ubuntu pc to run this on the target ?

I have a small C++ program which I am compiling on a ubuntu machine. The program runs fine on the same machine, but when I copy and try to run on a different linux system it printed

./prog1 : No such file or directory.

Further probing I realized the VDSO (linux-vdso.so.1) support is not enabled on the kernel running in target linux machine.

Below is the output of ldd of the program from my linux machine.

linux-vdso.so.1 =>  (0x00007fffda425000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6ce9114000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6ce8efe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ce8b38000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ce8832000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6ce9432000)

Now I want to know how do I compile my code in my ubuntu pc to run this on the target ?

_______________________________________________-

new EDITS

the binary is marked for execution so tat is not the problem. and VDSO is not definetly the issue because I found the target kernel supports that.

Now I found a difference between the target kernel and the kernel installed on my ubuntu PC.

From target .... xmllint: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=9dc806b0866749772b0d2458ae74e7cea6e9a4aa, stripped

From Ubuntu ----- prog1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=4ab095886f476674a7bf30c11d5479f7daa91001, not stripped

So should I have compile my code with the higher kernel version i.e 2.6.32 ?

added 68 characters in body
Source Link
prabhu
  • 111
  • 4

I have a small C++ program which I am compiling on a ubuntu machine. The program runs fine on the same machine, but when I copy and try to run on a different linux system it printed

./prog1 : No such file or directory.

Further probing I realized the VDSO (linux-vdso.so.1) support is not enabled on the kernel running in target linux machine.

Below is the output of ldd of the program from my linux machine.

linux-vdso.so.1 =>  (0x00007fffda425000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6ce9114000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6ce8efe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ce8b38000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ce8832000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6ce9432000)

Now I want to know how do I compile my code in my ubuntu pc to run this on the target ?

I have a small C++ program which I am compiling on a ubuntu machine. The program runs fine on the same machine, but when I copy and try to run on a different linux system it printed

./prog1 : No such file or directory.

Further probing I realized the VDSO (linux-vdso.so.1) support is not enabled on the kernel running in target linux machine.

linux-vdso.so.1 =>  (0x00007fffda425000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6ce9114000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6ce8efe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ce8b38000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ce8832000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6ce9432000)

Now I want to know how do I compile my code in my ubuntu pc to run this on the target ?

I have a small C++ program which I am compiling on a ubuntu machine. The program runs fine on the same machine, but when I copy and try to run on a different linux system it printed

./prog1 : No such file or directory.

Further probing I realized the VDSO (linux-vdso.so.1) support is not enabled on the kernel running in target linux machine.

Below is the output of ldd of the program from my linux machine.

linux-vdso.so.1 =>  (0x00007fffda425000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6ce9114000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6ce8efe000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6ce8b38000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6ce8832000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6ce9432000)

Now I want to know how do I compile my code in my ubuntu pc to run this on the target ?

edited tags
Link
terdon
  • 252.2k
  • 69
  • 480
  • 718
Source Link
prabhu
  • 111
  • 4
Loading