[LLVMdev] llvm-gfortran gives errors on AMD64-Ubuntu

Duncan Sands duncan.sands at math.u-psud.fr
Fri Nov 7 03:15:15 PST 2008


> Here is my configure arguments
> $ ../llvm-gcc4.2-2.3.source/configure --prefix=`pwd`/../install
> --program-prefix=llvm- \
> 	--disable-shared --disable-multilib \
> 	--enable-llvm=/llvm/llvm-obj --enable-languages=c,c++,fortran

this looks ok to me.  It's essentially the same as what I use.
Try with 2.4 (about to be released).  I'm not sure I ever tried
to build the 2.3 version of llvm-gfortran on x86-64.

> If replace it by system 'libgfortran.a', the error became:
> hello.o: In function `MAIN__':
> (.text+0x1e): undefined reference to `_gfortran_set_std'
> collect2: ld returned 1 exit status

Probably your system gcc version is different to 4.2.  Like gcc 4.2,
llvm-gcc generates a call to gfortran_set_std in MAIN__.  This function
is defined in the gcc 4.2 version of libgfortran, but apparently not in
other gcc versions.  [I think ubuntu 8.10 uses gcc 4.3].



More information about the llvm-dev mailing list