RE: [suse-programming-e] Cannot run compiled programs from GCC -- SuSE 9.2
Typically that means that the a.out created doesn't have the EXECUTE permission turned on. You forget that you speciifed -c ( compile only - no link ) along with -o a.out so you only compile to an object file and it never calls the linker. The fact you specified -o a.out overrides the default name of file.o Try the command file a.out And see what the file type of a.out is? ---- -----Original Message----- From: Giorgos Papamarkos [mailto:kaizer_soze_gp@yahoo.gr] Sent: Tuesday, November 16, 2004 1:43 PM To: suse-programming-e@suse.com Subject: [suse-programming-e] Cannot run compiled programs from GCC -- SuSE 9.2 Hi there, I just installed SuSE 9.2 but I face a SERIOUS and extremely nasty problem. When I compile a program with GCC/G++ I cannot run it getting instead a: *bash: ./a.out: Permission denied* As you can understand I cannot work with that. Has anyone of you any idea? Don't tell me that this is a matter of permissions, 'cause it is not :) Thanks a lot. George -- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
I did run the 'file' command on 'a.out' and here is the output: erebus gpapa05/temp> !file file a.out a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped It seems that the EXECUTE options is set. Any other ideas ??? --gp
Typically that means that the a.out created doesn't have the EXECUTE permission turned on.
You forget that you speciifed -c ( compile only - no link ) along with -o a.out so you only compile to an object file and it never calls the linker. The fact you specified -o a.out overrides the default name of file.o
Try the command
file a.out
And see what the file type of a.out is?
----
-----Original Message----- From: Giorgos Papamarkos [mailto:kaizer_soze_gp@yahoo.gr] Sent: Tuesday, November 16, 2004 1:43 PM To: suse-programming-e@suse.com Subject: [suse-programming-e] Cannot run compiled programs from GCC -- SuSE 9.2
Hi there, I just installed SuSE 9.2 but I face a SERIOUS and extremely nasty problem. When I compile a program with GCC/G++ I cannot run it getting instead a:
*bash: ./a.out: Permission denied*
As you can understand I cannot work with that. Has anyone of you any idea? Don't tell me that this is a matter of permissions, 'cause it is not :)
Thanks a lot.
George
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
____________________________________________________________ Do You Yahoo!? Αποκτήστε τη δωρεάν @yahoo.gr διεύθυνση σας στο http://www.otenet.gr
George Papamarkos wrote:
I did run the 'file' command on 'a.out' and here is the output:
erebus gpapa05/temp> !file file a.out a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
It seems that the EXECUTE options is set. Any other ideas ???
What's "ldd a.out" telling? What says "strace ./a.out"? -- Mit freundlichen Grüßen Best regards // Dierk Froehling // aycan Digitalsysteme GmbH // Innere Aumuehlstrasse 5 // 97076 Wuerzburg // Germany // phone: +49.931.270 40 90 // fax: +49.931.270 40 91 // mailto:dfroehling@aycan.de // http://www.aycan.de
participants (3)
-
Calkins, Dennis
-
Dierk Fröhling
-
George Papamarkos