Hi Duncan, Thanks for your answers. Compiling .s file is OK after adding the -lgfortran -lgfortranbegin. I replace my Ubuntu 8.04 and by Ubuntu 8.10. And I checked all new packages installed by 'apt-get' are amd64 version. However after compiling the llvm-gfortran, I got the same error. 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 $ make LLVM_VERSION_INFO=2.3 Without any one of --disable-shared, --disable-multilib, the make will fail. Could you give me the arguments you used for the 'configure', and the output of the 'configure'? I want to check whether my OS misses some packages that needed by llvm-gcc. I feel the libgfortran built in my OS may incorrect, due to different configure settings. BTW, I check the libgfortran.a in my system: After make, the new generated libgfortran.a: -rw-r--r-- 1 jli127 jli127 1513500 2008-11-06 19:17 /llvm/llvm-gcc/install/lib64/libgfortran.a -rw-r--r-- 1 jli127 jli127 1513500 2008-11-06 19:16 /llvm/llvm-gcc/obj/x86_64-unknown-linux-gnu/libgfortran/.libs/libgfortran.a It's different to the system original libgfortran.a: -rw-r--r-- 1 root root 1854562 2008-10-25 01:40 /usr/lib/gcc/x86_64-linux-gnu/4.3/libgfortran.a 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 Thanks, Jun -- View this message in context: http://www.nabble.com/llvm-gfortran-gives-errors-on-AMD64-Ubuntu-tp20280697p20373363.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
Anton Korobeynikov
2008-Nov-07 07:54 UTC
[LLVMdev] llvm-gfortran gives errors on AMD64-Ubuntu
Hi Jun,> Without any one of --disable-shared, --disable-multilib, the make will fail.This is correct. I fixed multilib & PIC codegen for x86-64 only recently, so this will go to 2.4 release. Please carefully read README.LLVM file> It's different to the system original libgfortran.a:Yes, surely, because they were compiled from different sources with different compilers! -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Hi,> 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++,fortranthis 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 statusProbably 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]. Ciao, Duncan.
Hi Duncan, I tried the llvm-2.4 and llvm-gcc-4.2-2.4, but I got same error. :( It seems is the GCC's problem. Ubuntu 8.10 does use gcc 4.3. Could you tell me what version of gcc you are using? Could you send me your configure result for llvm and llvm-gcc? I suspect some packages may be missing since I have a new installed OS. Thanks. Jun -- View this message in context: http://www.nabble.com/llvm-gfortran-gives-errors-on-AMD64-Ubuntu-tp20280697p20445018.html Sent from the LLVM - Dev mailing list archive at Nabble.com.