Yes, I think you have 1.8. Sorry, I should have said that the version I am trying to install now is 1.71. I tried both versions at the beginning and both gave me a problem with erno.h. But then somebody tested my dataset on 1.8 (for MAC OS) and there is apparently a bug on this version so I made my latest attempts with 1.71 only.
I modified 1.71 makefile using 1.8 makefile:
LIBS = -lgfortran -lm # FORTRAN to C library, and standard C library
#LPATH = -L/usr/local/gfortran/lib
#LPATH = -L/usr/local/lib/gfortran
And then it worked...:) and 1.71 doesn't seem to have the bug observed on 1.8.
Thanks a lot for your help and sorry again for mixing up with the two version.
I just changed the line with memory.o and make worked in my machine with Ubuntu 12.04.