|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Error linking with libgfortran version (pardiso and lapack libs)Hi all,
I am trying to compile a program that requires both LAPACK and Pardiso libraries on a Centos 4.5 x86_64 using gcc/gfortran. I am linking with the file libpardiso400_GNU430_IA64.so that was compiled with gcc/gfortran 4.3. I compiled LAPACK 3.2.1 using my current gfortran version 4.1.2 on my Centos (I could not update it to 4.2 or higher). However, when I compiled I got this error: /root/pardisolib/libpardiso400_GNU430_IA64.so: undefined reference to `_gfortran_os_error' I checked that my libgfortran version did not include that reference. Then I downloaded newer gfortran versions (4.3.1) to link with libgfortran.so.3 This solved the problem about _gfortran_os_error but I got new errors concerning the LAPACK lib: /root/lapack-3.2.1/lapack_LINUX.a(dlamch.o)(.text+0xb04): En la función `dlamc2_': : undefined reference to `_gfortran_pow_r8_i4' /root/lapack-3.2.1/lapack_LINUX.a(ilaenv.o)(.text+0x7a): En la función `ilaenv_': : undefined reference to `_gfortran_copy_string' These two functions are not included in libgfortran.so.3. I found that the right version of gfortran that might solve both errors is gfortran.4.2.3 (libgfortran.so.2). However I have not been able to find it for Centos x86_64. It looks like there is no libgfortran.so.2 compatible for this machine (or I could not find it!) Any idea about how to link both libs together? It would be more than appreciated. Thanks for the help. Regards, Francisco |
|
|
Re: Error linking with libgfortran version (pardiso and lapack libs)2009/11/6 fcostela <francisco.costela@...>:
> > Hi all, > > I am trying to compile a program that requires both LAPACK and Pardiso > libraries on a Centos 4.5 x86_64 using gcc/gfortran. I am linking with the > file libpardiso400_GNU430_IA64.so that was compiled with gcc/gfortran 4.3. > I compiled LAPACK 3.2.1 using my current gfortran version 4.1.2 on my Centos > (I could not update it to 4.2 or higher). > > However, when I compiled I got this error: > /root/pardisolib/libpardiso400_GNU430_IA64.so: undefined reference to > `_gfortran_os_error' > > I checked that my libgfortran version did not include that reference. Then I > downloaded newer gfortran versions (4.3.1) to link with libgfortran.so.3 > > This solved the problem about _gfortran_os_error but I got new errors > concerning the LAPACK lib: > /root/lapack-3.2.1/lapack_LINUX.a(dlamch.o)(.text+0xb04): En la función > `dlamc2_': > : undefined reference to `_gfortran_pow_r8_i4' > /root/lapack-3.2.1/lapack_LINUX.a(ilaenv.o)(.text+0x7a): En la función > `ilaenv_': > : undefined reference to `_gfortran_copy_string' > > These two functions are not included in libgfortran.so.3. I found that the > right version of gfortran that might solve both errors is gfortran.4.2.3 > (libgfortran.so.2). However I have not been able to find it for Centos > x86_64. It looks like there is no libgfortran.so.2 compatible for this > machine (or I could not find it!) I stumbled over more or less the same issue a while ago. If you search the list for "_gfortran_pow_r8_i4" you should find my message. The proper way to fix this is to update to gfortran >= 4.3, because 4.3 introduced symbol versioning for libgfortran, so libgfortrans >= 4.3 are supposed to be downward compatible. You will have to recompile LAPACK with the new version, however. A very hackish approach would be to manually link against an older version of libgfortran besides the automagically linked current version, but this might break things. If you really want to try this, I suggest your final compile command (use gfortran --verbose to see the actual compiler command line - look for f951) should link against the old library *after* the new one, so only the missing symbols are picked from the old one. If you cannot find prebuilt libraries, you can bootstrap gcc yourself - it looks daunting at first, but is not that hard actually. Cheers, Dennis |
|
|
Re: Error linking with libgfortran version (pardiso and lapack libs)Dennis Wassel wrote:
> 2009/11/6 fcostela <francisco.costela@...>: >> Hi all, >> >> I am trying to compile a program that requires both LAPACK and Pardiso >> libraries on a Centos 4.5 x86_64 using gcc/gfortran. I am linking with the >> file libpardiso400_GNU430_IA64.so that was compiled with gcc/gfortran 4.3. >> I compiled LAPACK 3.2.1 using my current gfortran version 4.1.2 on my Centos >> (I could not update it to 4.2 or higher). >> >> However, when I compiled I got this error: >> /root/pardisolib/libpardiso400_GNU430_IA64.so: undefined reference to >> `_gfortran_os_error' Why would anyone label any object code with IA64 if it is meant for x86_64? This can only compound the confusion. The targets are totally incompatible. |
|
|
Re: Error linking with libgfortran version (pardiso and lapack libs)2009/11/6 Tim Prince <n8tm@...>:
>> However, when I compiled I got this error: >> /root/pardisolib/libpardiso400_GNU430_IA64.so: undefined reference to >> `_gfortran_os_error' > > Why would anyone label any object code with IA64 if it is meant for x86_64? > This can only compound the confusion. The targets are totally > incompatible. Good point. They offer both an "INTEL, 64-bit" and an "AMD, 64-bit" version, named "GNU430_IA64" and "GNU430_AMD_IA64" respectively. The naming scheme for x86 being IA32, I guess this is just a matter of an incorrect/confusing naming scheme. Silly question: Would a library targetted at IA-64 (as in Itanium) even link on an x86_64 machine? |
|
|
Re: Error linking with libgfortran version (pardiso and lapack libs)Thanks Dennis and Tim,
I already tried to compile LAPACK with a newer version of gfortran but I got the next message: make[1]: Entering directory `/root/lapack-3.2.1/SRC' /root/gcc-4.3/bin/gfortran -O -m64 -c sgbbrd.f -o sgbbrd.o /root/gcc-4.3/bin/../libexec/ gcc/x86_64-unknown-linux-gnu/4.3.5/f951: /lib64/tls/libc.so.6: version `GLIBC_2.4' not found (required by /root/gcc-4.3/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.5/f951) The maximum version of GLIBC in my Centos 4.5 is 2.3.4, so it looks like I could not compile with a GCC version higher than 4.1.2. I also tried to compile a source gcc-4.2.3 package by myself but I got stuck with this error during 'make': "usr/bin/ld: cannot find lc" that I am still trying to solve. I think this has to do with the architecture. Finally I linked with both libgfortran.so.3 and libgfortran.so.1 in this order but it looks like they create mutual exclusion as all the errors involving gfortran references appear. My very desperate option would be installing Centos 5, that includes GLIBC_2.4 to compile LAPACK again with the last version of gfortran. Any more ideas? Cheers, Francisco |
|
|
Re: Error linking with libgfortran version (pardiso and lapack libs)On Fri, Nov 06, 2009 at 05:24:26PM +0100, Francisco Costela wrote:
> > I already tried to compile LAPACK with a newer version of gfortran but > I got the next message: > > make[1]: Entering directory `/root/lapack-3.2.1/SRC' > /root/gcc-4.3/bin/gfortran -O -m64 -c sgbbrd.f -o sgbbrd.o > /root/gcc-4.3/bin/../libexec/ > gcc/x86_64-unknown-linux-gnu/4.3.5/f951: /lib64/tls/libc.so.6: version > `GLIBC_2.4' not found (required by > /root/gcc-4.3/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.3.5/f951) > > The maximum version of GLIBC in my Centos 4.5 is 2.3.4, so it looks > like I could not compile with a GCC version higher than 4.1.2. > I also tried to compile a source gcc-4.2.3 package by myself but I got > stuck with this error during 'make': "usr/bin/ld: cannot find lc" that > I am still trying to solve. I think this has to do with the > architecture. > > Finally I linked with both libgfortran.so.3 and libgfortran.so.1 in > this order but it looks like they create mutual exclusion as all the > errors involving gfortran references appear. > > My very desperate option would be installing Centos 5, that includes > GLIBC_2.4 to compile LAPACK again with the last version of gfortran. > Any more ideas? > At this point, it appears you have really munged up your system. It may be best to delete all of the gcc distributions that you have tried to install and the version of gfortran that comes with CentOS. You definitely do not want to use 4.1.2. First, read the installation instruction at http://gcc.gnu.org/install/ An important detail to get correct is to have the correct versions of GMP/MPFR/MPC installed on your system. If you don't have the correct versions on your system, then remove the old versions and install GMP, MPFR, and/or MPC. Now, download gcc-4.4.2, and following the installation instructions. -- Steve |
|
|
Re: Error linking with libgfortran version (pardiso and lapack libs)Hi Steve,
Thanks so much for the advises. After a few days trying to compile gcc-4.4.2 in Centos 4.5 unsuccessfully, I gave up and ended up installing Ubuntu 9.06 and the problem was solved. Fran |
| Free embeddable forum powered by Nabble | Forum Help |