generate executable file that can't run!

I have encountered a strange problem.I compiled a Fortran source file to executable,it have only reported two warnings and generated the executable well,but after I ran it,it quited soon and gave me no response.Then I added a ‘print’ statement at the beginning of the soucefile and recompile it,but it did the same.
Who could give me a hand?
I was working on RedHat Linux 9,with PGI workstation 5.2 - PGF77,it is a
trial version

the following is information outputed in the process of debugging the program using pgdbg:
It poped up a dialog with the message “Signalled SIGSEGV at 0x40000be0,function _start,file”,and messages like “pgserv 4301: read: unable to read address 0x40000fc4” appeared in the terminal titled “PGDBG Program I/O”

The problem is still unsolved


sorry if this is a stupid suggestion:

is it possible that your program is simply waiting for a ?

We used the trial version some time ago, and I think one restriction was that executables need a to start.

(Which is o.k., of course… ;-) )

If you already tried this: sorry again!


Thanks for your suggestion all the same!

My case may not be the same as your.
I forgot to give other details.After I have run my program ,**it quited soon and act as it have done nothing.**Even it can’t access the first executable
statements in the source file(i.e the ‘print’ statement I added).

Thanks again!

Very odd. It appears to be seg faulting in the program start-up routine. “_start” is coming from the file “/usr/lib/crt1.o” which is a system provided object.

Have you modifed your system from the default installation, i.e upgraded the kernel or gcc version?
What are the warning messages your seeing?
What optimization are you using to compile?
Can you successfully run a hello world program?


       write (*.*) 'Hello World'

I hello.f doesn’t work, compile it again with “-v” and post the line that starts with “/usr/bin/ld”.


P.S. I’m not sure why Thomas encountered an issue where he had to press to run is program but this is not a requirment of the Demo version of the compiler. The Demo compilers are the exact same as the licensed versions, except they stop working after the demo period. That is until you get a license.

Oh no…

We definitively tried too many compilers… :-(

you are right, this things comes from Lahey lf95 trial.



2.PGFTN-W-0169-Multiple data initializations of common block const (waveglobe10_sj
PGFTN-W-0169-Multiple data initializations of common block consour (waveglobe10_sjq.f)
3.I have used the “-g” option,so I think the optimization level is 0
4.Yes.A program as follow
program test
write(,) “Successful”

Another possiblity is that the program is getting a stack overflow error. Try setting your stack size to unlimited (‘ulimit’) and run the program again. Also, try running the same executable on a different system.

  • Mat

I do it using the command “ulimit -s unlimited”,but it didn’t work.
When I used “ddd” to debug the program,it gives following messages:

  1. On RedHat 9 + PGI Fortran 5.2
    ~/sysdeps/i386/elf/start.S: No such file or directory
  2. On Redhat 7.2 + PGI Fortran 3.2-4
    ~/work/init.c: No such file or directory

“~” is my home directory,“work” is my working directory also where my program ran.

Now after program quited,it printed the message “Segmentation default”.

PS: my program had linked the NetCDF library(built by PGI compiler)

No,I didn’t use my own start.S file.Even I could find the start.S file in my system.How can I get it?
I have seen a string “…/sysdeps/i386/elf/start.S” in the /usr/lib/crt1.o,but I don’t understand it’s meanings.

I was more curious why ddd would be looking in your home directory for a system dependent start.s file. Is this a ddd thing or does your program have a particular start.s that it expects? Maybe your linking in the crt1.o start function instead of your “~/sysdeps/i386/elf/start.S” which causes the error. However, I just guessing at this point.

Is it possible to obtain the source code? I can send you an email with a location to send the code or if it’s publicly available can you post the location here?

  • Mat