simple problem : crt1 and crti not found

I tryed to compile this simple program but it does not work.
It seems there are missing files.
How can i fix it ?
I use Ubuntu 11.10

alechand@pcsantos2:~/test_acc$ more te.f90
program te
double precision x
integer i

do i=1,5
write(,) i

end program te
alechand@pcsantos2:~/test_acc$ pgfortran -o gg te.f90
NOTE: your trial license will expire in 14 days, 7.49 hours.
NOTE: your trial license will expire in 14 days, 7.49 hours.
/usr/bin/ld: cannot find /usr/lib/crt1.o: No such file or directory
/usr/bin/ld: cannot find /usr/lib/crti.o: No such file or directory

Hi alechand_ps,

It appears that the compilers did not get installed correctly most likely due to missing system development packages. Ubuntu doesn’t always install development tools by default, so you may need install the “build essentials” packages (

sudo apt-get install build-essential checkinstall

You may need to also install the 32-bit compatibility packages:

sudo apt-get install ia32-libs
sudo apt-get install g++-multilib

After these are installed, you will need to reinstall the PGI compilers.

Hope this helps,

Hi, i am here again…
Now this is the message.
I think i cannot use it in ubuntu 12.05, right ?
Can i install an older version of gcc ?

alechand@pcsantos2:~/test_acc$ pgfortran -acc -o gg dn.f90
NOTE: your trial license will expire in 13 days, 21.5 hours.
NOTE: your trial license will expire in 13 days, 21.5 hours.
In file included from /opt/pgi/linux86/2012/cuda/4.0/include/cuda_runtime.h:59:0,
from /tmp/pgaccaKIaFik4Fzo.gpu:1:
/opt/pgi/linux86/2012/cuda/4.0/include/host_config.h:82:2: error: #error – unsupported GNU version! gcc 4.5 and up are not supported!
PGF90-W-0155-Compiler failed to translate accelerator region (see -Minfo messages): Device compiler exited with error status code (dn.f90: 14)
0 inform, 1 warnings, 0 severes, 0 fatal for dn

i have gcc4.4 installed, how can i tell pgi compilers to use it ?
instead of use the updated gcc …


The compilers need gcc installed to make use of the header files and runtime libs.

They install using whatever gcc is in your default path.
% gcc -m64 -o hello hello.c -v
% gcc -m32 -o hello hello.c -v

should reveal the version your $PATH is using, and whether gcc has 32-bit
and 64-bit support. hello.c is any hello world c program.

The CUDA message about gcc 4.5 or geater being a problem, has a simple workaround.

In the file $PGI/linux86(-64)/2012/cuda/4.0/include/host_config.h
and change the line
#if GNUC > 4 || (GNUC == 4 && GNUC_MINOR > 4)
to#if GNUC > 4 || (GNUC == 4 && GNUC_MINOR > 6)

and things should work as expected. Note ‘linux86(-64)’ means both
‘linux86’ and ’ linux86-64’ branches of the directory.

The same changes should be made on the 4.1 directories as well.

Thank you a lot, now i can try to implement
openacc in my codes . . .
see you