Red Hat Bugzilla – Bug 4956
executable file produced by g77 doesn't execute
Last modified: 2008-05-01 11:37:51 EDT
I custom installed version 6.0 Linux and installed all
packages from the installation CD (selected "everything").
I wrote a test program for g77 which was suppose to print a
string to the terminal monitor. I ran the command
"g77 test.f (return)" and the file a.out was created. I
typed "a.out (return)" to execute and got the error message
"a.out: command not found". I tried the command
"g77 -o test test.f (return)" and the file 'test' was
created. When I typed "test (return)" to execute the
program, no error message appeared, but neither did the
test string so it appears the file didn't execute. Can you
figure out what's wrong? Thanks, Frank.
Current dir is not in the path - and should not be. Try "./a.out"
to run your "a.out" example. The "test" example behave differently
because "test" is a bash builtin (try "help test").
Thanks for letting us know. Frank Gaitan writes:
I figured out what the problem was regarding bug #4956.
My path wasn't set up to have the shell look in the
working directory for executable files. Also naming
the executable file "test" didn't help things any because
there is a Linux utility named "test"! I fixed my path,
and renamed the executable file, and g77 is working
fine now. There was no problem with the installation
of egcs-g77 after all (i.e. no real bug after all).