This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: version `GFORTRAN_1.4' not found


On Mon, Feb 28, 2011 at 01:40:31PM +0100, Axel Freyn wrote:
> Hi Janus,
> On Mon, Feb 28, 2011 at 12:59:43PM +0100, Janus Weil wrote:
> > Hi all,
> > 
> > I am currently seeing a curious problem when running any trivial
> > hello-world program compiled with gfortran trunk:
> > 
> > jweil@manzanita:~> cat hello.f90
> > 
> > print *,"hello world!"
> > end
> > 
> > jweil@manzanita:~> gfortran-4.6 hello.f90
> > jweil@manzanita:~> ./a.out
> > ./a.out: /usr/lib64/libgfortran.so.3: version `GFORTRAN_1.4' not found
> > (required by ./a.out)
> > 
> > 
> > 
> > My machine runs openSUSE 11.3 (x86_64) with the default system compiler:
> > 
> > jweil@manzanita:~> gfortran -v
> > Using built-in specs.
> > COLLECT_GCC=gfortran
> > COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper
> > Target: x86_64-suse-linux
> > Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
> > --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
> > --enable-languages=c,c++,objc,fortran,obj-c++,java,ada
> > --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.5
> > --enable-ssp --disable-libssp --disable-plugin
> > --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
> > --disable-libgcj --disable-libmudflap --with-slibdir=/lib64
> > --with-system-zlib --enable-__cxa_atexit
> > --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
> > --enable-version-specific-runtime-libs --program-suffix=-4.5
> > --enable-linux-futex --without-system-libunwind --enable-gold
> > --with-plugin-ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic
> > --build=x86_64-suse-linux
> > Thread model: posix
> > gcc version 4.5.0 20100604 [gcc-4_5-branch revision 160292] (SUSE Linux)
> > 
> > 
> > and a homegrown GCC trunk:
> > 
> > jweil@manzanita:~> gfortran-4.6 -v
> > Using built-in specs.
> > COLLECT_GCC=gfortran-4.6
> > COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
> > Target: x86_64-unknown-linux-gnu
> > Configured with: /home/jweil/gcc46/trunk/configure
> > --program-suffix=-4.6 --prefix=/usr --libdir=/usr/lib64
> > --libexecdir=/usr/lib64 --enable-languages=c,fortran --enable-checking
> > --enable-lto --disable-bootstrap --disable-multilib
> > --enable-version-specific-runtime-libs
> > Thread model: posix
> > gcc version 4.6.0 20110228 (experimental) [trunk revision 170558] (GCC)
> > 
> > 
> > I have been running in this configuration for quite some time without
> > any problems. Can anyone give me a clue what's wrong? I was asuming
> > '--enable-version-specific-runtime-libs' would take care of handling
> > several GCC versions on one system?!?
> 
> Did you run a suse update lately? My understanding of the error: the
> runtime finds a libgfortran.so - library (/usr/lib64/libgfortran.so.3)
> -- however, this one is "too old" and does not contain GFORTRAN_1.4.
> 
> And you did something "dangerous": by using "--prefix=/usr" to the
> configure-script, you told gcc-4.6 to install his self-compiled
> libraries into the directory /usr/lib64 -- where also the package
> manager from Open-SuSE acts:
>  - by your manual "make install" of gcc-4.6,
>    "/usr/lib64/libgfortran.so.3" was overwritten by the gcc-4.6 -
>    version of the file
>  - by a later YaST-update, which includes an update of the
>    gfortran-libraries, /usr/lib64/libgfortran.so.3 will again be
>    overwritten -- by the "official" OpenSuse-version, which is 4.5 at
>    the moment.
> 
> So I would assume, that the file "/usr/lib64/libgfortran.so.3" is no
> longer the one from gcc-4.6, but the version from gcc-4.5, which has
> been installed by YaST. Is that possible?
> 
> The "save" way would be to install your private gcc-4.6-version
> somewhere where YaST does nothing (like /usr/local) -- that way you can be
> quite sure that "your" files will never be overwritten by YaST.
> 
> Axel

Is this any use:

QOF> gfortran46 tmp.f90 
QOF> ./a.out 
/libexec/ld-elf.so.1: /usr/local/lib/gcc45/libgfortran.so.3: version GFORTRAN_1.4 required by /usr/home/mexas/a.out not found

QOF> gfortran46 -Wl,-rpath=/usr/local/lib/gcc46 tmp.f90 
QOF> ./a.out 
z                                                0                      
QOF> 

This is on FreeBSD, with GCC 4.5 and 4.6 installed from ports.

I believe Axel is right and installing under /usr/lib64
can lead to all sorts of problems.


-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 331 5944
Fax: +44 (0)117 929 4423


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]