Help: gcc 4.3.2 installation problem:

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
liying wei
Posts: 3
Joined: April 14 2009
Affiliation: ANU

Help: gcc 4.3.2 installation problem:

Post by liying wei » April 20 2009

This problem appeared in my laptop. The ubuntu version is 8.10 and so it requires g95 compiler. When I installed Healpix, I met the following problem. I do hope someone can give me some notes. Thanks a lot.

I did according to the link http://www.g95.org/source.shtml

download and decompress ,then
cd gcc-4.0.3
mkdir g95
cd g95
../configure --enable-languages=c
make
------------------------------------
I got the following error report:
In function ‘open’,
inlined from ‘collect_execute’ at ../../gcc/collect2.c:1580:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[1]: *** [collect2.o] Error 1
make[1]: Leaving directory `/home/wly/software/gcc-4.0.3/g95/gcc'
make: *** [all-gcc] Error 2

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

Help: gcc 4.3.2 installation problem:

Post by Pascal Vaudrevange » April 20 2009

Hi Liying,

why do you need g95 and not gfortran which ships with Ubuntu 8.10?

Pascal

Savvas Nesseris
Posts: 77
Joined: April 05 2005
Affiliation: UAM/IFT
Contact:

Help: gcc 4.3.2 installation problem:

Post by Savvas Nesseris » April 21 2009

Furthermore, if you really want g95 just download a binary, no need to compile it from source.

liying wei
Posts: 3
Joined: April 14 2009
Affiliation: ANU

Re: Help: gcc 4.3.2 installation problem:

Post by liying wei » April 23 2009

Hi, Pascal,

Thanks your advice. I had solved this problem in my laptop at present.

I am odd about this compiler problem too: for when I type "gfortran" in installing Healpix, my system does not support; it gave me error report amd exit the configure procedure. But if I type "g95", it works. So I do not know.

Anyway, thanks a lot.


Pascal Vaudrevange wrote:Hi Liying,

why do you need g95 and not gfortran which ships with Ubuntu 8.10?

Pascal

Pascal Vaudrevange
Posts: 50
Joined: March 26 2006
Affiliation: DESY
Contact:

Help: gcc 4.3.2 installation problem:

Post by Pascal Vaudrevange » April 23 2009

Hi Liying,

I think that gfortran is not installed by default, but needs to be selected separately, i.e. do an

Code: Select all

sudo apt-get install gfortran
and this should install it for you.

Pascal

liying wei
Posts: 3
Joined: April 14 2009
Affiliation: ANU

Re: Help: gcc 4.3.2 installation problem:

Post by liying wei » April 27 2009

HI, Pascal,

I tried your advice. But when I type

sudo apt-get install gfortran

it gives me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package gfortan

You guys said that Ubuntu 8.10 has gfortran. And I check
wly@wly-laptop:~/software/Healpix_2.11$ whereis gfortran
gfortran: /usr/bin/gfortran /usr/share/man/man1/gfortran.1.gz

How could I do in the next?

Post Reply